2012-05-14 Mike West Content Security Policy console errors include violated directive. https://bugs.webkit.org/show_bug.cgi?id=86323 Reviewed by Adam Barth. Console errors generated when resources, inline script/style, or eval are blocked by Content Security Policy directives should include the text of the directive that's been violated. This gives developers more of the information they need to resolve the issue. Test: http/tests/security/contentSecurityPolicy/* * page/ContentSecurityPolicy.cpp: (WebCore::CSPDirectiveList::checkEvalAndReportViolation): (WebCore::CSPDirectiveList::checkInlineAndReportViolation): (WebCore::CSPDirectiveList::checkSourceAndReportViolation): (WebCore::CSPDirectiveList::allowJavaScriptURLs): (WebCore::CSPDirectiveList::allowInlineEventHandlers): (WebCore::CSPDirectiveList::allowInlineScript): (WebCore::CSPDirectiveList::allowInlineStyle): (WebCore::CSPDirectiveList::allowEval): 2012-05-14 Julien Chaffraix Crash in FrameView::windowClipRectForFrameOwner after r116371 https://bugs.webkit.org/show_bug.cgi?id=86035 Reviewed by David Hyatt. Added a NULL-check for |parentView| as nothing guarantees it to be non-NULL. Unfortunately no test as this is a crasher I couldn't reproduce on my machine and the user logs were not helpful. * page/FrameView.cpp: (WebCore::FrameView::windowClipRect): 2012-05-14 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=86403 ASSERTION FAILED: m_verticalScrollbarPainterDelegate on recent builds -and corresponding- Reviewed by Simon Fraser. http://trac.webkit.org/changeset/116476 accidentally started calling these functions for custom scrollbars. This change replaces that guard. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::destroyScrollbar): 2012-05-14 Simon Fraser Remove redundant pixel snapping in calculateCompositedBounds() https://bugs.webkit.org/show_bug.cgi?id=86400 Reviewed by Sam Weinig. RenderLayer::calculateLayerBounds() returns a pixel-snapped rect, so we don't need to pixel-snap it again. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::calculateCompositedBounds): 2012-05-14 Simon Fraser Avoid logging related to setting shadow-related properties on a transform-only layer https://bugs.webkit.org/show_bug.cgi?id=86398 Reviewed by Dan Bernstein. When making a CATransformLayer to support transform-style: preserve-3d, avoid trying to set filters on the transform layer. We should never have this combination, because filters force flattening to occur. * platform/graphics/ca/GraphicsLayerCA.cpp: (WebCore::GraphicsLayerCA::ensureStructuralLayer): 2012-05-14 Sheriff Bot Unreviewed, rolling out r116983. http://trac.webkit.org/changeset/116983 https://bugs.webkit.org/show_bug.cgi?id=86397 Does not compile on chromium-win (Requested by abarth on #webkit). * WebCore.gypi: * page/TouchAdjustment.cpp: 2012-05-14 Dan Bernstein Pagination splits lines that could fit on a single page if it were not for their top leading https://bugs.webkit.org/show_bug.cgi?id=86388 Reviewed by Darin Adler. Test: fast/multicol/split-in-top-margin.html When a line’s visible content fits on a page, but adding the top leading makes it taller than a page, instead of giving up and splitting the line in an arbitrary position, add a strut to push it downwards so that the split occurs in the top leading, and the visible content is fully contained on a single page. * rendering/RenderBlock.cpp: (WebCore::RenderBlock::adjustLinePositionForPagination): 2012-05-14 Terry Anderson [chromium] Compute the best target node on a GestureTap event https://bugs.webkit.org/show_bug.cgi?id=85101 Reviewed by Adam Barth. Using tests in the touchadjustment/ directory. * WebCore.gypi: Include TouchAdjustment.* files. * page/TouchAdjustment.cpp: Included math.h because of an 'Undeclared identifier: INFINITY' when this patch was landed before. 2012-05-14 Adrienne Walker [chromium] Add compositor debug asserts for blocked main thread https://bugs.webkit.org/show_bug.cgi?id=86384 Reviewed by James Robinson. Where we depend for thread-safety that the main thread is blocked, assert that this is actually the case. * platform/graphics/chromium/cc/CCProxy.cpp: (WebCore): (WebCore::CCProxy::isMainThreadBlocked): (WebCore::CCProxy::setMainThreadBlocked): * platform/graphics/chromium/cc/CCProxy.h: (CCProxy): (WebCore): (DebugScopedSetMainThreadBlocked): (WebCore::DebugScopedSetMainThreadBlocked::DebugScopedSetMainThreadBlocked): (WebCore::DebugScopedSetMainThreadBlocked::~DebugScopedSetMainThreadBlocked): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::doCommit): (WebCore::CCSingleThreadProxy::stop): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::stop): (WebCore::CCThreadProxy::beginFrame): * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp: (WebCore::CCVideoLayerImpl::CCVideoLayerImpl): (WebCore::CCVideoLayerImpl::~CCVideoLayerImpl): 2012-05-14 Swapna P Reviewed by Eric Seidel. Bug: Cannot resize frames because frameborder=0 https://bugs.webkit.org/show_bug.cgi?id=23750 Removed check for frameborder, in order to allow resize of frames even in case of frameborder=0. Test: fast/frames/frames-with-frameborder-zero-can-be-resized.html * rendering/RenderFrameSet.cpp: (WebCore::RenderFrameSet::startResizing): (WebCore::RenderFrameSet::canResizeRow): (WebCore::RenderFrameSet::canResizeColumn): 2012-05-14 David Barton Unify RenderMathMLSquareRoot.cpp and RenderMathMLRoot.cpp https://bugs.webkit.org/show_bug.cgi?id=86319 Reviewed by Darin Adler. Most of RenderMathMLSquareRoot.cpp is duplicated in RenderMathMLRoot.cpp and can be eliminated. We also define RenderMathMLRoot::computePreferredLogicalWidths(). Test: mathml/presentation/mroot-pref-width.html * rendering/mathml/RenderMathMLRoot.cpp: (WebCore::RenderMathMLRoot::computePreferredLogicalWidths): (WebCore::RenderMathMLRoot::layout): (WebCore::RenderMathMLRoot::paint): * rendering/mathml/RenderMathMLRoot.h: * rendering/mathml/RenderMathMLSquareRoot.cpp: (WebCore::RenderMathMLSquareRoot::RenderMathMLSquareRoot): (WebCore::RenderMathMLSquareRoot::addChild): * rendering/mathml/RenderMathMLSquareRoot.h: 2012-05-14 MORITA Hajime [Shadow DOM][Refactoring] HTMLContentSelector family should have better name https://bugs.webkit.org/show_bug.cgi?id=86064 Reviewed by Dimitri Glazkov. This change renames classes around shadow content distribution. - Renamed HTMLContentSelector to ContentDistributor - Renamed HTMLContentSelectionList to ContentDistribution - Renamed HTMLContentSelection to ContentDistribution::Item - Inlined HTMLContentSelectionSet into ContentDistributor Associated rename and inlining are also happening for method names. No new tests. No behavior change. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebCore.gypi: * WebCore.vcproj/WebCore.vcproj: * WebCore.xcodeproj/project.pbxproj: * dom/ComposedShadowTreeWalker.cpp: (WebCore::ComposedShadowTreeWalker::traverseNode): (WebCore::ComposedShadowTreeWalker::traverseSiblingOrBackToInsertionPoint): (WebCore::ComposedShadowTreeWalker::traverseParent): * dom/ElementShadow.cpp: (WebCore::ElementShadow::ElementShadow): (WebCore::ElementShadow::attach): (WebCore::ElementShadow::insertionPointFor): (WebCore::ElementShadow::distributionItemFor): (WebCore::ElementShadow::recalcStyle): (WebCore::ElementShadow::needsRedistributing): (WebCore::ElementShadow::hostChildrenChanged): (WebCore::ElementShadow::setNeedsRedistributing): * dom/ElementShadow.h: (WebCore): (ElementShadow): (WebCore::ElementShadow::distributor): (WebCore::ElementShadow::clearNeedsRedistributing): * dom/NodeRenderingContext.cpp: (WebCore::NodeRenderingContext::NodeRenderingContext): (WebCore::nextRendererOfInsertionPoint): (WebCore::previousRendererOfInsertionPoint): (WebCore::firstRendererOfInsertionPoint): (WebCore::lastRendererOfInsertionPoint): * dom/ShadowRoot.cpp: * dom/ShadowRoot.h: (WebCore): * html/shadow/ContentDistributor.cpp: Renamed from Source/WebCore/html/shadow/HTMLContentSelector.cpp. (WebCore): (WebCore::ContentDistribution::ContentDistribution): (WebCore::ContentDistribution::~ContentDistribution): (WebCore::ContentDistribution::find): (WebCore::ContentDistribution::clear): (WebCore::ContentDistribution::append): (WebCore::ContentDistributor::ContentDistributor): (WebCore::ContentDistributor::~ContentDistributor): (WebCore::ContentDistributor::distribute): (WebCore::ContentDistributor::clearDistribution): (WebCore::ContentDistributor::findFor): (WebCore::ContentDistributor::findInsertionPointFor): (WebCore::ContentDistributor::willDistribute): (WebCore::ContentDistributor::didDistribute): (WebCore::ContentDistributor::preparePoolFor): * html/shadow/ContentDistributor.h: Added. (WebCore): (ContentDistribution): (Item): (WebCore::ContentDistribution::Item::insertionPoint): (WebCore::ContentDistribution::Item::node): (WebCore::ContentDistribution::Item::next): (WebCore::ContentDistribution::Item::previous): (WebCore::ContentDistribution::Item::create): (WebCore::ContentDistribution::Item::Item): (WebCore::ContentDistribution::first): (WebCore::ContentDistribution::last): (WebCore::ContentDistribution::firstNode): (WebCore::ContentDistribution::lastNode): (WebCore::ContentDistribution::isEmpty): (ContentDistributor): (Translator): (WebCore::ContentDistributor::Translator::hash): (WebCore::ContentDistributor::Translator::equal): (WebCore::ContentDistributor::Hash::hash): (WebCore::ContentDistributor::Hash::equal): (Hash): (WebCore::ContentDistributor::inDistribution): (WebCore::ContentDistributor::poolIsReady): * html/shadow/HTMLContentElement.cpp: (WebCore::HTMLContentElement::parseAttribute): * html/shadow/HTMLContentSelector.h: Removed. * html/shadow/InsertionPoint.cpp: (WebCore::InsertionPoint::InsertionPoint): (WebCore::InsertionPoint::detach): (WebCore::InsertionPoint::distributeHostChildren): (WebCore::InsertionPoint::clearDistribution): (WebCore::InsertionPoint::attachDistributedNode): (WebCore::InsertionPoint::assignShadowRoot): (WebCore::InsertionPoint::clearAssignment): * html/shadow/InsertionPoint.h: (WebCore::InsertionPoint::distribution): (WebCore::InsertionPoint::hasDistribution): 2012-05-14 Sheriff Bot Unreviewed, rolling out r116969. http://trac.webkit.org/changeset/116969 https://bugs.webkit.org/show_bug.cgi?id=86386 i accidentally the icondatabase (Requested by kling on #webkit). * loader/icon/IconDatabase.cpp: (WebCore::IconDatabase::synchronousIconForPageURL): (WebCore::IconDatabase::retainIconForPageURL): (WebCore::IconDatabase::releaseIconForPageURL): (WebCore::IconDatabase::retainedPageURLCount): (WebCore::IconDatabase::performURLImport): (WebCore::IconDatabase::syncThreadMainLoop): * loader/icon/IconDatabase.h: (IconDatabase): 2012-05-14 Kevin Ollivier [wx] Unreviewed build fix. Fix for wxMSW windows.h load order bug. * platform/graphics/wx/ImageBufferDataWx.h: 2012-05-14 Eric Carlson