[webkit-changes] [148765] trunk/Source/WebCore
Title: [148765] trunk/Source/WebCore Revision 148765 Author shawnsi...@chromium.org Date 2013-04-19 13:41:23 -0700 (Fri, 19 Apr 2013) Log Message Remove non-overlap testing code in RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=85521 Reviewed by Simon Fraser. m_compositingConsultsOverlap is always true in the current code. This patch removes this flag, and removes dead code that is never executed because it was never false. No new tests, no change in behavior. The cleanup is covered by existing tests. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::updateCompositingLayersAfterScroll): removed if-statement that is always true. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::shouldClipCompositedBounds): removed if-statement that would never get triggered. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::RenderLayerCompositor): (WebCore::RenderLayerCompositor::updateCompositingLayers): removed m_compositingConsultsOverlap, and retained the code as if the flag were true. * rendering/RenderLayerCompositor.h: (RenderLayerCompositor): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayer.cpp trunk/Source/WebCore/rendering/RenderLayerBacking.cpp trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp trunk/Source/WebCore/rendering/RenderLayerCompositor.h Diff Modified: trunk/Source/WebCore/ChangeLog (148764 => 148765) --- trunk/Source/WebCore/ChangeLog 2013-04-19 20:32:55 UTC (rev 148764) +++ trunk/Source/WebCore/ChangeLog 2013-04-19 20:41:23 UTC (rev 148765) @@ -1,3 +1,33 @@ +2013-04-19 Shawn Singh shawnsi...@chromium.org + +Remove non-overlap testing code in RenderLayerCompositor +https://bugs.webkit.org/show_bug.cgi?id=85521 + +Reviewed by Simon Fraser. + +m_compositingConsultsOverlap is always true in the current +code. This patch removes this flag, and removes dead code that is +never executed because it was never false. + +No new tests, no change in behavior. The cleanup is covered by +existing tests. + +* rendering/RenderLayer.cpp: +(WebCore::RenderLayer::updateCompositingLayersAfterScroll): +removed if-statement that is always true. + +* rendering/RenderLayerBacking.cpp: +(WebCore::RenderLayerBacking::shouldClipCompositedBounds): +removed if-statement that would never get triggered. + +* rendering/RenderLayerCompositor.cpp: +(WebCore::RenderLayerCompositor::RenderLayerCompositor): +(WebCore::RenderLayerCompositor::updateCompositingLayers): +removed m_compositingConsultsOverlap, and retained the code as if the flag were true. + +* rendering/RenderLayerCompositor.h: +(RenderLayerCompositor): + 2013-04-19 Roger Fong roger_f...@apple.com Unreviewed. WebKit_Source is incorrectly set. Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (148764 => 148765) --- trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-04-19 20:32:55 UTC (rev 148764) +++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2013-04-19 20:41:23 UTC (rev 148765) @@ -2370,13 +2370,10 @@ // Our stacking container is guaranteed to contain all of our descendants that may need // repositioning, so update compositing layers from there. if (RenderLayer* compositingAncestor = stackingContainer()-enclosingCompositingLayer()) { -if (compositor()-compositingConsultsOverlap()) { -if (usesCompositedScrolling() !hasOutOfFlowPositionedDescendant()) -compositor()-updateCompositingLayers(CompositingUpdateOnCompositedScroll, compositingAncestor); -else -compositor()-updateCompositingLayers(CompositingUpdateOnScroll, compositingAncestor); -} else -compositingAncestor-backing()-updateAfterLayout(RenderLayerBacking::IsUpdateRoot); +if (usesCompositedScrolling() !hasOutOfFlowPositionedDescendant()) +compositor()-updateCompositingLayers(CompositingUpdateOnCompositedScroll, compositingAncestor); +else +compositor()-updateCompositingLayers(CompositingUpdateOnScroll, compositingAncestor); } } #endif Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (148764 => 148765) --- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-04-19 20:32:55 UTC (rev 148764) +++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-04-19 20:41:23 UTC (rev 148765) @@ -419,9 +419,6 @@ if (m_usingTiledCacheLayer) return false; -if (!compositor()-compositingConsultsOverlap()) -return false; - if (layerOrAncestorIsTransformedOrUsingCompositedScrolling(m_owningLayer)) return false; Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (148764 => 148765) ---
[webkit-changes] [147600] trunk/Source/WebCore
Title: [147600] trunk/Source/WebCore Revision 147600 Author shawnsi...@chromium.org Date 2013-04-03 18:02:57 -0700 (Wed, 03 Apr 2013) Log Message Add comment to clarify isStackingContext() in RenderLayer.h https://bugs.webkit.org/show_bug.cgi?id=113909 Reviewed by Simon Fraser. It was not obvious how the implementation of isStackingContext() was correct, a comment is appropriate here for anyone who reads this code in the future. Just a change in comment, no test needed. * rendering/RenderLayer.h: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayer.h Diff Modified: trunk/Source/WebCore/ChangeLog (147599 => 147600) --- trunk/Source/WebCore/ChangeLog 2013-04-04 00:58:14 UTC (rev 147599) +++ trunk/Source/WebCore/ChangeLog 2013-04-04 01:02:57 UTC (rev 147600) @@ -1,3 +1,18 @@ +2013-04-03 Shawn Singh shawnsi...@chromium.org + +Add comment to clarify isStackingContext() in RenderLayer.h +https://bugs.webkit.org/show_bug.cgi?id=113909 + +Reviewed by Simon Fraser. + +It was not obvious how the implementation of isStackingContext() +was correct, a comment is appropriate here for anyone who reads +this code in the future. + +Just a change in comment, no test needed. + +* rendering/RenderLayer.h: + 2013-04-03 Hans Muller hmul...@adobe.com [CSS Exclusions] Removed ExclusionShape dead code Modified: trunk/Source/WebCore/rendering/RenderLayer.h (147599 => 147600) --- trunk/Source/WebCore/rendering/RenderLayer.h 2013-04-04 00:58:14 UTC (rev 147599) +++ trunk/Source/WebCore/rendering/RenderLayer.h 2013-04-04 01:02:57 UTC (rev 147600) @@ -864,6 +864,8 @@ void updateNormalFlowList(); +// Non-auto z-index always implies stacking context here, because StyleResolver::adjustRenderStyle already adjusts z-index +// based on positioning and other criteria. bool isStackingContext(const RenderStyle* style) const { return !style-hasAutoZIndex() || isRootLayer(); } bool isDirtyStackingContainer() const { return m_zOrderListsDirty isStackingContainer(); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [144841] trunk
Title: [144841] trunk Revision 144841 Author shawnsi...@chromium.org Date 2013-03-05 16:11:28 -0800 (Tue, 05 Mar 2013) Log Message Fix default background of a dragged image. https://bugs.webkit.org/show_bug.cgi?id=110512 Reviewed by Tony Chang. .: * ManualTests/drag-background-with-padding.html: Added. Source/WebCore: Transparent background color (particularly visible in the padding of an element) was not being respected. The solution is to initially fill the drag image with transparent instead of white, so that any color background works correctly. This patch does not affect Apple Mac or Win platforms, given that this part of the code is #if guarded from those platforms. Manual test added: ManualTests/drag-background-with-padding.html Infrastructure for retrieving the drag image for pixel testing does not yet exist. * page/Frame.cpp: (WebCore::Frame::nodeImage): Modified Paths trunk/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/page/Frame.cpp Added Paths trunk/ManualTests/drag-background-with-padding.html Diff Modified: trunk/ChangeLog (144840 => 144841) --- trunk/ChangeLog 2013-03-06 00:10:49 UTC (rev 144840) +++ trunk/ChangeLog 2013-03-06 00:11:28 UTC (rev 144841) @@ -1,3 +1,12 @@ +2013-03-05 Shawn Singh shawnsi...@chromium.org + +Fix default background of a dragged image. +https://bugs.webkit.org/show_bug.cgi?id=110512 + +Reviewed by Tony Chang. + +* ManualTests/drag-background-with-padding.html: Added. + 2013-03-05 Gustavo Noronha Silva g...@gnome.org Unreviewed build fix. Added: trunk/ManualTests/drag-background-with-padding.html (0 => 144841) --- trunk/ManualTests/drag-background-with-padding.html (rev 0) +++ trunk/ManualTests/drag-background-with-padding.html 2013-03-06 00:11:28 UTC (rev 144841) @@ -0,0 +1,27 @@ +!DOCTYPE HTML +html + body style=background-color: silver; +pFor a draggable element that has padding, the drag image that is created +should respect that background color. Note that none of the drag images +use any of the body element's silver background./p + +div style=position: absolute; top: 100px; padding: 50px; border: solid 2px black; draggable=true + div style=background-color: grey; width: 100px; height: 100px;Drag me! Drag image padding should remain transparent./div +/div + +div style=position: absolute; top: 350px; padding: 50px; border: solid 2px black; background-color: rgba(1, 0, 0, 0); draggable=true + div style=background-color: grey; width: 100px; height: 100px;Drag me! Drag image padding should be transparent./div +/div + +div style=position: absolute; top: 350px; left: 250px; padding: 50px; border: solid 2px black; background-color: white; draggable=true + div style=background-color: grey; width: 100px; height: 100px;Drag me! Drag image padding should be white./div +/div + +div style=position: absolute; top: 350px; left: 500px; padding: 50px; border: solid 2px black; background-color: lime; draggable=true + div style=background-color: grey; width: 100px; height: 100px;Drag me! Drag image padding should be lime./div +/div + +div style=position: absolute; top: 100px; left: 250px; width: 200px; height: 200px; background-color: cyan; Drag on top of me just for reference./div + + /body +/html Modified: trunk/Source/WebCore/ChangeLog (144840 => 144841) --- trunk/Source/WebCore/ChangeLog 2013-03-06 00:10:49 UTC (rev 144840) +++ trunk/Source/WebCore/ChangeLog 2013-03-06 00:11:28 UTC (rev 144841) @@ -1,3 +1,26 @@ +2013-03-05 Shawn Singh shawnsi...@chromium.org + +Fix default background of a dragged image. +https://bugs.webkit.org/show_bug.cgi?id=110512 + +Reviewed by Tony Chang. + +Transparent background color (particularly visible in the padding +of an element) was not being respected. The solution is to +initially fill the drag image with transparent instead of white, +so that any color background works correctly. This patch does not +affect Apple Mac or Win platforms, given that this part of the +code is #if guarded from those platforms. + +Manual test added: + ManualTests/drag-background-with-padding.html + +Infrastructure for retrieving the drag image for pixel testing +does not yet exist. + +* page/Frame.cpp: +(WebCore::Frame::nodeImage): + 2013-03-05 Emil A Eklund e...@chromium.org ASSERTION FAILED: i size(), UNKNOWN in WebCore::RenderTableSection::layout Modified: trunk/Source/WebCore/page/Frame.cpp (144840 => 144841) --- trunk/Source/WebCore/page/Frame.cpp 2013-03-06 00:10:49 UTC (rev 144840) +++ trunk/Source/WebCore/page/Frame.cpp 2013-03-06 00:11:28 UTC (rev 144841) @@ -1085,7 +1085,7 @@ m_view-setPaintBehavior(state.paintBehavior | PaintBehaviorFlattenCompositingLayers); // When generating the drag image for an element,
[webkit-changes] [142815] trunk/Source/WebCore
Title: [142815] trunk/Source/WebCore Revision 142815 Author shawnsi...@chromium.org Date 2013-02-13 15:43:01 -0800 (Wed, 13 Feb 2013) Log Message Fix debug assertion being triggered because we may access dirty normalFlowList. https://bugs.webkit.org/show_bug.cgi?id=109740 A debug assertion in RenderLayer.h is being hit when trying to access the normalFlowList when it is dirty. This is caused by a new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(), but I overlooked the need to call updateLayerListsIfNeeded() recursively as well. Reviewed by Simon Fraser. No test, because there's no reliable way to test this (same as bug 85512). * rendering/RenderLayerBacking.cpp: (WebCore::hasVisibleNonCompositingDescendant): (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayerBacking.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (142814 => 142815) --- trunk/Source/WebCore/ChangeLog 2013-02-13 23:37:37 UTC (rev 142814) +++ trunk/Source/WebCore/ChangeLog 2013-02-13 23:43:01 UTC (rev 142815) @@ -1,3 +1,22 @@ +2013-02-13 Shawn Singh shawnsi...@chromium.org + +Fix debug assertion being triggered because we may access dirty normalFlowList. +https://bugs.webkit.org/show_bug.cgi?id=109740 + +A debug assertion in RenderLayer.h is being hit when trying to +access the normalFlowList when it is dirty. This is caused by a +new recursion that I added in RenderLayerBacking::hasVisibleNonCompositingDescendant(), +but I overlooked the need to call updateLayerListsIfNeeded() +recursively as well. + +Reviewed by Simon Fraser. + +No test, because there's no reliable way to test this (same as bug 85512). + +* rendering/RenderLayerBacking.cpp: +(WebCore::hasVisibleNonCompositingDescendant): +(WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): + 2013-02-13 Antti Koivisto an...@apple.com Don't restart shared timer if both the current and the new fire time are in the past Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (142814 => 142815) --- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-02-13 23:37:37 UTC (rev 142814) +++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2013-02-13 23:43:01 UTC (rev 142815) @@ -1431,6 +1431,13 @@ static bool hasVisibleNonCompositingDescendant(RenderLayer* parent) { +// FIXME: We shouldn't be called with a stale z-order lists. See bug 85512. +parent-updateLayerListsIfNeeded(); + +#if !ASSERT_DISABLED +LayerListMutationDetector mutationChecker(parent); +#endif + if (VectorRenderLayer** normalFlowList = parent-normalFlowList()) { size_t listSize = normalFlowList-size(); for (size_t i = 0; i listSize; ++i) { @@ -1473,13 +1480,6 @@ // Conservative test for having no rendered children. bool RenderLayerBacking::hasVisibleNonCompositingDescendantLayers() const { -// FIXME: We shouldn't be called with a stale z-order lists. See bug 85512. -m_owningLayer-updateLayerListsIfNeeded(); - -#if !ASSERT_DISABLED -LayerListMutationDetector mutationChecker(m_owningLayer); -#endif - return hasVisibleNonCompositingDescendant(m_owningLayer); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [142012] trunk
Title: [142012] trunk Revision 142012 Author shawnsi...@chromium.org Date 2013-02-06 11:35:21 -0800 (Wed, 06 Feb 2013) Log Message RenderLayer hasVisibleContent() has inconsistent semantics causing disappearing composited layers https://bugs.webkit.org/show_bug.cgi?id=108118 Reviewed by Simon Fraser. Source/WebCore: RenderLayerBacking::hasVisibleNonCompositingDescendantLayers was only checking whether direct children had visible content. As a result, composited layers had wrong visibility status if only a deeper descendant RenderLayer was visible. Test: compositing/visibility/visibility-on-distant-descendant.html * rendering/RenderLayerBacking.cpp: (WebCore::hasVisibleNonCompositingDescendant): copied the original implementation into this function; then added the RenderLayer recursion as appropriate. (WebCore): (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers): This is now just a wrapper to the private static recursive function. LayoutTests: * compositing/visibility/visibility-on-distant-descendant-expected.png: Added. * compositing/visibility/visibility-on-distant-descendant-expected.txt: Added. * compositing/visibility/visibility-on-distant-descendant.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayerBacking.cpp Added Paths trunk/LayoutTests/compositing/visibility/visibility-on-distant-descendant-expected.png trunk/LayoutTests/compositing/visibility/visibility-on-distant-descendant-expected.txt trunk/LayoutTests/compositing/visibility/visibility-on-distant-descendant.html Diff Modified: trunk/LayoutTests/ChangeLog (142011 => 142012) --- trunk/LayoutTests/ChangeLog 2013-02-06 19:07:27 UTC (rev 142011) +++ trunk/LayoutTests/ChangeLog 2013-02-06 19:35:21 UTC (rev 142012) @@ -1,3 +1,14 @@ +2013-02-06 Shawn Singh shawnsi...@chromium.org + +RenderLayer hasVisibleContent() has inconsistent semantics causing disappearing composited layers +https://bugs.webkit.org/show_bug.cgi?id=108118 + +Reviewed by Simon Fraser. + +* compositing/visibility/visibility-on-distant-descendant-expected.png: Added. +* compositing/visibility/visibility-on-distant-descendant-expected.txt: Added. +* compositing/visibility/visibility-on-distant-descendant.html: Added. + 2013-02-06 Gregg Tavares g...@chromium.org Adds the WebGL Conformance Test ogles support files. Added: trunk/LayoutTests/compositing/visibility/visibility-on-distant-descendant-expected.png (0 => 142012) --- trunk/LayoutTests/compositing/visibility/visibility-on-distant-descendant-expected.png (rev 0) +++ trunk/LayoutTests/compositing/visibility/visibility-on-distant-descendant-expected.png 2013-02-06 19:35:21 UTC (rev 142012) @@ -0,0 +1,6 @@ +\x89PNG + + +IHDR X \x9Av\x82p )tEXtchecksum d55c7583354eace2d81866730c07fabcKWJ: yIDATx\x9C\xED\xD9\xC1 +\x800\xC1@\xE3й\xE9b\xA3\x88\x99 +\xEEei\xE5k\xBDk\xC0\xE6q\xAE \xE0t\xF7\xEE \xC0 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8
[webkit-changes] [140042] branches/chromium/1312/Source/WebCore
Title: [140042] branches/chromium/1312/Source/WebCore Revision 140042 Author shawnsi...@chromium.org Date 2013-01-17 14:28:54 -0800 (Thu, 17 Jan 2013) Log Message Manual merge of bugfix from trunk in r133903 Modified Paths branches/chromium/1312/Source/WebCore/ChangeLog branches/chromium/1312/Source/WebCore/rendering/InlineFlowBox.h Diff Modified: branches/chromium/1312/Source/WebCore/ChangeLog (140041 => 140042) --- branches/chromium/1312/Source/WebCore/ChangeLog 2013-01-17 22:23:29 UTC (rev 140041) +++ branches/chromium/1312/Source/WebCore/ChangeLog 2013-01-17 22:28:54 UTC (rev 140042) @@ -1,3 +1,27 @@ +2013-01-17 Shawn Singh shawnsi...@chromium.org + +Fix subpixel rounding bug that caused bad rendering on giftcards.com + +unreviewed, manual merge of existing fixes from trunk. +This patch also thanks to e...@chromium.org + +A subtle bug was causing InlineFlowBox to use integers rather than +fractional layouts. This caused invalid rects that in some cases +such as giftcards.com caused the entire page to render +incorrectly. On trunk, it was fixed indirectly by a series of +patches by e...@chromium.org. Instead of merging those hefty +patches, this patch manually does the same effect, replacing +enclosingIntRect with enclosingFractionalLayoutRect. + +Original bugfix: r133903 +Dependency on the bugfix: r133779 + +* rendering/InlineFlowBox.h: +(WebCore::InlineFlowBox::layoutOverflowRect): +(WebCore::InlineFlowBox::visualOverflowRect): These instances of +enclosingLayoutRect were wrapping enclosingIntRect. but they +should be using enclosingFractionalLayoutRect instead. + 2012-12-19 Levi Weintraub le...@chromium.org Push pixel snapping logic into TransformState Modified: branches/chromium/1312/Source/WebCore/rendering/InlineFlowBox.h (140041 => 140042) --- branches/chromium/1312/Source/WebCore/rendering/InlineFlowBox.h 2013-01-17 22:23:29 UTC (rev 140041) +++ branches/chromium/1312/Source/WebCore/rendering/InlineFlowBox.h 2013-01-17 22:28:54 UTC (rev 140042) @@ -209,7 +209,7 @@ // respectively are flipped when compared to their physical counterparts. For example minX is on the left in vertical-lr, but it is on the right in vertical-rl. LayoutRect layoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const { -return m_overflow ? m_overflow-layoutOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom)); +return m_overflow ? m_overflow-layoutOverflowRect() : enclosingFractionalLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom)); } LayoutUnit logicalLeftLayoutOverflow() const { @@ -243,7 +243,7 @@ LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) const { -return m_overflow ? m_overflow-visualOverflowRect() : enclosingLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom)); +return m_overflow ? m_overflow-visualOverflowRect() : enclosingFractionalLayoutRect(frameRectIncludingLineHeight(lineTop, lineBottom)); } LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-visualOverflowRect().x() : m_overflow-visualOverflowRect().y()) : static_castLayoutUnit(logicalLeft()); } LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHorizontal() ? m_overflow-visualOverflowRect().maxX() : m_overflow-visualOverflowRect().maxY()) : static_castLayoutUnit(ceilf(logicalRight())); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [127017] trunk/Source
Title: [127017] trunk/Source Revision 127017 Author shawnsi...@chromium.org Date 2012-08-29 10:40:40 -0700 (Wed, 29 Aug 2012) Log Message [chromium] Do not clip root layer's subtree to viewport https://bugs.webkit.org/show_bug.cgi?id=95235 Reviewed by Adrienne Walker. Source/WebCore: The root layer's renderSurface already correctly clips everything to the viewport's bounds. There are some useful reasons that we should not cause the root layer itself to clip the subtree any further, in particular so that surfaces can remain more cacheable, and to make root layer semantics more homogeneous. Existing tests updated, and otherwise this change is already covered by layout and unit tests. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): Source/WebKit/chromium: Existing tests updated, and otherwise this change is already covered by layout and unit tests. * tests/CCLayerTreeHostCommonTest.cpp: * tests/CCOcclusionTrackerTest.cpp: (WebKitTests::CCOcclusionTrackerTestChildInRotatedChild::runMyTest): (WebKitTests::CCOcclusionTrackerTestVisitTargetTwoTimes::runMyTest): (WebKitTests::CCOcclusionTrackerTestSurfaceWithTwoOpaqueChildren::runMyTest): (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblings::runMyTest): (WebKitTests::CCOcclusionTrackerTestOverlappingSurfaceSiblingsWithTwoTransforms::runMyTest): (WebKitTests::CCOcclusionTrackerTestFilters::runMyTest): (WebKitTests::CCOcclusionTrackerTestReplicaWithClipping::runMyTest): (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest): (WebKitTests::CCOcclusionTrackerTestSurfaceOcclusionTranslatesWithClipping::runMyTest): (WebKitTests::CCOcclusionTrackerTestSurfaceChildOfClippingSurface::runMyTest): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp trunk/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (127016 => 127017) --- trunk/Source/WebCore/ChangeLog 2012-08-29 17:38:47 UTC (rev 127016) +++ trunk/Source/WebCore/ChangeLog 2012-08-29 17:40:40 UTC (rev 127017) @@ -1,3 +1,22 @@ +2012-08-28 Shawn Singh shawnsi...@chromium.org + +[chromium] Do not clip root layer's subtree to viewport +https://bugs.webkit.org/show_bug.cgi?id=95235 + +Reviewed by Adrienne Walker. + +The root layer's renderSurface already correctly clips everything +to the viewport's bounds. There are some useful reasons that we +should not cause the root layer itself to clip the subtree any +further, in particular so that surfaces can remain more cacheable, +and to make root layer semantics more homogeneous. + +Existing tests updated, and otherwise this change is already +covered by layout and unit tests. + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::calculateDrawTransformsInternal): + 2012-08-28 David Hyatt hy...@apple.com [New Multicolumn] Implement column contents painting. Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (127016 => 127017) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-29 17:38:47 UTC (rev 127016) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-29 17:40:40 UTC (rev 127017) @@ -613,15 +613,12 @@ // Layers that are not their own renderTarget will render into the target of their nearest ancestor. layer-setRenderTarget(layer-parent()-renderTarget()); } else { -// FIXME: This root layer special case code should eventually go away. But before that is truly possible, -//tests (or code) related to CCOcclusionTracker need to be adjusted so that they do not require -//the rootLayer to clip; the root layer's RenderSurface would already clip and should be enough. +// FIXME: This root layer special case code should eventually go away. https://bugs.webkit.org/show_bug.cgi?id=92290 ASSERT(!layer-parent()); ASSERT(layer-renderSurface()); ASSERT(ancestorClipsSubtree); layer-renderSurface()-setClipRect(clipRectFromAncestor); -subtreeShouldBeClipped = true; -clipRectForSubtree = clipRectFromAncestor; +subtreeShouldBeClipped = false; } } Modified: trunk/Source/WebKit/chromium/ChangeLog (127016 => 127017) --- trunk/Source/WebKit/chromium/ChangeLog 2012-08-29 17:38:47 UTC (rev 127016) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-29 17:40:40 UTC (rev 127017) @@ -1,3 +1,26 @@ +2012-08-28 Shawn Singh shawnsi...@chromium.org + +[chromium] Do not clip root layer's subtree to viewport +
[webkit-changes] [127055] trunk/Source/WebKit/chromium
Title: [127055] trunk/Source/WebKit/chromium Revision 127055 Author shawnsi...@chromium.org Date 2012-08-29 15:01:22 -0700 (Wed, 29 Aug 2012) Log Message [chromium] Add more unit test coverage for semantics of drawableContentRect and visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=94542 Reviewed by Adrienne Walker. To make upcoming refactors safer, it was appropriate to (finally) add unit tests that check the behavior of drawableContentRect and visibleContentRect computations in calculateDrawTransforms. * tests/CCLayerTreeHostCommonTest.cpp: Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (127054 => 127055) --- trunk/Source/WebKit/chromium/ChangeLog 2012-08-29 21:58:58 UTC (rev 127054) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-29 22:01:22 UTC (rev 127055) @@ -1,3 +1,16 @@ +2012-08-29 Shawn Singh shawnsi...@chromium.org + +[chromium] Add more unit test coverage for semantics of drawableContentRect and visibleContentRect +https://bugs.webkit.org/show_bug.cgi?id=94542 + +Reviewed by Adrienne Walker. + +To make upcoming refactors safer, it was appropriate to (finally) +add unit tests that check the behavior of drawableContentRect and +visibleContentRect computations in calculateDrawTransforms. + +* tests/CCLayerTreeHostCommonTest.cpp: + 2012-08-29 W. James MacLean wjmacl...@chromium.org [chromium] Link highlight should clear on page navigation. Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (127054 => 127055) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-29 21:58:58 UTC (rev 127054) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-29 22:01:22 UTC (rev 127055) @@ -1954,6 +1954,312 @@ EXPECT_INT_RECT_EQ(expected, actual); } +TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForSimpleLayers) +{ +RefPtrLayerChromium root = LayerChromium::create(); +RefPtrLayerChromiumWithForcedDrawsContent child1 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent child2 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent child3 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +root-addChild(child1); +root-addChild(child2); +root-addChild(child3); + +WebTransformationMatrix identityMatrix; +setLayerPropertiesForTesting(root.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false); +setLayerPropertiesForTesting(child1.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(50, 50), false); +setLayerPropertiesForTesting(child2.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(75, 75), IntSize(50, 50), false); +setLayerPropertiesForTesting(child3.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(125, 125), IntSize(50, 50), false); + +executeCalculateDrawTransformsAndVisibility(root.get()); + +EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root-renderSurface()-drawableContentRect()); +EXPECT_INT_RECT_EQ(IntRect(0, 0, 100, 100), root-drawableContentRect()); + +// Layers that do not draw content should have empty visibleContentRects. +EXPECT_INT_RECT_EQ(IntRect(0, 0, 0, 0), root-visibleContentRect()); + +// layer visibleContentRects are clipped by their targetSurface +EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1-visibleContentRect()); +EXPECT_INT_RECT_EQ(IntRect(0, 0, 25, 25), child2-visibleContentRect()); +EXPECT_TRUE(child3-visibleContentRect().isEmpty()); + +// layer drawableContentRects are not clipped. +EXPECT_INT_RECT_EQ(IntRect(0, 0, 50, 50), child1-drawableContentRect()); +EXPECT_INT_RECT_EQ(IntRect(75, 75, 50, 50), child2-drawableContentRect()); +EXPECT_INT_RECT_EQ(IntRect(125, 125, 50, 50), child3-drawableContentRect()); +} + +TEST(CCLayerTreeHostCommonTest, verifyDrawableAndVisibleContentRectsForLayersClippedByLayer) +{ +RefPtrLayerChromium root = LayerChromium::create(); +RefPtrLayerChromium child = LayerChromium::create(); +RefPtrLayerChromiumWithForcedDrawsContent grandChild1 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent grandChild2 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent grandChild3 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +root-addChild(child); +child-addChild(grandChild1); +child-addChild(grandChild2); +child-addChild(grandChild3); + +WebTransformationMatrix identityMatrix; +setLayerPropertiesForTesting(root.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100),
[webkit-changes] [126075] trunk/Source/WebKit/chromium
Title: [126075] trunk/Source/WebKit/chromium Revision 126075 Author shawnsi...@chromium.org Date 2012-08-20 14:50:21 -0700 (Mon, 20 Aug 2012) Log Message [chromium] CCMathUtilTest.smallestAngleBetweenVectors unit test failing https://bugs.webkit.org/show_bug.cgi?id=94502 Reviewed by Kenneth Russell. The test needed to use EXPECT_FLOAT_EQ instead of EXPECT_EQ. In this patch, the test is also re-enabled. * tests/CCMathUtilTest.cpp: Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (126074 => 126075) --- trunk/Source/WebKit/chromium/ChangeLog 2012-08-20 21:41:02 UTC (rev 126074) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-20 21:50:21 UTC (rev 126075) @@ -1,3 +1,15 @@ +2012-08-20 Shawn Singh shawnsi...@chromium.org + +[chromium] CCMathUtilTest.smallestAngleBetweenVectors unit test failing +https://bugs.webkit.org/show_bug.cgi?id=94502 + +Reviewed by Kenneth Russell. + +The test needed to use EXPECT_FLOAT_EQ instead of EXPECT_EQ. In +this patch, the test is also re-enabled. + +* tests/CCMathUtilTest.cpp: + 2012-08-20 Leandro Gracia Gil leandrogra...@chromium.org Move transformFriendlyBoundingBox out of Range Modified: trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp (126074 => 126075) --- trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp 2012-08-20 21:41:02 UTC (rev 126074) +++ trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp 2012-08-20 21:50:21 UTC (rev 126075) @@ -152,8 +152,7 @@ EXPECT_FLOAT_RECT_EQ(FloatRect(FloatPoint(-100, -100), FloatSize(90, 90)), result); } -// http://webkit.org/b/94502 -TEST(CCMathUtilTest, DISABLED_smallestAngleBetweenVectors) +TEST(CCMathUtilTest, smallestAngleBetweenVectors) { FloatSize x(1, 0); FloatSize y(0, 1); @@ -168,13 +167,13 @@ EXPECT_EQ(0, CCMathUtil::smallestAngleBetweenVectors(testVector, testVector)); // Parallel but reversed vectors are at 180 degrees. -EXPECT_EQ(180, CCMathUtil::smallestAngleBetweenVectors(x, -x)); -EXPECT_EQ(180, CCMathUtil::smallestAngleBetweenVectors(y, -y)); -EXPECT_EQ(180, CCMathUtil::smallestAngleBetweenVectors(testVector, -testVector)); +EXPECT_FLOAT_EQ(180, CCMathUtil::smallestAngleBetweenVectors(x, -x)); +EXPECT_FLOAT_EQ(180, CCMathUtil::smallestAngleBetweenVectors(y, -y)); +EXPECT_FLOAT_EQ(180, CCMathUtil::smallestAngleBetweenVectors(testVector, -testVector)); // The test vector is at a known angle. -EXPECT_EQ(45, floor(CCMathUtil::smallestAngleBetweenVectors(testVector, x))); -EXPECT_EQ(45, floor(CCMathUtil::smallestAngleBetweenVectors(testVector, y))); +EXPECT_FLOAT_EQ(45, floor(CCMathUtil::smallestAngleBetweenVectors(testVector, x))); +EXPECT_FLOAT_EQ(45, floor(CCMathUtil::smallestAngleBetweenVectors(testVector, y))); } TEST(CCMathUtilTest, vectorProjection) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [125758] trunk
Title: [125758] trunk Revision 125758 Author shawnsi...@chromium.org Date 2012-08-16 01:50:21 -0700 (Thu, 16 Aug 2012) Log Message [chromium] set scissorRect per quad so that quads are correctly clipped https://bugs.webkit.org/show_bug.cgi?id=94050 Reviewed by Adrienne Walker. Source/WebCore: Certain quad types rely on scissoring to do correct clipping. Refactoring the quad types to remove this assumption will be done in a later patch, but for now, we have to apply the scissor rect to every quad to ensure that those quads are correctly clipped. Test: compositing/overflow/overflow-hidden-canvas-layer.html Also updated two unit tests to reflect the change in semantics. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPass): (WebCore::LayerRendererChromium::drawQuad): Source/WebKit/chromium: Updated two unit tests to reflect that we need to always scissor, until we refactor so that quads do not depend on scissoring. * tests/CCLayerTreeHostImplTest.cpp: LayoutTests: * compositing/overflow/overflow-hidden-canvas-layer-expected.png: Added. * compositing/overflow/overflow-hidden-canvas-layer-expected.txt: Added. * compositing/overflow/overflow-hidden-canvas-layer.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp Added Paths trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.png trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.txt trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer.html trunk/LayoutTests/platform/chromium-linux/compositing/overflow/overflow-hidden-canvas-layer-expected.txt Diff Modified: trunk/LayoutTests/ChangeLog (125757 => 125758) --- trunk/LayoutTests/ChangeLog 2012-08-16 08:07:51 UTC (rev 125757) +++ trunk/LayoutTests/ChangeLog 2012-08-16 08:50:21 UTC (rev 125758) @@ -1,3 +1,14 @@ +2012-08-15 Shawn Singh shawnsi...@chromium.org + +[chromium] set scissorRect per quad so that quads are correctly clipped +https://bugs.webkit.org/show_bug.cgi?id=94050 + +Reviewed by Adrienne Walker. + +* compositing/overflow/overflow-hidden-canvas-layer-expected.png: Added. +* compositing/overflow/overflow-hidden-canvas-layer-expected.txt: Added. +* compositing/overflow/overflow-hidden-canvas-layer.html: Added. + 2012-08-16 Zan Dobersek zandober...@gmail.com Unreviewed GTK gardening. Added: trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.png (Binary files differ) Property changes on: trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.png ___ Added: svn:mime-type Added: trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.txt (0 => 125758) --- trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.txt (rev 0) +++ trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer-expected.txt 2012-08-16 08:50:21 UTC (rev 125758) @@ -0,0 +1,10 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x216 + RenderBlock {HTML} at (0,0) size 800x216 +RenderBody {BODY} at (8,8) size 784x200 +layer at (8,8) size 200x200 scrollWidth 400 scrollHeight 404 + RenderBlock {DIV} at (0,0) size 200x200 +RenderText {#text} at (0,0) size 0x0 +layer at (8,8) size 400x400 backgroundClip at (8,8) size 200x200 clip at (8,8) size 200x200 outlineClip at (8,8) size 200x200 + RenderHTMLCanvas {CANVAS} at (0,0) size 400x400 Added: trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer.html (0 => 125758) --- trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer.html (rev 0) +++ trunk/LayoutTests/compositing/overflow/overflow-hidden-canvas-layer.html 2012-08-16 08:50:21 UTC (rev 125758) @@ -0,0 +1,33 @@ +!DOCTYPE html +html +head + style type=text/css + .clippingContainer { +width: 200px; +height: 200px; +overflow: hidden; + } + + /style + + script +function drawCanvas() +{ +var canvas = document.getElementById(clippedCanvas); +var context = canvas.getContext(2d); +context.fillStyle = red; +context.fillRect(0, 0, 400, 400); +context.fillStyle = green; +context.fillRect(0, 0, 200, 200); +} + /script +/head + +body _onload_=drawCanvas() + div class=clippingContainer +canvas id=clippedCanvas width=400 height=400 +/canvas + /div +/body + +/html Added: trunk/LayoutTests/platform/chromium-linux/compositing/overflow/overflow-hidden-canvas-layer-expected.txt (0 => 125758) ---
[webkit-changes] [125579] branches/chromium/1229/Source
Title: [125579] branches/chromium/1229/Source Revision 125579 Author shawnsi...@chromium.org Date 2012-08-14 10:46:23 -0700 (Tue, 14 Aug 2012) Log Message Merge 125486 - [chromium] renderSurface in incorrect space if owning layer has empty but non-zero bounds https://bugs.webkit.org/show_bug.cgi?id=93795 Reviewed by Adrienne Walker. Source/WebCore: If a renderSurface is created by a layer that had zero area (empty) but non-zero bounds (either width or height was non-zero), then one translation transform was accidentally being skipped, causing the renderSurface drawTransform to be incorrect. The fix is simply to move that transform outside of the if-statement so it is not skipped. Unit test added: CCLayerTreeHostCommonTest.verifyTransformsForDegenerateIntermediateLayer() * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: TBR=shawnsi...@chromium.org Review URL: https://chromiumcodereview.appspot.com/10829322 Modified Paths branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp branches/chromium/1229/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (125578 => 125579) --- branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-14 17:36:45 UTC (rev 125578) +++ branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-14 17:46:23 UTC (rev 125579) @@ -546,10 +546,10 @@ // The drawTransform that gets computed below is effectively the layer's drawTransform, unless // the layer itself creates a renderSurface. In that case, the renderSurface re-parents the transforms. WebTransformationMatrix drawTransform = combinedTransform; +// M[draw] = M[parent] * LT * Tr[anchor2center] * Tr[center2origin] +drawTransform.translate(-layer-bounds().width() / 2.0, -layer-bounds().height() / 2.0); if (!layer-contentBounds().isEmpty() !layer-bounds().isEmpty()) { -// M[draw] = M[parent] * LT * Tr[anchor2center] * Tr[center2anchor] -drawTransform.translate(-layer-bounds().width() / 2.0, -layer-bounds().height() / 2.0); -// M[draw] = M[parent] * LT * Tr[anchor2origin] * S[content2layer] +// M[draw] = M[parent] * LT * Tr[anchor2origin] * S[layer2content] drawTransform.scaleNonUniform(layer-bounds().width() / static_castdouble(layer-contentBounds().width()), layer-bounds().height() / static_castdouble(layer-contentBounds().height())); } Modified: branches/chromium/1229/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (125578 => 125579) --- branches/chromium/1229/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-14 17:36:45 UTC (rev 125578) +++ branches/chromium/1229/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-14 17:46:23 UTC (rev 125579) @@ -948,6 +948,36 @@ EXPECT_TRANSFORMATION_MATRIX_EQ(expectedGrandChildScreenSpaceTransform, grandChild-screenSpaceTransform()); } +TEST(CCLayerTreeHostCommonTest, verifyTransformsForDegenerateIntermediateLayer) +{ +// A layer that is empty in one axis, but not the other, was accidentally skipping a necessary translation. +// Without that translation, the coordinate space of the layer's drawTransform is incorrect. +// +// Normally this isn't a problem, because the layer wouldn't be drawn anyway, but if that layer becomes a renderSurface, then +// its drawTransform is implicitly inherited by the rest of the subtree, which then is positioned incorrectly as a result. + +RefPtrLayerChromium root = LayerChromium::create(); +RefPtrLayerChromium child = LayerChromium::create(); +RefPtrLayerChromiumWithForcedDrawsContent grandChild = adoptRef(new LayerChromiumWithForcedDrawsContent()); + +// The child height is zero, but has non-zero width that should be accounted for while computing drawTransforms. +const WebTransformationMatrix identityMatrix; +setLayerPropertiesForTesting(root.get(), identityMatrix, identityMatrix, FloatPoint::zero(), FloatPoint::zero(), IntSize(100, 100), false); +setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint::zero(), FloatPoint::zero(), IntSize(10, 0), false); +setLayerPropertiesForTesting(grandChild.get(), identityMatrix, identityMatrix, FloatPoint::zero(), FloatPoint::zero(), IntSize(10, 10), false); + +root-addChild(child); +child-addChild(grandChild); +child-setForceRenderSurface(true); + +executeCalculateDrawTransformsAndVisibility(root.get()); + +ASSERT_TRUE(child-renderSurface()); +EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, child-renderSurface()-drawTransform()); // This is the real test, the rest are sanity
[webkit-changes] [125474] branches/chromium/1229
Title: [125474] branches/chromium/1229 Revision 125474 Author shawnsi...@chromium.org Date 2012-08-13 17:33:47 -0700 (Mon, 13 Aug 2012) Log Message Merge 125193 - [chromium] Pass mask scale and offset to shaders for correct masking https://bugs.webkit.org/show_bug.cgi?id=93558 Reviewed by Adrienne Walker. Source/WebCore: In chromium compositor code, the mask was accidentally mapped 1:1 to the layer's renderSurface, rather than the layer itself. This patch adds a layout test that reproduces the error and fixes the problem. The solution we opted for in this patch is to pass a scale and offset to the fragment shader, so that the correct texture coordinate lookup is computed by the fragment shader. Test: compositing/masks/mask-of-clipped-layer.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::FragmentShaderRGBATexAlphaMask::FragmentShaderRGBATexAlphaMask): (WebCore::FragmentShaderRGBATexAlphaMask::init): (WebCore::FragmentShaderRGBATexAlphaMask::getShaderString): (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::FragmentShaderRGBATexAlphaMask::maskTexCoordScaleLocation): (WebCore::FragmentShaderRGBATexAlphaMask::maskTexCoordOffsetLocation): (FragmentShaderRGBATexAlphaMask): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskTexCoordScaleLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskTexCoordOffsetLocation): (FragmentShaderRGBATexAlphaMaskAA): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::maskTexCoordScaleX): (WebCore::CCRenderPassDrawQuad::maskTexCoordScaleY): (WebCore::CCRenderPassDrawQuad::maskTexCoordOffsetX): (WebCore::CCRenderPassDrawQuad::maskTexCoordOffsetY): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): Source/WebKit/chromium: Updated one unit test that needed additional args in a constructor, but no change in behavior of the test. * tests/CCLayerTreeHostImplTest.cpp: LayoutTests: Added a layout test that checks the mask does not accidentally get resized when it is inside of an overflow div. * compositing/masks/mask-of-clipped-layer-expected.png: Added. * compositing/masks/mask-of-clipped-layer-expected.txt: Added. * compositing/masks/mask-of-clipped-layer.html: Added. * compositing/resources/alpha-blocks.png: Added. TBR=shawnsi...@chromium.org Modified Paths branches/chromium/1229/LayoutTests/platform/chromium/TestExpectations branches/chromium/1229/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp branches/chromium/1229/Source/WebCore/platform/graphics/chromium/ShaderChromium.cpp branches/chromium/1229/Source/WebCore/platform/graphics/chromium/ShaderChromium.h branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCRenderPassDrawQuad.h branches/chromium/1229/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp branches/chromium/1229/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp Added Paths branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.png branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.txt branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer.html branches/chromium/1229/LayoutTests/compositing/resources/alpha-blocks.png Diff Copied: branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.png (from rev 125193, trunk/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.png) (Binary files differ) Copied: branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.txt (from rev 125193, trunk/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.txt) (0 => 125474) --- branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.txt (rev 0) +++ branches/chromium/1229/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.txt 2012-08-14 00:33:47 UTC (rev 125474) @@ -0,0 +1,10 @@ +layer at (0,0) size 800x600 + RenderView at (0,0) size 800x600 +layer at (0,0) size 800x216 + RenderBlock {HTML} at (0,0) size 800x216 +RenderBody {BODY} at (8,8) size 784x200 +layer at (8,8) size 200x200 scrollWidth 300 scrollHeight 300 + RenderBlock {DIV} at (0,0) size 200x200 [bgcolor=#FF] +RenderBlock {DIV} at (0,0) size 140x140 [bgcolor=#FF] +layer at (8,8) size 300x300 backgroundClip at (8,8) size 200x200 clip at (8,8) size
[webkit-changes] [125486] trunk/Source
Title: [125486] trunk/Source Revision 125486 Author shawnsi...@chromium.org Date 2012-08-13 18:03:48 -0700 (Mon, 13 Aug 2012) Log Message [chromium] renderSurface in incorrect space if owning layer has empty but non-zero bounds https://bugs.webkit.org/show_bug.cgi?id=93795 Reviewed by Adrienne Walker. Source/WebCore: If a renderSurface is created by a layer that had zero area (empty) but non-zero bounds (either width or height was non-zero), then one translation transform was accidentally being skipped, causing the renderSurface drawTransform to be incorrect. The fix is simply to move that transform outside of the if-statement so it is not skipped. Unit test added: CCLayerTreeHostCommonTest.verifyTransformsForDegenerateIntermediateLayer() * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (125485 => 125486) --- trunk/Source/WebCore/ChangeLog 2012-08-14 00:57:27 UTC (rev 125485) +++ trunk/Source/WebCore/ChangeLog 2012-08-14 01:03:48 UTC (rev 125486) @@ -1,3 +1,23 @@ +2012-08-12 Shawn Singh shawnsi...@chromium.org + +[chromium] renderSurface in incorrect space if owning layer has empty but non-zero bounds +https://bugs.webkit.org/show_bug.cgi?id=93795 + +Reviewed by Adrienne Walker. + +If a renderSurface is created by a layer that had zero +area (empty) but non-zero bounds (either width or height was +non-zero), then one translation transform was accidentally being +skipped, causing the renderSurface drawTransform to be incorrect. +The fix is simply to move that transform outside of the +if-statement so it is not skipped. + +Unit test added: + CCLayerTreeHostCommonTest.verifyTransformsForDegenerateIntermediateLayer() + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::calculateDrawTransformsInternal): + 2012-08-13 Kentaro Hara hara...@chromium.org [V8] Remove [TreatReturnedNullAs=False] Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (125485 => 125486) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-14 00:57:27 UTC (rev 125485) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-08-14 01:03:48 UTC (rev 125486) @@ -502,10 +502,10 @@ // The drawTransform that gets computed below is effectively the layer's drawTransform, unless // the layer itself creates a renderSurface. In that case, the renderSurface re-parents the transforms. WebTransformationMatrix drawTransform = combinedTransform; +// M[draw] = M[parent] * LT * Tr[anchor2center] * Tr[center2origin] +drawTransform.translate(-layer-bounds().width() / 2.0, -layer-bounds().height() / 2.0); if (!layer-contentBounds().isEmpty() !layer-bounds().isEmpty()) { -// M[draw] = M[parent] * LT * Tr[anchor2center] * Tr[center2anchor] -drawTransform.translate(-layer-bounds().width() / 2.0, -layer-bounds().height() / 2.0); -// M[draw] = M[parent] * LT * Tr[anchor2origin] * S[content2layer] +// M[draw] = M[parent] * LT * Tr[anchor2origin] * S[layer2content] drawTransform.scaleNonUniform(layer-bounds().width() / static_castdouble(layer-contentBounds().width()), layer-bounds().height() / static_castdouble(layer-contentBounds().height())); } Modified: trunk/Source/WebKit/chromium/ChangeLog (125485 => 125486) --- trunk/Source/WebKit/chromium/ChangeLog 2012-08-14 00:57:27 UTC (rev 125485) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-08-14 01:03:48 UTC (rev 125486) @@ -1,3 +1,12 @@ +2012-08-12 Shawn Singh shawnsi...@chromium.org + +[chromium] renderSurface in incorrect space if owning layer has empty but non-zero bounds +https://bugs.webkit.org/show_bug.cgi?id=93795 + +Reviewed by Adrienne Walker. + +* tests/CCLayerTreeHostCommonTest.cpp: + 2012-08-13 James Robinson jam...@chromium.org [chromium] Make WebAnimation a pure virtual interface to hide implementation and avoid unresolved symbols Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (125485 => 125486) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-14 00:57:27 UTC (rev 125485) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-08-14 01:03:48 UTC (rev 125486) @@ -609,6 +609,36 @@ EXPECT_TRANSFORMATION_MATRIX_EQ(expectedGrandChildScreenSpaceTransform, grandChild-screenSpaceTransform()); }
[webkit-changes] [125490] trunk/LayoutTests
Title: [125490] trunk/LayoutTests Revision 125490 Author shawnsi...@chromium.org Date 2012-08-13 18:29:31 -0700 (Mon, 13 Aug 2012) Log Message Unreviewed rebaseline after r125193. * platform/chromium-mac/compositing/masks/layer-mask-placement-expected.png: * platform/chromium-win/compositing/masks/layer-mask-placement-expected.png: * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations trunk/LayoutTests/platform/chromium-mac/compositing/masks/layer-mask-placement-expected.png trunk/LayoutTests/platform/chromium-win/compositing/masks/layer-mask-placement-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (125489 => 125490) --- trunk/LayoutTests/ChangeLog 2012-08-14 01:27:21 UTC (rev 125489) +++ trunk/LayoutTests/ChangeLog 2012-08-14 01:29:31 UTC (rev 125490) @@ -1,3 +1,11 @@ +2012-08-13 Shawn Singh shawnsi...@chromium.org + +Unreviewed rebaseline after r125193. + +* platform/chromium-mac/compositing/masks/layer-mask-placement-expected.png: +* platform/chromium-win/compositing/masks/layer-mask-placement-expected.png: +* platform/chromium/TestExpectations: + 2012-08-13 Eric Seidel e...@webkit.org Add test to demonstrate overpainting seen in bug 92800 Modified: trunk/LayoutTests/platform/chromium/TestExpectations (125489 => 125490) --- trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-14 01:27:21 UTC (rev 125489) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-08-14 01:29:31 UTC (rev 125490) @@ -3498,9 +3498,6 @@ BUGWK93569 DEBUG : http/tests/navigation/lockedhistory-iframe.html = PASS TIMEOUT TEXT BUGWK93568 DEBUG : http/tests/misc/window-dot-stop.html = PASS TEXT -// Should only need rebaselining after bug 93558, if both squares are fully green. -BUGWK93558 : compositing/masks/layer-mask-placement.html = IMAGE - // V8 does not support static attributes BUGWK93488 SKIP : fast/notifications/notifications-permission.html = TEXT Modified: trunk/LayoutTests/platform/chromium-mac/compositing/masks/layer-mask-placement-expected.png (Binary files differ) Modified: trunk/LayoutTests/platform/chromium-win/compositing/masks/layer-mask-placement-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [125193] trunk
Title: [125193] trunk Revision 125193 Author shawnsi...@chromium.org Date 2012-08-09 12:39:24 -0700 (Thu, 09 Aug 2012) Log Message [chromium] Pass mask scale and offset to shaders for correct masking https://bugs.webkit.org/show_bug.cgi?id=93558 Reviewed by Adrienne Walker. Source/WebCore: In chromium compositor code, the mask was accidentally mapped 1:1 to the layer's renderSurface, rather than the layer itself. This patch adds a layout test that reproduces the error and fixes the problem. The solution we opted for in this patch is to pass a scale and offset to the fragment shader, so that the correct texture coordinate lookup is computed by the fragment shader. Test: compositing/masks/mask-of-clipped-layer.html * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): * platform/graphics/chromium/ShaderChromium.cpp: (WebCore::FragmentShaderRGBATexAlphaMask::FragmentShaderRGBATexAlphaMask): (WebCore::FragmentShaderRGBATexAlphaMask::init): (WebCore::FragmentShaderRGBATexAlphaMask::getShaderString): (WebCore::FragmentShaderRGBATexAlphaMaskAA::FragmentShaderRGBATexAlphaMaskAA): (WebCore::FragmentShaderRGBATexAlphaMaskAA::init): (WebCore::FragmentShaderRGBATexAlphaMaskAA::getShaderString): * platform/graphics/chromium/ShaderChromium.h: (WebCore::FragmentShaderRGBATexAlphaMask::maskTexCoordScaleLocation): (WebCore::FragmentShaderRGBATexAlphaMask::maskTexCoordOffsetLocation): (FragmentShaderRGBATexAlphaMask): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskTexCoordScaleLocation): (WebCore::FragmentShaderRGBATexAlphaMaskAA::maskTexCoordOffsetLocation): (FragmentShaderRGBATexAlphaMaskAA): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp: (WebCore::CCRenderPassDrawQuad::create): (WebCore::CCRenderPassDrawQuad::CCRenderPassDrawQuad): * platform/graphics/chromium/cc/CCRenderPassDrawQuad.h: (CCRenderPassDrawQuad): (WebCore::CCRenderPassDrawQuad::maskTexCoordScaleX): (WebCore::CCRenderPassDrawQuad::maskTexCoordScaleY): (WebCore::CCRenderPassDrawQuad::maskTexCoordOffsetX): (WebCore::CCRenderPassDrawQuad::maskTexCoordOffsetY): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::appendQuads): Source/WebKit/chromium: Updated one unit test that needed additional args in a constructor, but no change in behavior of the test. * tests/CCLayerTreeHostImplTest.cpp: LayoutTests: Added a layout test that checks the mask does not accidentally get resized when it is inside of an overflow div. * compositing/masks/mask-of-clipped-layer-expected.png: Added. * compositing/masks/mask-of-clipped-layer-expected.txt: Added. * compositing/masks/mask-of-clipped-layer.html: Added. * compositing/resources/alpha-blocks.png: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/ShaderChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/ShaderChromium.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderPassDrawQuad.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderPassDrawQuad.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp Added Paths trunk/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.png trunk/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.txt trunk/LayoutTests/compositing/masks/mask-of-clipped-layer.html trunk/LayoutTests/compositing/resources/alpha-blocks.png Diff Modified: trunk/LayoutTests/ChangeLog (125192 => 125193) --- trunk/LayoutTests/ChangeLog 2012-08-09 19:13:22 UTC (rev 125192) +++ trunk/LayoutTests/ChangeLog 2012-08-09 19:39:24 UTC (rev 125193) @@ -1,3 +1,18 @@ +2012-08-09 Shawn Singh shawnsi...@chromium.org + +[chromium] Pass mask scale and offset to shaders for correct masking +https://bugs.webkit.org/show_bug.cgi?id=93558 + +Reviewed by Adrienne Walker. + +Added a layout test that checks the mask does not accidentally get +resized when it is inside of an overflow div. + +* compositing/masks/mask-of-clipped-layer-expected.png: Added. +* compositing/masks/mask-of-clipped-layer-expected.txt: Added. +* compositing/masks/mask-of-clipped-layer.html: Added. +* compositing/resources/alpha-blocks.png: Added. + 2012-08-09 Mihnea Ovidenie mih...@adobe.com CSSRegions: Crash when attaching a region to the removed named flow Added: trunk/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.png (Binary files differ) Property changes on: trunk/LayoutTests/compositing/masks/mask-of-clipped-layer-expected.png ___ Added: svn:mime-type Added:
[webkit-changes] [124270] trunk/Source
Title: [124270] trunk/Source Revision 124270 Author shawnsi...@chromium.org Date 2012-07-31 16:38:39 -0700 (Tue, 31 Jul 2012) Log Message [chromium] Hit test points are being clipped by layers that should not clip https://bugs.webkit.org/show_bug.cgi?id=92786 Reviewed by James Robinson. Source/WebCore: On impl-side hit testing for chromium compositor, we are accidentally checking all ancestor layers for clipping, instead of only layers that actually clip something. This patch fixes it. Added new unit test that reproduces the scenario: CCLayerTreeHostCommonTest.verifyHitTestingForNonClippingIntermediateLayer * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::pointIsClippedBySurfaceOrClipRect): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: adds a test where the hit-testable layer does not overlap its parent. The parent does not clip, so the layer should still be hittable. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (124269 => 124270) --- trunk/Source/WebCore/ChangeLog 2012-07-31 23:31:09 UTC (rev 124269) +++ trunk/Source/WebCore/ChangeLog 2012-07-31 23:38:39 UTC (rev 124270) @@ -1,3 +1,20 @@ +2012-07-31 Shawn Singh shawnsi...@chromium.org + +[chromium] Hit test points are being clipped by layers that should not clip +https://bugs.webkit.org/show_bug.cgi?id=92786 + +Reviewed by James Robinson. + +On impl-side hit testing for chromium compositor, we are +accidentally checking all ancestor layers for clipping, instead of +only layers that actually clip something. This patch fixes it. + +Added new unit test that reproduces the scenario: + CCLayerTreeHostCommonTest.verifyHitTestingForNonClippingIntermediateLayer + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::pointIsClippedBySurfaceOrClipRect): + 2012-07-31 James Robinson jam...@chromium.org [chromium] REGRESSION(r123644) Compositor HUD crashes immediately with --show-paint-rects Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (124269 => 124270) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-07-31 23:31:09 UTC (rev 124269) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-07-31 23:38:39 UTC (rev 124270) @@ -918,7 +918,7 @@ // Note that drawableContentRects are actually in targetSurface space, so the transform we // have to provide is the target surface's screenSpaceTransform. CCLayerImpl* renderTarget = currentLayer-renderTarget(); -if (!pointHitsRect(viewportPoint, renderTarget-renderSurface()-screenSpaceTransform(), currentLayer-drawableContentRect())) +if (layerClipsSubtree(currentLayer) !pointHitsRect(viewportPoint, renderTarget-renderSurface()-screenSpaceTransform(), currentLayer-drawableContentRect())) return true; currentLayer = currentLayer-parent(); Modified: trunk/Source/WebKit/chromium/ChangeLog (124269 => 124270) --- trunk/Source/WebKit/chromium/ChangeLog 2012-07-31 23:31:09 UTC (rev 124269) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-31 23:38:39 UTC (rev 124270) @@ -1,3 +1,14 @@ +2012-07-31 Shawn Singh shawnsi...@chromium.org + +[chromium] Hit test points are being clipped by layers that should not clip +https://bugs.webkit.org/show_bug.cgi?id=92786 + +Reviewed by James Robinson. + +* tests/CCLayerTreeHostCommonTest.cpp: adds a test where the + hit-testable layer does not overlap its parent. The parent does + not clip, so the layer should still be hittable. + 2012-07-31 Chris Rogers crog...@google.com Allow AudioDestination to support local/live audio input Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (124269 => 124270) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-07-31 23:31:09 UTC (rev 124269) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-07-31 23:38:39 UTC (rev 124270) @@ -3039,6 +3039,70 @@ EXPECT_EQ(2468, resultLayer-id()); } +TEST(CCLayerTreeHostCommonTest, verifyHitTestingForNonClippingIntermediateLayer) +{ +// This test checks that hit testing code does not accidentally clip to layer +// bounds for a layer that actually does not clip. +DebugScopedSetImplThread thisScopeIsOnImplThread; + +WebTransformationMatrix identityMatrix; +FloatPoint anchor(0, 0); + +OwnPtrCCLayerImpl root = CCLayerImpl::create(1); +setLayerPropertiesForTesting(root.get(), identityMatrix, identityMatrix, anchor, FloatPoint(0, 0), IntSize(100, 100), false); + +{ +
[webkit-changes] [123633] trunk/Source/WebCore
Title: [123633] trunk/Source/WebCore Revision 123633 Author shawnsi...@chromium.org Date 2012-07-25 10:43:51 -0700 (Wed, 25 Jul 2012) Log Message [chromium] Build fix for clang builds after r123628 https://bugs.webkit.org/show_bug.cgi?id=92266 Reviewed by Adrienne Walker. An un-used variable was causing build failures for clang builds after the refactoring in r123628. It is correct to simply remove this value. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsInternal): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (123632 => 123633) --- trunk/Source/WebCore/ChangeLog 2012-07-25 17:41:03 UTC (rev 123632) +++ trunk/Source/WebCore/ChangeLog 2012-07-25 17:43:51 UTC (rev 123633) @@ -1,3 +1,17 @@ +2012-07-25 Shawn Singh shawnsi...@chromium.org + +[chromium] Build fix for clang builds after r123628 +https://bugs.webkit.org/show_bug.cgi?id=92266 + +Reviewed by Adrienne Walker. + +An un-used variable was causing build failures for clang builds +after the refactoring in r123628. It is correct to simply remove +this value. + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::calculateDrawTransformsInternal): + 2012-07-25 Hans Wennborg h...@chromium.org Speech _javascript_ API: extract function from SpeechRecognitionResult::emma() Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (123632 => 123633) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-07-25 17:41:03 UTC (rev 123632) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-07-25 17:43:51 UTC (rev 123633) @@ -730,7 +730,6 @@ if (layer-renderSurface() layer != rootLayer) { RenderSurfaceType* renderSurface = layer-renderSurface(); IntRect clippedContentRect = localDrawableContentRectOfSubtree; -FloatPoint surfaceCenter = FloatRect(clippedContentRect).center(); // The render surface clipRect is expressed in the space where this surface draws, i.e. the same space as clipRectFromAncestor. if (ancestorClipsSubtree) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [123398] trunk/Source/WebKit/chromium
Title: [123398] trunk/Source/WebKit/chromium Revision 123398 Author shawnsi...@chromium.org Date 2012-07-23 16:06:13 -0700 (Mon, 23 Jul 2012) Log Message [chromium] Fix unit tests in debug mode after r123375 https://bugs.webkit.org/show_bug.cgi?id=92030 Reviewed by Adrienne Walker. Fixed two unit tests that were causing debug assertions because they gave calcDrawTransforms an empty sized root layer. * tests/CCLayerTreeHostCommonTest.cpp: Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (123397 => 123398) --- trunk/Source/WebKit/chromium/ChangeLog 2012-07-23 22:57:31 UTC (rev 123397) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-23 23:06:13 UTC (rev 123398) @@ -1,3 +1,15 @@ +2012-07-23 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix unit tests in debug mode after r123375 +https://bugs.webkit.org/show_bug.cgi?id=92030 + +Reviewed by Adrienne Walker. + +Fixed two unit tests that were causing debug assertions because +they gave calcDrawTransforms an empty sized root layer. + +* tests/CCLayerTreeHostCommonTest.cpp: + 2012-07-23 Simon Fraser simon.fra...@apple.com Part 2 of: Implement sticky positioning Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (123397 => 123398) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-07-23 22:57:31 UTC (rev 123397) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-07-23 23:06:13 UTC (rev 123398) @@ -160,14 +160,12 @@ child-addChild(grandChild); WebTransformationMatrix identityMatrix; -setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false); +setLayerPropertiesForTesting(parent.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false); setLayerPropertiesForTesting(child.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false); setLayerPropertiesForTesting(grandChild.get(), identityMatrix, identityMatrix, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false); executeCalculateDrawTransformsAndVisibility(parent.get()); -EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, parent-drawTransform()); -EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, parent-screenSpaceTransform()); EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, child-drawTransform()); EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, child-screenSpaceTransform()); EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, grandChild-drawTransform()); @@ -183,9 +181,11 @@ // Case 1: setting the sublayer transform should not affect this layer's draw transform or screen-space transform. WebTransformationMatrix arbitraryTranslation; arbitraryTranslation.translate(10, 20); -setLayerPropertiesForTesting(layer.get(), identityMatrix, arbitraryTranslation, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(0, 0), false); +setLayerPropertiesForTesting(layer.get(), identityMatrix, arbitraryTranslation, FloatPoint(0, 0), FloatPoint(0, 0), IntSize(100, 100), false); executeCalculateDrawTransformsAndVisibility(layer.get()); -EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, layer-drawTransform()); +WebTransformationMatrix expectedDrawTransform = identityMatrix; +expectedDrawTransform.translate(50, 50); +EXPECT_TRANSFORMATION_MATRIX_EQ(expectedDrawTransform, layer-drawTransform()); EXPECT_TRANSFORMATION_MATRIX_EQ(identityMatrix, layer-screenSpaceTransform()); // Case 2: setting the bounds of the layer should result in a draw transform that translates to half the width and height. ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [122619] trunk/Source/WebCore
Title: [122619] trunk/Source/WebCore Revision 122619 Author shawnsi...@chromium.org Date 2012-07-13 12:40:30 -0700 (Fri, 13 Jul 2012) Log Message [chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp https://bugs.webkit.org/show_bug.cgi?id=91260 Reviewed by Adrienne Walker. ASSERT(!clipped) was being triggered after skinny almost-degenerate quads went through anti-aliasing inflation, and then were being transformed back from device space to local space. It turns out this assertion is too aggressive, and we don't yet have an obvious need to change the behavior on the clipped==true case. No new tests needed, this patch fixes only comments and debug code. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::drawRenderPassQuad): fixed a comment. (WebCore::LayerRendererChromium::drawTileQuad): fixed a similar comment, removed unnecessary assertion. Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (122618 => 122619) --- trunk/Source/WebCore/ChangeLog 2012-07-13 19:11:12 UTC (rev 122618) +++ trunk/Source/WebCore/ChangeLog 2012-07-13 19:40:30 UTC (rev 122619) @@ -1,3 +1,25 @@ +2012-07-13 Shawn Singh shawnsi...@chromium.org + +[chromium] Remove incorrect debug assertion in LayerRendererChromium.cpp +https://bugs.webkit.org/show_bug.cgi?id=91260 + +Reviewed by Adrienne Walker. + +ASSERT(!clipped) was being triggered after skinny almost-degenerate +quads went through anti-aliasing inflation, and then were being +transformed back from device space to local space. It turns out +this assertion is too aggressive, and we don't yet have an obvious +need to change the behavior on the clipped==true case. + +No new tests needed, this patch fixes only comments and debug code. + +* platform/graphics/chromium/LayerRendererChromium.cpp: +(WebCore::LayerRendererChromium::drawRenderPassQuad): + fixed a comment. + +(WebCore::LayerRendererChromium::drawTileQuad): + fixed a similar comment, removed unnecessary assertion. + 2012-07-13 Philip Rogers p...@google.com Remove assert in localCoordinateSpaceTransform() Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (122618 => 122619) --- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2012-07-13 19:11:12 UTC (rev 122618) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2012-07-13 19:40:30 UTC (rev 122619) @@ -699,7 +699,7 @@ GLC(context(), context()-uniform3fv(shaderEdgeLocation, 8, edge)); } -// Map device space quad to surface space. contentsDeviceTransform has no perspective since it was generated with to2dTransform() so we don't need to project. +// Map device space quad to surface space. contentsDeviceTransform has no 3d component since it was generated with to2dTransform() so we don't need to project. FloatQuad surfaceQuad = CCMathUtil::mapQuad(contentsDeviceTransform.inverse(), deviceLayerEdges.floatQuad(), clipped); ASSERT(!clipped); @@ -879,10 +879,12 @@ // Create device space quad. CCLayerQuad deviceQuad(leftEdge, topEdge, rightEdge, bottomEdge); -// Map quad to layer space. +// Map device space quad to local space. contentsDeviceTransform has no 3d component since it was generated with to2dTransform() so we don't need to project. WebTransformationMatrix inverseDeviceTransform = deviceTransform.inverse(); localQuad = CCMathUtil::mapQuad(inverseDeviceTransform, deviceQuad.floatQuad(), clipped); -ASSERT(!clipped); + +// We should not ASSERT(!clipped) here, because anti-aliasing inflation may cause deviceQuad to become +// clipped. To our knowledge this scenario does not need to be handled differently than the unclipped case. } else { // Move fragment shader transform to vertex shader. We can do this while // still producing correct results as fragmentTexTransformLocation ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo/webkit-changes
[webkit-changes] [122348] trunk/Source/WebKit/chromium
Title: [122348] trunk/Source/WebKit/chromium Revision 122348 Author shawnsi...@chromium.org Date 2012-07-11 11:30:19 -0700 (Wed, 11 Jul 2012) Log Message Unreviewed build fix, forgot to add URLTestHelpers.* when landing r122344 * tests/URLTestHelpers.cpp: Added. (URLTestHelpers): (WebKit::URLTestHelpers::registerMockedURLFromBaseURL): (WebKit::URLTestHelpers::registerMockedURLLoad): * tests/URLTestHelpers.h: Added. (WebKit): (URLTestHelpers): (WebKit::URLTestHelpers::toKURL): Modified Paths trunk/Source/WebKit/chromium/ChangeLog Added Paths trunk/Source/WebKit/chromium/tests/URLTestHelpers.cpp trunk/Source/WebKit/chromium/tests/URLTestHelpers.h Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (122347 => 122348) --- trunk/Source/WebKit/chromium/ChangeLog 2012-07-11 18:15:17 UTC (rev 122347) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-11 18:30:19 UTC (rev 122348) @@ -1,5 +1,18 @@ 2012-07-11 Shawn Singh shawnsi...@chromium.org +Unreviewed build fix, forgot to add URLTestHelpers.* when landing r122344 + +* tests/URLTestHelpers.cpp: Added. +(URLTestHelpers): +(WebKit::URLTestHelpers::registerMockedURLFromBaseURL): +(WebKit::URLTestHelpers::registerMockedURLLoad): +* tests/URLTestHelpers.h: Added. +(WebKit): +(URLTestHelpers): +(WebKit::URLTestHelpers::toKURL): + +2012-07-11 Shawn Singh shawnsi...@chromium.org + [chromium] Use WEBKIT_IMPLEMENTATION == 1 for webkit_unit_tests https://bugs.webkit.org/show_bug.cgi?id=90094 Added: trunk/Source/WebKit/chromium/tests/URLTestHelpers.cpp (0 => 122348) --- trunk/Source/WebKit/chromium/tests/URLTestHelpers.cpp (rev 0) +++ trunk/Source/WebKit/chromium/tests/URLTestHelpers.cpp 2012-07-11 18:30:19 UTC (rev 122348) @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2012 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include config.h +#include URLTestHelpers.h + +#include platform/WebURLResponse.h +#include public/WebString.h +#include public/WebURL.h +#include webkit/support/webkit_support.h + +namespace WebKit { +namespace URLTestHelpers { + +void registerMockedURLFromBaseURL(const WebString baseURL, const WebString fileName, const WebString mimeType) +{ +// fullURL = baseURL + fileName. +std::string fullString = std::string(baseURL.utf8().data()) + std::string(fileName.utf8().data()); +registerMockedURLLoad(toKURL(fullString.c_str()), fileName, WebString::fromUTF8(), mimeType); +} + +void registerMockedURLLoad(const WebURL fullURL, const WebString fileName, const WebString mimeType) +{ +registerMockedURLLoad(fullURL, fileName, WebString::fromUTF8(), mimeType); +} + +void registerMockedURLLoad(const WebURL fullURL, const WebString fileName, const WebString relativeBaseDirectory, const WebString mimeType) +{ +WebURLResponse response; +response.initialize(); +response.setMIMEType(mimeType); +response.setHTTPStatusCode(200); + +// Physical file path for the mock = webkitRootDir + relativeBaseDirectory + fileName. +std::string filePath = std::string(webkit_support::GetWebKitRootDir().utf8().data()); +filePath.append(/Source/WebKit/chromium/tests/data/); +filePath.append(std::string(relativeBaseDirectory.utf8().data())); +filePath.append(std::string(fileName.utf8().data())); + +webkit_support::RegisterMockedURL(fullURL, response, WebString::fromUTF8(filePath.c_str())); +} + +} //
[webkit-changes] [121589] trunk/Source/WebCore
Title: [121589] trunk/Source/WebCore Revision 121589 Author shawnsi...@chromium.org Date 2012-06-29 14:25:55 -0700 (Fri, 29 Jun 2012) Log Message Unreviewed build fix after 121580. WebKit Linux debug bots was complaining about signed vs unsigned integer comparison. * html/HTMLCollection.h: (WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/html/HTMLCollection.h Diff Modified: trunk/Source/WebCore/ChangeLog (121588 => 121589) --- trunk/Source/WebCore/ChangeLog 2012-06-29 21:23:14 UTC (rev 121588) +++ trunk/Source/WebCore/ChangeLog 2012-06-29 21:25:55 UTC (rev 121589) @@ -1,3 +1,12 @@ +2012-06-29 Shawn Singh shawnsi...@chromium.org + +Unreviewed build fix after 121580. + +WebKit Linux debug bots was complaining about signed vs unsigned integer comparison. + +* html/HTMLCollection.h: +(WebCore::HTMLCollectionCacheBase::HTMLCollectionCacheBase): + 2012-06-28 James Robinson jam...@chromium.org [chromium] Remove mapRect and mapQuad from WebTransformationMatrix Modified: trunk/Source/WebCore/html/HTMLCollection.h (121588 => 121589) --- trunk/Source/WebCore/html/HTMLCollection.h 2012-06-29 21:23:14 UTC (rev 121588) +++ trunk/Source/WebCore/html/HTMLCollection.h 2012-06-29 21:25:55 UTC (rev 121589) @@ -47,7 +47,7 @@ , m_type(type) , m_includeChildren(includeChildren) { -ASSERT(m_type == type); +ASSERT(static_castCollectionType(m_type) == type); } CollectionType type() const { return static_castCollectionType(m_type); } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [121264] trunk/Source/WebKit/chromium
Title: [121264] trunk/Source/WebKit/chromium Revision 121264 Author shawnsi...@chromium.org Date 2012-06-26 09:20:07 -0700 (Tue, 26 Jun 2012) Log Message [chromium] Fix incorrect #ifdef WEBKIT_IMPLEMENTATION statements https://bugs.webkit.org/show_bug.cgi?id=89931 Reviewed by James Robinson. WEBKIT_IMPLEMENTATION is defined as either 0 or 1, so the usage of #ifdef or #if have different behavior. There are some places in the code that use #ifdef WEBKIT_IMLPEMENTATION, but they should actually be #if WEBKIT_IMPLEMENTATION. This patch fixes those #ifdef statements. * public/WebTextRun.h: (WebTextRun): * public/linux/WebFontRenderStyle.h: Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/public/WebTextRun.h trunk/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (121263 => 121264) --- trunk/Source/WebKit/chromium/ChangeLog 2012-06-26 15:00:43 UTC (rev 121263) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-26 16:20:07 UTC (rev 121264) @@ -1,3 +1,20 @@ +2012-06-26 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix incorrect #ifdef WEBKIT_IMPLEMENTATION statements +https://bugs.webkit.org/show_bug.cgi?id=89931 + +Reviewed by James Robinson. + +WEBKIT_IMPLEMENTATION is defined as either 0 or 1, so the usage of +#ifdef or #if have different behavior. There are some places in +the code that use #ifdef WEBKIT_IMLPEMENTATION, but they should +actually be #if WEBKIT_IMPLEMENTATION. This patch fixes those +#ifdef statements. + +* public/WebTextRun.h: +(WebTextRun): +* public/linux/WebFontRenderStyle.h: + 2012-06-26 Jun Mukai mu...@chromium.org Allow using input type=color UI in ChromeOS. Modified: trunk/Source/WebKit/chromium/public/WebTextRun.h (121263 => 121264) --- trunk/Source/WebKit/chromium/public/WebTextRun.h 2012-06-26 15:00:43 UTC (rev 121263) +++ trunk/Source/WebKit/chromium/public/WebTextRun.h 2012-06-26 16:20:07 UTC (rev 121264) @@ -33,7 +33,7 @@ #include platform/WebString.h -#ifdef WEBKIT_IMPLEMENTATION +#if WEBKIT_IMPLEMENTATION namespace WebCore { class TextRun; } #endif @@ -56,7 +56,7 @@ bool rtl; bool directionalOverride; -#ifdef WEBKIT_IMPLEMENTATION +#if WEBKIT_IMPLEMENTATION // The resulting WebCore::TextRun will refer to the text in this // struct, so this must outlive the WebCore text run. operator WebCore::TextRun() const; Modified: trunk/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h (121263 => 121264) --- trunk/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h 2012-06-26 15:00:43 UTC (rev 121263) +++ trunk/Source/WebKit/chromium/public/linux/WebFontRenderStyle.h 2012-06-26 16:20:07 UTC (rev 121264) @@ -50,7 +50,7 @@ char useSubpixelRendering; // use subpixel rendering (partially-filled pixels) char useSubpixelPositioning; // use subpixel positioning (fractional X positions for glyphs) -#ifdef WEBKIT_IMPLEMENTATION +#if WEBKIT_IMPLEMENTATION // Translates the members of this struct to a FontRenderStyle void toFontRenderStyle(WebCore::FontRenderStyle*); #endif ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [121060] trunk/Source
Title: [121060] trunk/Source Revision 121060 Author shawnsi...@chromium.org Date 2012-06-22 15:24:04 -0700 (Fri, 22 Jun 2012) Log Message [chromium] Do not accumulate occlusion from 3d layers on the main thread https://bugs.webkit.org/show_bug.cgi?id=89704 Reviewed by James Robinson. Source/WebCore: Layer iterators on the main thread may not iterate over 3d layers in correct front-to-back or back-to-front order, because layer sorting is not performed on the main thread. As a result, occlusion tracking can accidentally think something is occluded if a 3d layer is processed out of order. This patch choses to solve this by avoiding accumulating occlusion for 3d layers. It may be appropriate later to consider adding layer sorting on the main thread, but for now that seemed like an unnecessary heavy-handed approach. In addition to a new unit test that covers this, other unit tests were changed to work on the impl thread, so that the 3d layers still accumulate occlusion as required. Unit test added to CCOcclusionTrackerTest: CCOcclusionTrackerTestUnsorted3dLayers * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::layerIsInUnsorted3dRenderingContext): (WebCore): (WebCoremarkOccludedBehindLayer): Source/WebKit/chromium: * tests/CCOcclusionTrackerTest.cpp: (WebKitTests::CCOcclusionTrackerTest::calcDrawEtc): (WebKitTests): (CCOcclusionTrackerTestUnsorted3dLayers): (WebKitTests::CCOcclusionTrackerTestUnsorted3dLayers::runMyTest): (WebKitTests::CCOcclusionTrackerTestLargePixelsOccludeInsideClipRect::runMyTest): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCOcclusionTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (121059 => 121060) --- trunk/Source/WebCore/ChangeLog 2012-06-22 22:09:22 UTC (rev 121059) +++ trunk/Source/WebCore/ChangeLog 2012-06-22 22:24:04 UTC (rev 121060) @@ -1,3 +1,32 @@ +2012-06-22 Shawn Singh shawnsi...@chromium.org + +[chromium] Do not accumulate occlusion from 3d layers on the main thread +https://bugs.webkit.org/show_bug.cgi?id=89704 + +Reviewed by James Robinson. + +Layer iterators on the main thread may not iterate over 3d layers +in correct front-to-back or back-to-front order, because layer +sorting is not performed on the main thread. As a result, +occlusion tracking can accidentally think something is occluded if +a 3d layer is processed out of order. This patch choses to solve +this by avoiding accumulating occlusion for 3d layers. It may be +appropriate later to consider adding layer sorting on the main +thread, but for now that seemed like an unnecessary heavy-handed +approach. + +In addition to a new unit test that covers this, other unit tests +were changed to work on the impl thread, so that the 3d layers +still accumulate occlusion as required. + +Unit test added to CCOcclusionTrackerTest: + CCOcclusionTrackerTestUnsorted3dLayers + +* platform/graphics/chromium/cc/CCOcclusionTracker.cpp: +(WebCore::layerIsInUnsorted3dRenderingContext): +(WebCore): +(WebCoremarkOccludedBehindLayer): + 2012-06-22 Joshua Bell jsb...@chromium.org IndexedDB: Snapshot metadata in front end to avoid IPC round-trips Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp (121059 => 121060) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp 2012-06-22 22:09:22 UTC (rev 121059) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp 2012-06-22 22:24:04 UTC (rev 121060) @@ -111,6 +111,9 @@ static inline bool surfaceTransformsToScreenKnown(const RenderSurfaceChromium* surface) { return !surface-screenSpaceTransformsAreAnimating(); } static inline bool surfaceTransformsToScreenKnown(const CCRenderSurface*) { return true; } +static inline bool layerIsInUnsorted3dRenderingContext(const LayerChromium* layer) { return layer-parent() layer-parent()-preserves3D(); } +static inline bool layerIsInUnsorted3dRenderingContext(const CCLayerImpl*) { return false; } + templatetypename LayerType, typename RenderSurfaceType void CCOcclusionTrackerBaseLayerType, RenderSurfaceType::finishedTargetRenderSurface(const LayerType* owningLayer, const RenderSurfaceType* finishedTarget) { @@ -335,6 +338,9 @@ if (!layerOpacityKnown(layer) || layer-drawOpacity() 1) return; +if (layerIsInUnsorted3dRenderingContext(layer)) +return; + Region opaqueContents = layer-visibleContentOpaqueRegion(); if (opaqueContents.isEmpty()) return; Modified: trunk/Source/WebKit/chromium/ChangeLog (121059 => 121060) --- trunk/Source/WebKit/chromium/ChangeLog 2012-06-22 22:09:22 UTC (rev 121059) +++
[webkit-changes] [120362] trunk/Source
Title: [120362] trunk/Source Revision 120362 Author shawnsi...@chromium.org Date 2012-06-14 14:45:21 -0700 (Thu, 14 Jun 2012) Log Message [chromium] For hit testing in CCLayerTreeHostCommon, need to check that the transform is invertible before inverting it. https://bugs.webkit.org/show_bug.cgi?id=89049 Reviewed by Adrienne Walker. Source/WebCore: Unit test added to CCLayerTreeHostCommonTest.cpp: CCLayerTreeHostCommonTest.verifyHitTestingForUninvertibleTransform * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::pointHitsRect): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (120361 => 120362) --- trunk/Source/WebCore/ChangeLog 2012-06-14 21:15:52 UTC (rev 120361) +++ trunk/Source/WebCore/ChangeLog 2012-06-14 21:45:21 UTC (rev 120362) @@ -1,3 +1,16 @@ +2012-06-14 Shawn Singh shawnsi...@chromium.org + +[chromium] For hit testing in CCLayerTreeHostCommon, need to check that the transform is invertible before inverting it. +https://bugs.webkit.org/show_bug.cgi?id=89049 + +Reviewed by Adrienne Walker. + +Unit test added to CCLayerTreeHostCommonTest.cpp: + CCLayerTreeHostCommonTest.verifyHitTestingForUninvertibleTransform + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::pointHitsRect): + 2012-06-14 Maciej Stachowiak m...@apple.com The whole world rebuilds when you touch any IDL file Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (120361 => 120362) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-06-14 21:15:52 UTC (rev 120361) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-06-14 21:45:21 UTC (rev 120362) @@ -874,6 +874,10 @@ static bool pointHitsRect(const IntPoint viewportPoint, const WebTransformationMatrix localSpaceToScreenSpaceTransform, FloatRect localSpaceRect) { +// If the transform is not invertible, then assume that this point doesn't hit this rect. +if (!localSpaceToScreenSpaceTransform.isInvertible()) +return false; + // Transform the hit test point from screen space to the local space of the given rect. bool clipped = false; FloatPoint hitTestPointInLocalSpace = CCMathUtil::projectPoint(localSpaceToScreenSpaceTransform.inverse(), FloatPoint(viewportPoint), clipped); Modified: trunk/Source/WebKit/chromium/ChangeLog (120361 => 120362) --- trunk/Source/WebKit/chromium/ChangeLog 2012-06-14 21:15:52 UTC (rev 120361) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-14 21:45:21 UTC (rev 120362) @@ -1,3 +1,12 @@ +2012-06-14 Shawn Singh shawnsi...@chromium.org + +[chromium] For hit testing in CCLayerTreeHostCommon, need to check that the transform is invertible before inverting it. +https://bugs.webkit.org/show_bug.cgi?id=89049 + +Reviewed by Adrienne Walker. + +* tests/CCLayerTreeHostCommonTest.cpp: + 2012-06-14 Ian Vollick voll...@chromium.org [chromium] Certain settings in CCSettings could be global Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (120361 => 120362) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-06-14 21:15:52 UTC (rev 120361) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-06-14 21:45:21 UTC (rev 120362) @@ -2970,6 +2970,72 @@ EXPECT_EQ(12345, resultLayer-id()); } +TEST(CCLayerTreeHostCommonTest, verifyHitTestingForUninvertibleTransform) +{ +DebugScopedSetImplThread thisScopeIsOnImplThread; + +OwnPtrCCLayerImpl root = CCLayerImpl::create(12345); +root-createRenderSurface(); +root-renderSurface()-setContentRect(IntRect(IntPoint::zero(), IntSize(100, 100))); + +WebTransformationMatrix uninvertibleTransform; +uninvertibleTransform.setM11(0); +uninvertibleTransform.setM22(0); +uninvertibleTransform.setM33(0); +uninvertibleTransform.setM44(0); +ASSERT_FALSE(uninvertibleTransform.isInvertible()); + +WebTransformationMatrix identityMatrix; +FloatPoint anchor(0, 0); +FloatPoint position(0, 0); +IntSize bounds(100, 100); +setLayerPropertiesForTesting(root.get(), uninvertibleTransform, identityMatrix, anchor, position, bounds, false); +root-setDrawsContent(true); + +VectorCCLayerImpl* renderSurfaceLayerList; +VectorCCLayerImpl* dummyLayerList; +int dummyMaxTextureSize = 512; +renderSurfaceLayerList.append(root.get()); +CCLayerTreeHostCommon::calculateDrawTransforms(root.get(), root.get(), identityMatrix, identityMatrix, renderSurfaceLayerList, dummyLayerList, 0, dummyMaxTextureSize); +
[webkit-changes] [120380] trunk/Source/WebKit/chromium
Title: [120380] trunk/Source/WebKit/chromium Revision 120380 Author shawnsi...@chromium.org Date 2012-06-14 17:35:53 -0700 (Thu, 14 Jun 2012) Log Message [chromium] CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayer failing in debug https://bugs.webkit.org/show_bug.cgi?id=89065 Reviewed by James Robinson. A debug assertion was being triggered in the hit-testing unit tests because I accidentally forgot to set the DebugScopedSetImplThread for the tests. This patch also re-enables the disabled broken test. * tests/CCLayerTreeHostCommonTest.cpp: Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (120379 => 120380) --- trunk/Source/WebKit/chromium/ChangeLog 2012-06-15 00:12:40 UTC (rev 120379) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-15 00:35:53 UTC (rev 120380) @@ -1,3 +1,18 @@ +2012-06-14 Shawn Singh shawnsi...@chromium.org + +[chromium] CCLayerTreeHostCommonTest.verifyHitTestingForSingleLayer failing in debug +https://bugs.webkit.org/show_bug.cgi?id=89065 + +Reviewed by James Robinson. + +A debug assertion was being triggered in the hit-testing unit +tests because I accidentally forgot to set the +DebugScopedSetImplThread for the tests. + +This patch also re-enables the disabled broken test. + +* tests/CCLayerTreeHostCommonTest.cpp: + 2012-06-14 Xianzhu Wang wangxian...@chromium.org [Chromium] Add setAutoHint() and setUseBitmaps() in WebFontRendering Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (120379 => 120380) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-06-15 00:12:40 UTC (rev 120379) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-06-15 00:35:53 UTC (rev 120380) @@ -2913,6 +2913,7 @@ TEST(CCLayerTreeHostCommonTest, verifyHitTestingForEmptyLayerList) { // Hit testing on an empty renderSurfaceLayerList should return a null pointer. +DebugScopedSetImplThread thisScopeIsOnImplThread; VectorCCLayerImpl* renderSurfaceLayerList; @@ -2925,8 +2926,10 @@ EXPECT_FALSE(resultLayer); } -TEST(CCLayerTreeHostCommonTest, DISABLED_verifyHitTestingForSingleLayer) +TEST(CCLayerTreeHostCommonTest, verifyHitTestingForSingleLayer) { +DebugScopedSetImplThread thisScopeIsOnImplThread; + OwnPtrCCLayerImpl root = CCLayerImpl::create(12345); root-createRenderSurface(); root-renderSurface()-setContentRect(IntRect(IntPoint::zero(), IntSize(100, 100))); @@ -3038,6 +3041,8 @@ TEST(CCLayerTreeHostCommonTest, verifyHitTestingForSinglePositionedLayer) { +DebugScopedSetImplThread thisScopeIsOnImplThread; + OwnPtrCCLayerImpl root = CCLayerImpl::create(12345); root-createRenderSurface(); root-renderSurface()-setContentRect(IntRect(IntPoint::zero(), IntSize(100, 100))); @@ -3084,6 +3089,8 @@ TEST(CCLayerTreeHostCommonTest, verifyHitTestingForSingleRotatedLayer) { +DebugScopedSetImplThread thisScopeIsOnImplThread; + OwnPtrCCLayerImpl root = CCLayerImpl::create(12345); root-createRenderSurface(); root-renderSurface()-setContentRect(IntRect(IntPoint::zero(), IntSize(100, 100))); @@ -3138,6 +3145,8 @@ TEST(CCLayerTreeHostCommonTest, verifyHitTestingForSinglePerspectiveLayer) { +DebugScopedSetImplThread thisScopeIsOnImplThread; + OwnPtrCCLayerImpl root = CCLayerImpl::create(12345); root-createRenderSurface(); root-renderSurface()-setContentRect(IntRect(IntPoint::zero(), IntSize(100, 100))); @@ -3204,6 +3213,7 @@ // contentsScale is ignored, then hit testing will mis-interpret the visibleLayerRect // as being larger than the actual bounds of the layer. // +DebugScopedSetImplThread thisScopeIsOnImplThread; OwnPtrCCLayerImpl root = CCLayerImpl::create(12345); root-createRenderSurface(); @@ -3258,6 +3268,7 @@ { // Test that hit-testing will only work for the visible portion of a layer, and not // the entire layer bounds. Here we just test the simple axis-aligned case. +DebugScopedSetImplThread thisScopeIsOnImplThread; OwnPtrCCLayerImpl root = CCLayerImpl::create(123); root-createRenderSurface(); @@ -3325,6 +3336,7 @@ // combined create a triangle. The rotatedLeaf will only be visible where it overlaps // this triangle. // +DebugScopedSetImplThread thisScopeIsOnImplThread; OwnPtrCCLayerImpl root = CCLayerImpl::create(123); root-createRenderSurface(); @@ -3427,6 +3439,8 @@ TEST(CCLayerTreeHostCommonTest, verifyHitTestingForMultipleLayers) { +DebugScopedSetImplThread thisScopeIsOnImplThread; + OwnPtrCCLayerImpl root = CCLayerImpl::create(1); root-createRenderSurface(); root-renderSurface()-setContentRect(IntRect(IntPoint::zero(), IntSize(100, 100))); @@ -3535,6 +3549,7 @@ // The geometry is set up
[webkit-changes] [120094] trunk/Source
Title: [120094] trunk/Source Revision 120094 Author shawnsi...@chromium.org Date 2012-06-12 11:07:40 -0700 (Tue, 12 Jun 2012) Log Message [chromium] Make damage tracking more robust to early exits https://bugs.webkit.org/show_bug.cgi?id=84803 Reviewed by James Robinson. Source/WebCore: All CCDamageTrackerTest unit tests updated; One new unit test added: CCDamageTrackerTest.verifyDamageAccumulatesUntilReset Damage tracking inherently needs to be aware of all changes that occur for every frame. Before this patch, anyone modifying details of CCLayerTreeHostImpl and the drawing phases of the compositor needed to be careful to avoid early exiting once draw is initiated, otherwise running the risk of damage tracking's state getting out-of-sync from actual changes. This patch makes the damage tracker API more asynchronous-like, so that damage will continue to accumulate until it is explicitly notified that damaged areas have been drawn. This will allow more freedom in designing and restructuing drawing code in the compositor, without worrying as much about damage tracking getting out-of-sync. * platform/graphics/chromium/cc/CCDamageTracker.h: (WebCore::CCDamageTracker::didDrawDamagedArea): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::drawLayers): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (CCLayerTreeHostImpl): Source/WebKit/chromium: * tests/CCDamageTrackerTest.cpp: (WebKitTests::clearDamageForAllSurfaces): (WebKitTests::TEST_F): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (120093 => 120094) --- trunk/Source/WebCore/ChangeLog 2012-06-12 18:02:56 UTC (rev 120093) +++ trunk/Source/WebCore/ChangeLog 2012-06-12 18:07:40 UTC (rev 120094) @@ -1,3 +1,33 @@ +2012-06-12 Shawn Singh shawnsi...@chromium.org + +[chromium] Make damage tracking more robust to early exits +https://bugs.webkit.org/show_bug.cgi?id=84803 + +Reviewed by James Robinson. + +All CCDamageTrackerTest unit tests updated; +One new unit test added: + CCDamageTrackerTest.verifyDamageAccumulatesUntilReset + +Damage tracking inherently needs to be aware of all changes that +occur for every frame. Before this patch, anyone modifying details +of CCLayerTreeHostImpl and the drawing phases of the compositor +needed to be careful to avoid early exiting once draw is +initiated, otherwise running the risk of damage tracking's state +getting out-of-sync from actual changes. This patch makes the +damage tracker API more asynchronous-like, so that damage will +continue to accumulate until it is explicitly notified that +damaged areas have been drawn. This will allow more freedom in +designing and restructuing drawing code in the compositor, without +worrying as much about damage tracking getting out-of-sync. + +* platform/graphics/chromium/cc/CCDamageTracker.h: +(WebCore::CCDamageTracker::didDrawDamagedArea): +* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: +(WebCore::CCLayerTreeHostImpl::drawLayers): +* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: +(CCLayerTreeHostImpl): + 2012-06-12 Mike West mk...@chromium.org Make document.documentURI readonly from _javascript_ Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp (120093 => 120094) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-06-12 18:02:56 UTC (rev 120093) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-06-12 18:07:40 UTC (rev 120094) @@ -151,20 +151,27 @@ FloatRect damageFromSurfaceMask = trackDamageFromSurfaceMask(targetSurfaceMaskLayer); FloatRect damageFromLeftoverRects = trackDamageFromLeftoverRects(); +FloatRect damageRectForThisUpdate; + if (m_forceFullDamageNextUpdate || targetSurfacePropertyChangedOnlyFromDescendant) { -m_currentDamageRect = targetSurfaceContentRect; +damageRectForThisUpdate = targetSurfaceContentRect; m_forceFullDamageNextUpdate = false; } else { // FIXME: can we clamp this damage to the surface's content rect? (affects performance, but not correctness) -m_currentDamageRect = damageFromActiveLayers; -m_currentDamageRect.uniteIfNonZero(damageFromSurfaceMask); -m_currentDamageRect.uniteIfNonZero(damageFromLeftoverRects); +damageRectForThisUpdate = damageFromActiveLayers; +damageRectForThisUpdate.uniteIfNonZero(damageFromSurfaceMask); +
[webkit-changes] [119753] trunk/Source/WebCore
Title: [119753] trunk/Source/WebCore Revision 119753 Author shawnsi...@chromium.org Date 2012-06-07 14:32:13 -0700 (Thu, 07 Jun 2012) Log Message [chromium] Remove obsolete FIXME comment about a layer sorting bug. https://bugs.webkit.org/show_bug.cgi?id=88546 Reviewed by James Robinson. No tests needed, only comment changed. The comment referred to a potential bug that actually will not occur. The W3C spec on CSS 3d transforms indicates that layers that do not share the same 3d rendering context do not sort together, and our existing code sorts this way already. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::subtreeShouldRenderToSeparateSurface): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (119752 => 119753) --- trunk/Source/WebCore/ChangeLog 2012-06-07 21:21:31 UTC (rev 119752) +++ trunk/Source/WebCore/ChangeLog 2012-06-07 21:32:13 UTC (rev 119753) @@ -1,3 +1,19 @@ +2012-06-07 Shawn Singh shawnsi...@chromium.org + +[chromium] Remove obsolete FIXME comment about a layer sorting bug. +https://bugs.webkit.org/show_bug.cgi?id=88546 + +Reviewed by James Robinson. + +No tests needed, only comment changed. The comment referred to a +potential bug that actually will not occur. The W3C spec on CSS 3d +transforms indicates that layers that do not share the same 3d +rendering context do not sort together, and our existing code +sorts this way already. + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::subtreeShouldRenderToSeparateSurface): + 2012-06-07 Adam Barth aba...@webkit.org Settings::defaultDeviceScaleFactor is redundant with Page::deviceScaleFactor Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (119752 => 119753) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-06-07 21:21:31 UTC (rev 119752) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-06-07 21:32:13 UTC (rev 119753) @@ -269,11 +269,6 @@ templatetypename LayerType static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlignedWithRespectToParent) { -// FIXME: If we decide to create a render surface here while this layer does -//preserve-3d, then we may be sorting incorrectly because we will not be -//sorting the individual layers of this subtree with other layers outside of -//this subtree. - // Cache this value, because otherwise it walks the entire subtree several times. bool descendantDrawsContent = layer-descendantDrawsContent(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [119432] trunk/Source/WebKit/chromium
Title: [119432] trunk/Source/WebKit/chromium Revision 119432 Author shawnsi...@chromium.org Date 2012-06-04 15:26:43 -0700 (Mon, 04 Jun 2012) Log Message [chromium] CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer needs to be cleaner https://bugs.webkit.org/show_bug.cgi?id=85245 Reviewed by James Robinson. Updated CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer so that the test is clearer and cleaner. The original test was covering what it needed, but in a confusing and not-so-practical way. This patch adds comments and performs a tighter test so that the intent is a bit more clear. * tests/CCDamageTrackerTest.cpp: (WebKitTests::TEST_F): Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (119431 => 119432) --- trunk/Source/WebKit/chromium/ChangeLog 2012-06-04 22:25:29 UTC (rev 119431) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-06-04 22:26:43 UTC (rev 119432) @@ -1,3 +1,19 @@ +2012-06-04 Shawn Singh shawnsi...@chromium.org + +[chromium] CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer needs to be cleaner +https://bugs.webkit.org/show_bug.cgi?id=85245 + +Reviewed by James Robinson. + +Updated CCDamageTrackerTest.verifyDamageForPerspectiveClippedLayer +so that the test is clearer and cleaner. The original test was +covering what it needed, but in a confusing and not-so-practical +way. This patch adds comments and performs a tighter test so that +the intent is a bit more clear. + +* tests/CCDamageTrackerTest.cpp: +(WebKitTests::TEST_F): + 2012-06-04 Ryosuke Niwa rn...@webkit.org Fix attempt after r119411. Modified: trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp (119431 => 119432) --- trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp 2012-06-04 22:25:29 UTC (rev 119431) +++ trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp 2012-06-04 22:26:43 UTC (rev 119432) @@ -327,15 +327,17 @@ // tracked properly. // // The transform is constructed so that if w 0 clipping is not performed, the -// incorrect rect will be very small, specifically: position (-3.153448, -2.750628) and size 8.548689 x 5.661383. -// Instead, the correctly transformed rect should actually be very huge (i.e. in theory, infinite) +// incorrect rect will be very small, specifically: position (500.972504, 498.544617) and size 0.056610 x 2.910767. +// Instead, the correctly transformed rect should actually be very huge (i.e. in theory, -infinity on the left), +// and positioned so that the right-most bound rect will be approximately 501 units in root surface space. +// OwnPtrCCLayerImpl root = createAndSetUpTestTreeWithOneSurface(); CCLayerImpl* child = root-children()[0].get(); WebTransformationMatrix transform; +transform.translate3d(500, 500, 0); transform.applyPerspective(1); -transform.translate3d(-150, -50, 0); transform.rotate3d(0, 45, 0); transform.translate3d(-50, -50, 0); @@ -359,8 +361,8 @@ // The expected damage should cover the entire root surface (500x500), but we don't // care whether the damage rect was clamped or is larger than the surface for this test. FloatRect rootDamageRect = root-renderSurface()-damageTracker()-currentDamageRect(); -EXPECT_GE(rootDamageRect.width(), 500); -EXPECT_GE(rootDamageRect.height(), 500); +FloatRect damageWeCareAbout = FloatRect(FloatPoint::zero(), FloatSize(500, 500)); +EXPECT_TRUE(rootDamageRect.contains(damageWeCareAbout)); } TEST_F(CCDamageTrackerTest, verifyDamageForBlurredSurface) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [119370] trunk/LayoutTests
Title: [119370] trunk/LayoutTests Revision 119370 Author shawnsi...@chromium.org Date 2012-06-03 22:24:33 -0700 (Sun, 03 Jun 2012) Log Message Unreviewed fix of chromium TestExpectations Some extra junk got added by accident when I tried to change TestExpectations. This patch removes it. * platform/chromium/TestExpectations: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/TestExpectations Diff Modified: trunk/LayoutTests/ChangeLog (119369 => 119370) --- trunk/LayoutTests/ChangeLog 2012-06-04 05:10:11 UTC (rev 119369) +++ trunk/LayoutTests/ChangeLog 2012-06-04 05:24:33 UTC (rev 119370) @@ -1,5 +1,14 @@ 2012-06-03 Shawn Singh shawnsi...@chromium.org +Unreviewed fix of chromium TestExpectations + +Some extra junk got added by accident when I tried to change +TestExpectations. This patch removes it. + +* platform/chromium/TestExpectations: + +2012-06-03 Shawn Singh shawnsi...@chromium.org + Unreviewed rebasline for transforms/3d test cases. 9 tests re-baselined. Modified: trunk/LayoutTests/platform/chromium/TestExpectations (119369 => 119370) --- trunk/LayoutTests/platform/chromium/TestExpectations 2012-06-04 05:10:11 UTC (rev 119369) +++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-06-04 05:24:33 UTC (rev 119370) @@ -3799,731 +3799,3 @@ BUGWK88124 DEBUG : fast/css/absolute-child-with-percent-height-inside-relative-parent.html = PASS IMAGE+TEXT BUGWK88131 DEBUG : fast/dom/HTMLMeterElement/meter-element-crash.html = PASS TEXT - -// TEMPORARY overrides of -// src/third_party/WebKit/LayoutTests/platform/chromium/test_expectations.txt -// that are associated with changes to the Skia code. -// -// GUIDELINES: -// - This file should be empty most of the time. -// - Expectations should only be added TEMPORARILY, as a step towards -// rebaselining layout test results. If any one expectation remains in here -// for more than a week or two, then we are probably doing something wrong. -// - Expectations from this file should NOT be rolled into any other -// test_expectations file. If there is a test that we expect to fail -// indefinitely, then we should add that test to the roach motel that is -// src/third_party/WebKit/LayoutTests/platform/chromium/test_expectations.txt -// - Tests listed in this file should NOT be rebaselined by WebKit Gardeners, -// unless they have made arrangements with Skia developers. -// -// For more information, see https://bugs.webkit.org/show_bug.cgi?id=86749 -// or email skia-...@google.com . -// -// INSTRUCTIONS: -// If you are rolling Skia's DEPS within Chrome, and trybot results indicate -// that the DEPS roll would break some webkit layout_tests, please follow -// these steps: -// -// 1. Confirm that those layout_test failures are reasonable-- Are they -// actually improvements, not regressions? Or maybe they are very minor -// differences that go along with a performance improvement? -// If not, please fix Skia rather than rolling in the version that will -// regress the webkit layout_tests. -// -// 2. File a bug to yourself to track the rebaselining of results caused by -// your Skia DEPS roll. -// -// 3. Add one or more lines to this file, in the same syntax used in the main -// test_expectations file, to mark those tests as expected-to-fail. -// Add this file to your DEPS roll CL. -// -// 4. Run your DEPS roll CL through the trybots again, and confirm your CL does -// not cause any layout tests to fail. (If there are still failures as a -// result of your CL, you probably didn't add the test expectations correctly.) -// -// 5. Commit your DEPS roll CL, and keep an eye on the waterfall bots to make -// sure nothing goes red. -// -// 6. Make sure to rebaseline the layout tests as soon as possible! The longer -// we leave overrides in this file, the harder it will be to rebaseline those -// tests (because other rendering changes might creep in). -// -// START OVERRIDES HERE - -BUGCR130283 : svg/W3C-SVG-1.1/painting-stroke-04-t.svg = TEXT - -// END OVERRIDES HERE (this line ensures that the file is newline-terminated) - - - -// TEMPORARY overrides of -// src/third_party/WebKit/LayoutTests/platform/chromium/test_expectations.txt -// that are associated with changes to the Skia code. -// -// GUIDELINES: -// - This file should be empty most of the time. -// - Expectations should only be added TEMPORARILY, as a step towards -// rebaselining layout test results. If any one expectation remains in here -// for more than a week or two, then we are probably doing something wrong. -// - Expectations from this file should NOT be rolled into any other -// test_expectations file. If there is a test that we expect to fail -// indefinitely, then we should add that test to the roach motel that is -// src/third_party/WebKit/LayoutTests/platform/chromium/test_expectations.txt -// - Tests listed in this file should NOT be rebaselined by WebKit
[webkit-changes] [119058] trunk/Source
Title: [119058] trunk/Source Revision 119058 Author shawnsi...@chromium.org Date 2012-05-30 23:05:30 -0700 (Wed, 30 May 2012) Log Message [chromium] Fix min/max bounds error in CCMathUtil.cpp https://bugs.webkit.org/show_bug.cgi?id=87915 Reviewed by James Robinson. Source/WebCore: Two unit tests added to CCMathUtilTest: CCMathUtilTest.verifyEnclosingClippedRectUsesCorrectInitialBounds CCMathUtilTest.verifyEnclosingRectOfVerticesUsesCorrectInitialBounds While computing bounds, the initial values for xmax and ymax are intended to be set to -float_max. It turns out that std::numeric_limitsfloat::min() actually returns the smallest positive value close to zero, which is not what was intended. This patch fixes the code to use -float_max instead, which is the intended value. * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::computeEnclosingRectOfVertices): (WebCore::CCMathUtil::computeEnclosingClippedRect): (WebCore): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore): (CCMathUtil): Source/WebKit/chromium: * tests/CCMathUtilTest.cpp: (WebCore::TEST): (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (119057 => 119058) --- trunk/Source/WebCore/ChangeLog 2012-05-31 05:58:45 UTC (rev 119057) +++ trunk/Source/WebCore/ChangeLog 2012-05-31 06:05:30 UTC (rev 119058) @@ -1,3 +1,35 @@ +2012-05-30 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix min/max bounds error in CCMathUtil.cpp +https://bugs.webkit.org/show_bug.cgi?id=87915 + +Reviewed by James Robinson. + +Two unit tests added to CCMathUtilTest: +CCMathUtilTest.verifyEnclosingClippedRectUsesCorrectInitialBounds +CCMathUtilTest.verifyEnclosingRectOfVerticesUsesCorrectInitialBounds + +While computing bounds, the initial values for xmax and ymax are +intended to be set to -float_max. It turns out that +std::numeric_limitsfloat::min() actually returns the smallest +positive value close to zero, which is not what was intended. This +patch fixes the code to use -float_max instead, which is the +intended value. + +* platform/graphics/chromium/cc/CCMathUtil.cpp: +(WebCore::CCMathUtil::mapClippedRect): +(WebCore::CCMathUtil::projectClippedRect): +(WebCore::CCMathUtil::computeEnclosingRectOfVertices): +(WebCore::CCMathUtil::computeEnclosingClippedRect): +(WebCore): +* platform/graphics/chromium/cc/CCMathUtil.h: +(WebCore::HomogeneousCoordinate::HomogeneousCoordinate): +(HomogeneousCoordinate): +(WebCore::HomogeneousCoordinate::shouldBeClipped): +(WebCore::HomogeneousCoordinate::cartesianPoint2d): +(WebCore): +(CCMathUtil): + 2012-05-30 Patrick Gansterer par...@webkit.org Build fix for WinCE after r118568. Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp (119057 => 119058) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp 2012-05-31 05:58:45 UTC (rev 119057) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp 2012-05-31 06:05:30 UTC (rev 119058) @@ -33,37 +33,6 @@ namespace WebCore { -struct HomogeneousCoordinate { -HomogeneousCoordinate(double newX, double newY, double newZ, double newW) -: x(newX) -, y(newY) -, z(newZ) -, w(newW) -{ -} - -bool shouldBeClipped() const -{ -return w = 0; -} - -FloatPoint cartesianPoint2d() const -{ -if (w == 1) -return FloatPoint(x, y); - -// For now, because this code is used privately only by CCMathUtil, it should never be called when w == 0, and we do not yet need to handle that case. -ASSERT(w); -double invW = 1.0 / w; -return FloatPoint(x * invW, y * invW); -} - -double x; -double y; -double z; -double w; -}; - static HomogeneousCoordinate projectPoint(const TransformationMatrix transform, const FloatPoint p) { // In this case, the layer we are trying to project onto is perpendicular to ray @@ -138,55 +107,6 @@ ymax = std::max(p.y(), ymax); } -static FloatRect computeEnclosingRect(const HomogeneousCoordinate h1, const HomogeneousCoordinate h2, const HomogeneousCoordinate h3, const HomogeneousCoordinate h4) -{ -// This function performs clipping as necessary and computes the enclosing 2d -
[webkit-changes] [119008] trunk/Source
Title: [119008] trunk/Source Revision 119008 Author shawnsi...@chromium.org Date 2012-05-30 17:48:54 -0700 (Wed, 30 May 2012) Log Message Simplify TransformationMatrix rotation code to improve precision https://bugs.webkit.org/show_bug.cgi?id=8 Reviewed by Adrienne Walker. Source/WebCore: Change covered by existing layout tests; Additional unit tests added. The original rotation code for WebCore::TransformationMatrix was using indirect trig identities to compute basic rotation matrices. As far as I can imagine, this is unnecessary, and brief informal experiments showed that we can gain a few extra bits of precision by avoiding that indirection. Indeed, precision improved such that it revealed a mistake on one of the unit tests, where the test was actually degenerate so that the layer was aligned with a viewport boundary. When it was imprecise, it didnt appear to be aligned. Putting an additional translation on that test fixes it so it is no longer a degenerate test. This patch also revealed a few chinks in the unit testing armor of this code, an error that should have been caught in unit tests was luckily caught by SVG layout tests. This chink is fixed by adding 2 extra unit tests. * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::rotate3d): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: (WebKitTests::TEST): * tests/WebTransformationMatrixTest.cpp: (WebKit::TEST): (WebKit): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (119007 => 119008) --- trunk/Source/WebCore/ChangeLog 2012-05-31 00:47:37 UTC (rev 119007) +++ trunk/Source/WebCore/ChangeLog 2012-05-31 00:48:54 UTC (rev 119008) @@ -1,3 +1,34 @@ +2012-05-30 Shawn Singh shawnsi...@chromium.org + +Simplify TransformationMatrix rotation code to improve precision +https://bugs.webkit.org/show_bug.cgi?id=8 + +Reviewed by Adrienne Walker. + +Change covered by existing layout tests; +Additional unit tests added. + +The original rotation code for WebCore::TransformationMatrix was +using indirect trig identities to compute basic rotation +matrices. As far as I can imagine, this is unnecessary, and brief +informal experiments showed that we can gain a few extra bits of +precision by avoiding that indirection. + +Indeed, precision improved such that it revealed a mistake on one +of the unit tests, where the test was actually degenerate so that +the layer was aligned with a viewport boundary. When it was +imprecise, it didnt appear to be aligned. Putting an additional +translation on that test fixes it so it is no longer a degenerate +test. + +This patch also revealed a few chinks in the unit testing armor of +this code, an error that should have been caught in unit tests was +luckily caught by SVG layout tests. This chink is fixed by adding +2 extra unit tests. + +* platform/graphics/transforms/TransformationMatrix.cpp: +(WebCore::TransformationMatrix::rotate3d): + 2012-05-30 Alec Flett alecfl...@chromium.org IndexedDB: Remove old get/getKey implementations Modified: trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp (119007 => 119008) --- trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp 2012-05-31 00:47:37 UTC (rev 119007) +++ trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp 2012-05-31 00:48:54 UTC (rev 119008) @@ -727,15 +727,13 @@ TransformationMatrix TransformationMatrix::rotate3d(double x, double y, double z, double angle) { -// angles are in degrees. Switch to radians +// Angles are in degrees. Switch to radians. angle = deg2rad(angle); + +double sinTheta = sin(angle); +double cosTheta = cos(angle); -angle /= 2.0f; -double sinA = sin(angle); -double cosA = cos(angle); -double sinA2 = sinA * sinA; - -// normalize +// Normalize the axis of rotation double length = sqrt(x * x + y * y + z * z); if (length == 0) { // bad vector, just use something reasonable @@ -750,39 +748,39 @@ TransformationMatrix mat; -// optimize case where axis is along major axis +// Optimize cases where the axis is along a major axis if (x == 1.0f y == 0.0f z == 0.0f) { mat.m_matrix[0][0] = 1.0f; mat.m_matrix[0][1] = 0.0f; mat.m_matrix[0][2] = 0.0f; mat.m_matrix[1][0] = 0.0f; -mat.m_matrix[1][1] = 1.0f - 2.0f * sinA2; -mat.m_matrix[1][2] = 2.0f * sinA * cosA; +mat.m_matrix[1][1] =
[webkit-changes] [118857] trunk/Source
Title: [118857] trunk/Source Revision 118857 Author shawnsi...@chromium.org Date 2012-05-29 16:42:28 -0700 (Tue, 29 May 2012) Log Message [chromium] make WebTransformationMatrix object usable by non-webkit code https://bugs.webkit.org/show_bug.cgi?id=87315 Reviewed by James Robinson. Source/Platform: * chromium/public/WebTransformationMatrix.h: (WebKit::WebTransformationMatrix::~WebTransformationMatrix): (WebTransformationMatrix): Source/WebCore: This change is covered by existing tests and by whether it compiles. There should be no changes in behavior. * platform/chromium/support/WebTransformationMatrix.cpp: (WebKit::WebTransformationMatrix::WebTransformationMatrix): (WebKit::WebTransformationMatrix::operator=): (WebKit::WebTransformationMatrix::operator==): (WebKit::WebTransformationMatrix::inverse): (WebKit::WebTransformationMatrix::to2dTransform): (WebKit::WebTransformationMatrix::multiply): (WebKit::WebTransformationMatrix::makeIdentity): (WebKit::WebTransformationMatrix::translate): (WebKit::WebTransformationMatrix::translate3d): (WebKit::WebTransformationMatrix::translateRight3d): (WebKit::WebTransformationMatrix::scale): (WebKit::WebTransformationMatrix::scaleNonUniform): (WebKit::WebTransformationMatrix::scale3d): (WebKit::WebTransformationMatrix::rotate): (WebKit::WebTransformationMatrix::rotate3d): (WebKit::WebTransformationMatrix::skewX): (WebKit::WebTransformationMatrix::skewY): (WebKit::WebTransformationMatrix::applyPerspective): (WebKit::WebTransformationMatrix::blend): (WebKit::WebTransformationMatrix::hasPerspective): (WebKit::WebTransformationMatrix::isInvertible): (WebKit::WebTransformationMatrix::isBackFaceVisible): (WebKit::WebTransformationMatrix::isIdentity): (WebKit::WebTransformationMatrix::isIdentityOrTranslation): (WebKit::WebTransformationMatrix::isIntegerTranslation): (WebKit::WebTransformationMatrix::m11): (WebKit::WebTransformationMatrix::setM11): (WebKit::WebTransformationMatrix::m12): (WebKit::WebTransformationMatrix::setM12): (WebKit::WebTransformationMatrix::m13): (WebKit::WebTransformationMatrix::setM13): (WebKit::WebTransformationMatrix::m14): (WebKit::WebTransformationMatrix::setM14): (WebKit::WebTransformationMatrix::m21): (WebKit::WebTransformationMatrix::setM21): (WebKit::WebTransformationMatrix::m22): (WebKit::WebTransformationMatrix::setM22): (WebKit::WebTransformationMatrix::m23): (WebKit::WebTransformationMatrix::setM23): (WebKit::WebTransformationMatrix::m24): (WebKit::WebTransformationMatrix::setM24): (WebKit::WebTransformationMatrix::m31): (WebKit::WebTransformationMatrix::setM31): (WebKit::WebTransformationMatrix::m32): (WebKit::WebTransformationMatrix::setM32): (WebKit::WebTransformationMatrix::m33): (WebKit::WebTransformationMatrix::setM33): (WebKit::WebTransformationMatrix::m34): (WebKit::WebTransformationMatrix::setM34): (WebKit::WebTransformationMatrix::m41): (WebKit::WebTransformationMatrix::setM41): (WebKit::WebTransformationMatrix::m42): (WebKit::WebTransformationMatrix::setM42): (WebKit::WebTransformationMatrix::m43): (WebKit::WebTransformationMatrix::setM43): (WebKit::WebTransformationMatrix::m44): (WebKit::WebTransformationMatrix::setM44): (WebKit::WebTransformationMatrix::a): (WebKit::WebTransformationMatrix::setA): (WebKit::WebTransformationMatrix::b): (WebKit::WebTransformationMatrix::setB): (WebKit::WebTransformationMatrix::c): (WebKit::WebTransformationMatrix::setC): (WebKit::WebTransformationMatrix::d): (WebKit::WebTransformationMatrix::setD): (WebKit::WebTransformationMatrix::e): (WebKit::WebTransformationMatrix::setE): (WebKit::WebTransformationMatrix::f): (WebKit::WebTransformationMatrix::setF): (WebKit::WebTransformationMatrix::toWebCoreTransform): (WebKit::WebTransformationMatrix::mapRect): (WebKit::WebTransformationMatrix::mapPoint): (WebKit::WebTransformationMatrix::mapQuad): (WebKit::WebTransformationMatrix::projectPoint): Modified Paths trunk/Source/Platform/ChangeLog trunk/Source/Platform/chromium/public/WebTransformationMatrix.h trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp Diff Modified: trunk/Source/Platform/ChangeLog (118856 => 118857) --- trunk/Source/Platform/ChangeLog 2012-05-29 23:40:26 UTC (rev 118856) +++ trunk/Source/Platform/ChangeLog 2012-05-29 23:42:28 UTC (rev 118857) @@ -1,3 +1,14 @@ +2012-05-29 Shawn Singh shawnsi...@chromium.org + +[chromium] make WebTransformationMatrix object usable by non-webkit code +https://bugs.webkit.org/show_bug.cgi?id=87315 + +Reviewed by James Robinson. + +* chromium/public/WebTransformationMatrix.h: +(WebKit::WebTransformationMatrix::~WebTransformationMatrix): +(WebTransformationMatrix): + 2012-05-25 Kinuko Yasuda kin...@chromium.org [chromium] Deprecate FileUtilities::getFileSize and getFileModifiedTime in favor of getFileMetadata Modified: trunk/Source/Platform/chromium/public/WebTransformationMatrix.h (118856 => 118857) ---
[webkit-changes] [118054] trunk/Source/WebKit/chromium
Title: [118054] trunk/Source/WebKit/chromium Revision 118054 Author shawnsi...@chromium.org Date 2012-05-22 14:22:57 -0700 (Tue, 22 May 2012) Log Message [chromium] Add unit testing for WebTransformationMatrix::blend() https://bugs.webkit.org/show_bug.cgi?id=87066 Reviewed by Adrienne Walker. 8 more unit tests added: WebTransformationMatrixTest.verifyBlendForTranslation WebTransformationMatrixTest.verifyBlendForScale WebTransformationMatrixTest.verifyBlendForSkewX WebTransformationMatrixTest.verifyBlendForSkewY WebTransformationMatrixTest.verifyBlendForRotationAboutX WebTransformationMatrixTest.verifyBlendForRotationAboutY WebTransformationMatrixTest.verifyBlendForRotationAboutZ WebTransformationMatrixTest.verifyBlendForCompositeTransform * tests/WebTransformationMatrixTest.cpp: (WebKit::TEST): (WebKit): (WebKit::printTransform): Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (118053 => 118054) --- trunk/Source/WebKit/chromium/ChangeLog 2012-05-22 21:21:38 UTC (rev 118053) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-22 21:22:57 UTC (rev 118054) @@ -1 +1,23 @@ +2012-05-21 Shawn Singh shawnsi...@chromium.org + +[chromium] Add unit testing for WebTransformationMatrix::blend() +https://bugs.webkit.org/show_bug.cgi?id=87066 + +Reviewed by Adrienne Walker. + +8 more unit tests added: +WebTransformationMatrixTest.verifyBlendForTranslation +WebTransformationMatrixTest.verifyBlendForScale +WebTransformationMatrixTest.verifyBlendForSkewX +WebTransformationMatrixTest.verifyBlendForSkewY +WebTransformationMatrixTest.verifyBlendForRotationAboutX +WebTransformationMatrixTest.verifyBlendForRotationAboutY +WebTransformationMatrixTest.verifyBlendForRotationAboutZ +WebTransformationMatrixTest.verifyBlendForCompositeTransform + +* tests/WebTransformationMatrixTest.cpp: +(WebKit::TEST): +(WebKit): +(WebKit::printTransform): + == Rolled over to ChangeLog-2012-05-22 == Modified: trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp (118053 => 118054) --- trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp 2012-05-22 21:21:38 UTC (rev 118053) +++ trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp 2012-05-22 21:22:57 UTC (rev 118054) @@ -24,9 +24,11 @@ #include config.h -#include ../../../../Platform/chromium/public/WebTransformationMatrix.h +#include public/WebTransformationMatrix.h +#include CCLayerTreeTestCommon.h #include gtest/gtest.h +#include wtf/MathExtras.h #define EXPECT_ROW1_EQ(a, b, c, d, matrix) \ EXPECT_FLOAT_EQ((a), (matrix).m11()); \ @@ -74,6 +76,7 @@ EXPECT_NEAR((d), (matrix).m43(), (errorThreshold)); #define ERROR_THRESHOLD 1e-14 +#define LOOSE_ERROR_THRESHOLD 1e-7 using namespace WebKit; @@ -926,7 +929,7 @@ EXPECT_FALSE(A.isIdentityOrTranslation()); } -TEST(WebTransformationMatrixTest, isIntegerTranslation) +TEST(WebTransformationMatrixTest, verifyIsIntegerTranslation) { WebTransformationMatrix A; @@ -953,4 +956,329 @@ EXPECT_TRUE(A.isIntegerTranslation()); } +TEST(WebTransformationMatrixTest, verifyBlendForTranslation) +{ +WebTransformationMatrix from; +from.translate3d(100, 200, 100); + +WebTransformationMatrix to; + +to.makeIdentity(); +to.translate3d(200, 100, 300); +to.blend(from, 0); +EXPECT_TRANSFORMATION_MATRIX_EQ(from, to); + +to.makeIdentity(); +to.translate3d(200, 100, 300); +to.blend(from, 0.25); +EXPECT_ROW1_EQ(1, 0, 0, 125, to); +EXPECT_ROW2_EQ(0, 1, 0, 175, to); +EXPECT_ROW3_EQ(0, 0, 1, 150, to); +EXPECT_ROW4_EQ(0, 0, 0, 1, to); + +to.makeIdentity(); +to.translate3d(200, 100, 300); +to.blend(from, 0.5); +EXPECT_ROW1_EQ(1, 0, 0, 150, to); +EXPECT_ROW2_EQ(0, 1, 0, 150, to); +EXPECT_ROW3_EQ(0, 0, 1, 200, to); +EXPECT_ROW4_EQ(0, 0, 0, 1, to); + +to.makeIdentity(); +to.translate3d(200, 100, 300); +to.blend(from, 1); +EXPECT_ROW1_EQ(1, 0, 0, 200, to); +EXPECT_ROW2_EQ(0, 1, 0, 100, to); +EXPECT_ROW3_EQ(0, 0, 1, 300, to); +EXPECT_ROW4_EQ(0, 0, 0, 1, to); +} + +TEST(WebTransformationMatrixTest, verifyBlendForScale) +{ +WebTransformationMatrix from; +from.scale3d(100, 200, 100); + +WebTransformationMatrix to; + +to.makeIdentity(); +to.scale3d(200, 100, 300); +to.blend(from, 0); +EXPECT_TRANSFORMATION_MATRIX_EQ(from, to); + +to.makeIdentity(); +to.scale3d(200, 100, 300); +to.blend(from, 0.25); +EXPECT_ROW1_EQ(125, 0, 0, 0, to); +EXPECT_ROW2_EQ(0, 175, 0, 0, to); +EXPECT_ROW3_EQ(0, 0, 150, 0, to); +EXPECT_ROW4_EQ(0, 0, 0, 1, to); + +to.makeIdentity(); +to.scale3d(200, 100, 300); +to.blend(from, 0.5); +EXPECT_ROW1_EQ(150,
[webkit-changes] [118119] branches/chromium/1132/Source
Title: [118119] branches/chromium/1132/Source Revision 118119 Author shawnsi...@chromium.org Date 2012-05-22 21:32:28 -0700 (Tue, 22 May 2012) Log Message Merge 117645 - [chromium] add back-face visibility check for renderSurfaces https://bugs.webkit.org/show_bug.cgi?id=86870 Reviewed by Adrienne Walker. Source/WebCore: Test added CCLayerTreeHostCommonTest::verifyBackFaceCullingWithPreserves3dForFlatteningSurface Chromium was not checking back-face visibility for renderSurfaces that needed it. This patch adds that check and the appropriate unit test. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::layerIsInExisting3DRenderingContext): (WebCore): (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsAndVisibilityInternal): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: (WebKitTests::TEST): (WebKitTests): TBR=shawnsi...@chromium.org Review URL: https://chromiumcodereview.appspot.com/10383299 Modified Paths branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp branches/chromium/1132/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (118118 => 118119) --- branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-05-23 04:27:57 UTC (rev 118118) +++ branches/chromium/1132/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-05-23 04:32:28 UTC (rev 118119) @@ -66,6 +66,14 @@ } templatetypename LayerType +static inline bool layerIsInExisting3DRenderingContext(LayerType* layer) +{ +// According to current W3C spec on CSS transforms, a layer is part of an established +// 3d rendering context if its parent has transform-style of preserves-3d. +return layer-parent() layer-parent()-preserves3D(); +} + +templatetypename LayerType static IntRect calculateVisibleLayerRect(LayerType* layer) { ASSERT(layer-targetRenderSurface()); @@ -211,7 +219,7 @@ // If the layer flattens its subtree (i.e. the layer doesn't preserve-3d), but it is // treated as a 3D object by its parent (i.e. parent does preserve-3d). -if (layer-parent() layer-parent()-preserves3D() !layer-preserves3D() descendantDrawsContent) +if (layerIsInExisting3DRenderingContext(layer) !layer-preserves3D() descendantDrawsContent) return true; // On the main thread side, animating transforms are unknown, and may cause a RenderSurface on the impl side. @@ -382,6 +390,14 @@ layer-setUsesLayerClipping(false); if (subtreeShouldRenderToSeparateSurface(layer, isScaleOrTranslation(combinedTransform))) { + +// We need to check back-face visibility before continuing with this surface. +// We cannot early exit here, however, if the transform is animating and not known on the main thread. +// FIXME: Also compute back-face visibility for surfaces that are not in existing 3D rendering context, using +//the layer's local transform. https://bugs.webkit.org/show_bug.cgi?id=84195 +if (layerIsInExisting3DRenderingContext(layer) transformToParentIsKnown(layer) !layer-doubleSided() combinedTransform.isBackFaceVisible()) +return false; + if (!layer-renderSurface()) layer-createRenderSurface(); Modified: branches/chromium/1132/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (118118 => 118119) --- branches/chromium/1132/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-05-23 04:27:57 UTC (rev 118118) +++ branches/chromium/1132/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-05-23 04:32:28 UTC (rev 118119) @@ -1325,6 +1325,69 @@ EXPECT_TRUE(childOfAnimatingSurface-visibleLayerRect().isEmpty()); } +TEST(CCLayerTreeHostCommonTest, verifyBackFaceCullingWithPreserves3dForFlatteningSurface) +{ +// Verify the behavior of back-face culling for a renderSurface that is created +// when it flattens its subtree, and its parent has preserves-3d. + +const TransformationMatrix identityMatrix; +RefPtrLayerChromium parent = LayerChromium::create(); +RefPtrLayerChromiumWithForcedDrawsContent frontFacingSurface = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent backFacingSurface = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent child1 = adoptRef(new LayerChromiumWithForcedDrawsContent()); +RefPtrLayerChromiumWithForcedDrawsContent child2 = adoptRef(new LayerChromiumWithForcedDrawsContent()); + +parent-createRenderSurface(); +parent-addChild(frontFacingSurface); +parent-addChild(backFacingSurface); +frontFacingSurface-addChild(child1); +backFacingSurface-addChild(child2); + +// RenderSurfaces are not double-sided +
[webkit-changes] [117645] trunk/Source
Title: [117645] trunk/Source Revision 117645 Author shawnsi...@chromium.org Date 2012-05-18 15:27:18 -0700 (Fri, 18 May 2012) Log Message [chromium] add back-face visibility check for renderSurfaces https://bugs.webkit.org/show_bug.cgi?id=86870 Reviewed by Adrienne Walker. Source/WebCore: Test added CCLayerTreeHostCommonTest::verifyBackFaceCullingWithPreserves3dForFlatteningSurface Chromium was not checking back-face visibility for renderSurfaces that needed it. This patch adds that check and the appropriate unit test. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::layerIsInExisting3DRenderingContext): (WebCore): (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsAndVisibilityInternal): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: (WebKitTests::TEST): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (117644 => 117645) --- trunk/Source/WebCore/ChangeLog 2012-05-18 22:24:00 UTC (rev 117644) +++ trunk/Source/WebCore/ChangeLog 2012-05-18 22:27:18 UTC (rev 117645) @@ -1,3 +1,22 @@ +2012-05-18 Shawn Singh shawnsi...@chromium.org + +[chromium] add back-face visibility check for renderSurfaces +https://bugs.webkit.org/show_bug.cgi?id=86870 + +Reviewed by Adrienne Walker. + +Test added CCLayerTreeHostCommonTest::verifyBackFaceCullingWithPreserves3dForFlatteningSurface + +Chromium was not checking back-face visibility for renderSurfaces +that needed it. This patch adds that check and the appropriate +unit test. + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::layerIsInExisting3DRenderingContext): +(WebCore): +(WebCore::subtreeShouldRenderToSeparateSurface): +(WebCore::calculateDrawTransformsAndVisibilityInternal): + 2012-05-18 Levi Weintraub le...@chromium.org Standalone table-columns should be wrapped in anonymous tables Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (117644 => 117645) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-05-18 22:24:00 UTC (rev 117644) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-05-18 22:27:18 UTC (rev 117645) @@ -66,6 +66,14 @@ } templatetypename LayerType +static inline bool layerIsInExisting3DRenderingContext(LayerType* layer) +{ +// According to current W3C spec on CSS transforms, a layer is part of an established +// 3d rendering context if its parent has transform-style of preserves-3d. +return layer-parent() layer-parent()-preserves3D(); +} + +templatetypename LayerType static IntRect calculateVisibleLayerRect(LayerType* layer) { ASSERT(layer-targetRenderSurface()); @@ -211,7 +219,7 @@ // If the layer flattens its subtree (i.e. the layer doesn't preserve-3d), but it is // treated as a 3D object by its parent (i.e. parent does preserve-3d). -if (layer-parent() layer-parent()-preserves3D() !layer-preserves3D() descendantDrawsContent) +if (layerIsInExisting3DRenderingContext(layer) !layer-preserves3D() descendantDrawsContent) return true; // On the main thread side, animating transforms are unknown, and may cause a RenderSurface on the impl side. @@ -382,6 +390,14 @@ layer-setUsesLayerClipping(false); if (subtreeShouldRenderToSeparateSurface(layer, isScaleOrTranslation(combinedTransform))) { + +// We need to check back-face visibility before continuing with this surface. +// We cannot early exit here, however, if the transform is animating and not known on the main thread. +// FIXME: Also compute back-face visibility for surfaces that are not in existing 3D rendering context, using +//the layer's local transform. https://bugs.webkit.org/show_bug.cgi?id=84195 +if (layerIsInExisting3DRenderingContext(layer) transformToParentIsKnown(layer) !layer-doubleSided() combinedTransform.isBackFaceVisible()) +return false; + if (!layer-renderSurface()) layer-createRenderSurface(); Modified: trunk/Source/WebKit/chromium/ChangeLog (117644 => 117645) --- trunk/Source/WebKit/chromium/ChangeLog 2012-05-18 22:24:00 UTC (rev 117644) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-18 22:27:18 UTC (rev 117645) @@ -1,3 +1,14 @@ +2012-05-18 Shawn Singh shawnsi...@chromium.org + +[chromium] add back-face visibility check for renderSurfaces +https://bugs.webkit.org/show_bug.cgi?id=86870 + +Reviewed by Adrienne Walker. + +* tests/CCLayerTreeHostCommonTest.cpp: +(WebKitTests::TEST): +(WebKitTests): +
[webkit-changes] [117199] trunk/Source/WebKit/chromium
Title: [117199] trunk/Source/WebKit/chromium Revision 117199 Author shawnsi...@chromium.org Date 2012-05-15 18:24:00 -0700 (Tue, 15 May 2012) Log Message [chromium] Add unit testing to WebTransformationMatrix https://bugs.webkit.org/show_bug.cgi?id=86421 Reviewed by Adrienne Walker. * WebKit.gypi: * tests/WebTransformationMatrixTest.cpp: Added. (WebKit): (WebKit::printTransform): (WebKit::initializeTestMatrix): (WebKit::initializeTestMatrix2): (WebKit::TEST): Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/WebKit.gypi Added Paths trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (117198 => 117199) --- trunk/Source/WebKit/chromium/ChangeLog 2012-05-16 00:56:54 UTC (rev 117198) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-16 01:24:00 UTC (rev 117199) @@ -1,3 +1,18 @@ +2012-05-15 Shawn Singh shawnsi...@chromium.org + +[chromium] Add unit testing to WebTransformationMatrix +https://bugs.webkit.org/show_bug.cgi?id=86421 + +Reviewed by Adrienne Walker. + +* WebKit.gypi: +* tests/WebTransformationMatrixTest.cpp: Added. +(WebKit): +(WebKit::printTransform): +(WebKit::initializeTestMatrix): +(WebKit::initializeTestMatrix2): +(WebKit::TEST): + 2012-05-15 James Robinson jam...@chromium.org [chromium] Chromium port never sets USE(CG) so code behind it is dead Modified: trunk/Source/WebKit/chromium/WebKit.gypi (117198 => 117199) --- trunk/Source/WebKit/chromium/WebKit.gypi 2012-05-16 00:56:54 UTC (rev 117198) +++ trunk/Source/WebKit/chromium/WebKit.gypi 2012-05-16 01:24:00 UTC (rev 117199) @@ -147,6 +147,7 @@ 'tests/WebPageSerializerTest.cpp', 'tests/WebSocketDeflaterTest.cpp', 'tests/WebSocketExtensionDispatcherTest.cpp', +'tests/WebTransformationMatrixTest.cpp', 'tests/WebURLRequestTest.cpp', 'tests/WebURLResponseTest.cpp', 'tests/WebViewTest.cpp', Added: trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp (0 => 117199) --- trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp (rev 0) +++ trunk/Source/WebKit/chromium/tests/WebTransformationMatrixTest.cpp 2012-05-16 01:24:00 UTC (rev 117199) @@ -0,0 +1,956 @@ +/* + * Copyright (C) 2012 Google Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include config.h + +#include ../../../../Platform/chromium/public/WebTransformationMatrix.h + +#include gtest/gtest.h + +#define EXPECT_ROW1_EQ(a, b, c, d, matrix) \ +EXPECT_FLOAT_EQ((a), (matrix).m11()); \ +EXPECT_FLOAT_EQ((b), (matrix).m21()); \ +EXPECT_FLOAT_EQ((c), (matrix).m31()); \ +EXPECT_FLOAT_EQ((d), (matrix).m41()); + +#define EXPECT_ROW2_EQ(a, b, c, d, matrix) \ +EXPECT_FLOAT_EQ((a), (matrix).m12()); \ +EXPECT_FLOAT_EQ((b), (matrix).m22()); \ +EXPECT_FLOAT_EQ((c), (matrix).m32()); \ +EXPECT_FLOAT_EQ((d), (matrix).m42()); + +#define EXPECT_ROW3_EQ(a, b, c, d, matrix) \ +EXPECT_FLOAT_EQ((a), (matrix).m13()); \ +EXPECT_FLOAT_EQ((b), (matrix).m23()); \ +EXPECT_FLOAT_EQ((c), (matrix).m33()); \ +EXPECT_FLOAT_EQ((d), (matrix).m43()); + +#define EXPECT_ROW4_EQ(a, b, c, d, matrix) \ +EXPECT_FLOAT_EQ((a), (matrix).m14()); \ +EXPECT_FLOAT_EQ((b), (matrix).m24()); \ +EXPECT_FLOAT_EQ((c), (matrix).m34()); \ +EXPECT_FLOAT_EQ((d), (matrix).m44()); \ + +// Checking float values for equality close to zero is not robust using
[webkit-changes] [116797] trunk/Source
Title: [116797] trunk/Source Revision 116797 Author shawnsi...@chromium.org Date 2012-05-11 13:07:12 -0700 (Fri, 11 May 2012) Log Message [chromium] Create WebTransformationMatrix interface for chromium platform https://bugs.webkit.org/show_bug.cgi?id=86049 Reviewed by James Robinson. Source/Platform: * Platform.gyp/Platform.gyp: * Platform.gypi: * chromium/public/WebTransformationMatrix.h: Added. (WebCore): (WebKit): (WebTransformationMatrix): Source/WebCore: This patch creates a WebTransformationMatrix interface. It will remain unused at the moment, until (a) unit tests are created and (b) when we are ready to make a brief transition of all other chromium code to use it. * WebCore.gypi: * platform/chromium/support/WebTransformationMatrix.cpp: Added. (WebKit): (WebKit::WebTransformationMatrix::WebTransformationMatrix): (WebKit::WebTransformationMatrix::operator=): (WebKit::WebTransformationMatrix::operator==): (WebKit::WebTransformationMatrix::operator*): (WebKit::WebTransformationMatrix::inverse): (WebKit::WebTransformationMatrix::to2dTransform): (WebKit::WebTransformationMatrix::multiply): (WebKit::WebTransformationMatrix::makeIdentity): (WebKit::WebTransformationMatrix::translate): (WebKit::WebTransformationMatrix::translate3d): (WebKit::WebTransformationMatrix::translateRight3d): (WebKit::WebTransformationMatrix::scale): (WebKit::WebTransformationMatrix::scaleNonUniform): (WebKit::WebTransformationMatrix::scale3d): (WebKit::WebTransformationMatrix::rotate): (WebKit::WebTransformationMatrix::rotate3d): (WebKit::WebTransformationMatrix::skewX): (WebKit::WebTransformationMatrix::skewY): (WebKit::WebTransformationMatrix::applyPerspective): (WebKit::WebTransformationMatrix::blend): (WebKit::WebTransformationMatrix::hasPerspective): (WebKit::WebTransformationMatrix::isInvertible): (WebKit::WebTransformationMatrix::isBackFaceVisible): (WebKit::WebTransformationMatrix::isIdentity): (WebKit::WebTransformationMatrix::isIdentityOrTranslation): (WebKit::WebTransformationMatrix::isIntegerTranslation): (WebKit::WebTransformationMatrix::m11): (WebKit::WebTransformationMatrix::setM11): (WebKit::WebTransformationMatrix::m12): (WebKit::WebTransformationMatrix::setM12): (WebKit::WebTransformationMatrix::m13): (WebKit::WebTransformationMatrix::setM13): (WebKit::WebTransformationMatrix::m14): (WebKit::WebTransformationMatrix::setM14): (WebKit::WebTransformationMatrix::m21): (WebKit::WebTransformationMatrix::setM21): (WebKit::WebTransformationMatrix::m22): (WebKit::WebTransformationMatrix::setM22): (WebKit::WebTransformationMatrix::m23): (WebKit::WebTransformationMatrix::setM23): (WebKit::WebTransformationMatrix::m24): (WebKit::WebTransformationMatrix::setM24): (WebKit::WebTransformationMatrix::m31): (WebKit::WebTransformationMatrix::setM31): (WebKit::WebTransformationMatrix::m32): (WebKit::WebTransformationMatrix::setM32): (WebKit::WebTransformationMatrix::m33): (WebKit::WebTransformationMatrix::setM33): (WebKit::WebTransformationMatrix::m34): (WebKit::WebTransformationMatrix::setM34): (WebKit::WebTransformationMatrix::m41): (WebKit::WebTransformationMatrix::setM41): (WebKit::WebTransformationMatrix::m42): (WebKit::WebTransformationMatrix::setM42): (WebKit::WebTransformationMatrix::m43): (WebKit::WebTransformationMatrix::setM43): (WebKit::WebTransformationMatrix::m44): (WebKit::WebTransformationMatrix::setM44): (WebKit::WebTransformationMatrix::a): (WebKit::WebTransformationMatrix::setA): (WebKit::WebTransformationMatrix::b): (WebKit::WebTransformationMatrix::setB): (WebKit::WebTransformationMatrix::c): (WebKit::WebTransformationMatrix::setC): (WebKit::WebTransformationMatrix::d): (WebKit::WebTransformationMatrix::setD): (WebKit::WebTransformationMatrix::e): (WebKit::WebTransformationMatrix::setE): (WebKit::WebTransformationMatrix::f): (WebKit::WebTransformationMatrix::setF): (WebKit::WebTransformationMatrix::toWebCoreTransform): (WebKit::WebTransformationMatrix::mapRect): (WebKit::WebTransformationMatrix::mapPoint): (WebKit::WebTransformationMatrix::mapQuad): (WebKit::WebTransformationMatrix::projectPoint): Modified Paths trunk/Source/Platform/ChangeLog trunk/Source/Platform/Platform.gyp/Platform.gyp trunk/Source/Platform/Platform.gypi trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gypi Added Paths trunk/Source/Platform/chromium/public/WebTransformationMatrix.h trunk/Source/WebCore/platform/chromium/support/WebTransformationMatrix.cpp Diff Modified: trunk/Source/Platform/ChangeLog (116796 => 116797) --- trunk/Source/Platform/ChangeLog 2012-05-11 19:49:28 UTC (rev 116796) +++ trunk/Source/Platform/ChangeLog 2012-05-11 20:07:12 UTC (rev 116797) @@ -1,3 +1,17 @@ +2012-05-11 Shawn Singh shawnsi...@chromium.org + +[chromium] Create WebTransformationMatrix interface for chromium platform +https://bugs.webkit.org/show_bug.cgi?id=86049 + +Reviewed by James Robinson. + +* Platform.gyp/Platform.gyp: +* Platform.gypi: +*
[webkit-changes] [116835] trunk/Source
Title: [116835] trunk/Source Revision 116835 Author shawnsi...@chromium.org Date 2012-05-11 19:20:50 -0700 (Fri, 11 May 2012) Log Message [chromium] Plumb --show-paint-rects to accelerated compositor https://bugs.webkit.org/show_bug.cgi?id=86255 Reviewed by James Robinson. Source/Platform: * chromium/public/WebLayerTreeView.h: (WebKit::WebLayerTreeView::Settings::Settings): (Settings): Source/WebKit/chromium: * public/WebSettings.h: * src/WebLayerTreeView.cpp: (WebKit::WebLayerTreeView::Settings::operator CCSettings): * src/WebSettingsImpl.cpp: (WebKit::WebSettingsImpl::WebSettingsImpl): (WebKit::WebSettingsImpl::setShowPaintRects): (WebKit): * src/WebSettingsImpl.h: (WebSettingsImpl): (WebKit::WebSettingsImpl::showFPSCounter): (WebKit::WebSettingsImpl::showPlatformLayerTree): (WebKit::WebSettingsImpl::showPaintRects): * src/WebViewImpl.cpp: (WebKit::WebViewImpl::settingsImpl): (WebKit::WebViewImpl::settings): (WebKit): (WebKit::WebViewImpl::setIsAcceleratedCompositingActive): * src/WebViewImpl.h: Modified Paths trunk/Source/Platform/ChangeLog trunk/Source/Platform/chromium/public/WebLayerTreeView.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/public/WebSettings.h trunk/Source/WebKit/chromium/src/WebLayerTreeView.cpp trunk/Source/WebKit/chromium/src/WebSettingsImpl.cpp trunk/Source/WebKit/chromium/src/WebSettingsImpl.h trunk/Source/WebKit/chromium/src/WebViewImpl.cpp trunk/Source/WebKit/chromium/src/WebViewImpl.h Diff Modified: trunk/Source/Platform/ChangeLog (116834 => 116835) --- trunk/Source/Platform/ChangeLog 2012-05-12 02:11:10 UTC (rev 116834) +++ trunk/Source/Platform/ChangeLog 2012-05-12 02:20:50 UTC (rev 116835) @@ -1,3 +1,14 @@ +2012-05-11 Shawn Singh shawnsi...@chromium.org + +[chromium] Plumb --show-paint-rects to accelerated compositor +https://bugs.webkit.org/show_bug.cgi?id=86255 + +Reviewed by James Robinson. + +* chromium/public/WebLayerTreeView.h: +(WebKit::WebLayerTreeView::Settings::Settings): +(Settings): + 2012-05-11 Mark Pilgrim pilg...@chromium.org [Chromium] Move createLocalStorageNamespace to Platform.h Modified: trunk/Source/Platform/chromium/public/WebLayerTreeView.h (116834 => 116835) --- trunk/Source/Platform/chromium/public/WebLayerTreeView.h 2012-05-12 02:11:10 UTC (rev 116834) +++ trunk/Source/Platform/chromium/public/WebLayerTreeView.h 2012-05-12 02:20:50 UTC (rev 116835) @@ -52,6 +52,7 @@ : acceleratePainting(false) , showFPSCounter(false) , showPlatformLayerTree(false) +, showPaintRects(false) , refreshRate(0) , perTilePainting(false) , partialSwapEnabled(false) @@ -62,6 +63,7 @@ bool acceleratePainting; bool showFPSCounter; bool showPlatformLayerTree; +bool showPaintRects; double refreshRate; bool perTilePainting; bool partialSwapEnabled; Modified: trunk/Source/WebKit/chromium/ChangeLog (116834 => 116835) --- trunk/Source/WebKit/chromium/ChangeLog 2012-05-12 02:11:10 UTC (rev 116834) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-12 02:20:50 UTC (rev 116835) @@ -1,3 +1,29 @@ +2012-05-11 Shawn Singh shawnsi...@chromium.org + +[chromium] Plumb --show-paint-rects to accelerated compositor +https://bugs.webkit.org/show_bug.cgi?id=86255 + +Reviewed by James Robinson. + +* public/WebSettings.h: +* src/WebLayerTreeView.cpp: +(WebKit::WebLayerTreeView::Settings::operator CCSettings): +* src/WebSettingsImpl.cpp: +(WebKit::WebSettingsImpl::WebSettingsImpl): +(WebKit::WebSettingsImpl::setShowPaintRects): +(WebKit): +* src/WebSettingsImpl.h: +(WebSettingsImpl): +(WebKit::WebSettingsImpl::showFPSCounter): +(WebKit::WebSettingsImpl::showPlatformLayerTree): +(WebKit::WebSettingsImpl::showPaintRects): +* src/WebViewImpl.cpp: +(WebKit::WebViewImpl::settingsImpl): +(WebKit::WebViewImpl::settings): +(WebKit): +(WebKit::WebViewImpl::setIsAcceleratedCompositingActive): +* src/WebViewImpl.h: + 2012-05-11 Ryosuke Niwa rn...@webkit.org Do a DEPS roll per build failure caused by r116810. Modified: trunk/Source/WebKit/chromium/public/WebSettings.h (116834 => 116835) --- trunk/Source/WebKit/chromium/public/WebSettings.h 2012-05-12 02:11:10 UTC (rev 116834) +++ trunk/Source/WebKit/chromium/public/WebSettings.h 2012-05-12 02:20:50 UTC (rev 116835) @@ -104,9 +104,8 @@ virtual void setWebGLErrorsToConsoleEnabled(bool) = 0; virtual void setShowDebugBorders(bool) = 0; virtual void setShowFPSCounter(bool) = 0; -virtual bool showFPSCounter() const = 0; virtual void setShowPlatformLayerTree(bool) = 0; -virtual bool showPlatformLayerTree() const = 0; +virtual void setShowPaintRects(bool) = 0; virtual void
[webkit-changes] [116543] trunk
Title: [116543] trunk Revision 116543 Author shawnsi...@chromium.org Date 2012-05-09 10:57:50 -0700 (Wed, 09 May 2012) Log Message Hit testing is incorrect in some cases with perspective transforms https://bugs.webkit.org/show_bug.cgi?id=79136 Reviewed by Simon Fraser. Source/WebCore: Tests: transforms/3d/hit-testing/coplanar-with-camera.html transforms/3d/hit-testing/perspective-clipped.html * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::projectPoint): Fix a divide-by-zero error so that values do not become Inf or Nan. Also fix an overflow error by using a large, but not-too-large constant to represent infinity. (WebCore::TransformationMatrix::projectQuad): Fix an error where incorrect quads were being returned. Incorrect quads can occur when projectPoint clamped==true after returning. LayoutTests: * transforms/3d/hit-testing/coplanar-with-camera-expected.txt: Added. * transforms/3d/hit-testing/coplanar-with-camera.html: Added. * transforms/3d/hit-testing/perspective-clipped-expected.txt: Added. * transforms/3d/hit-testing/perspective-clipped.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp Added Paths trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera-expected.txt trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera.html trunk/LayoutTests/transforms/3d/hit-testing/perspective-clipped-expected.txt trunk/LayoutTests/transforms/3d/hit-testing/perspective-clipped.html Diff Modified: trunk/LayoutTests/ChangeLog (116542 => 116543) --- trunk/LayoutTests/ChangeLog 2012-05-09 17:47:03 UTC (rev 116542) +++ trunk/LayoutTests/ChangeLog 2012-05-09 17:57:50 UTC (rev 116543) @@ -1,3 +1,15 @@ +2012-05-03 Shawn Singh shawnsi...@chromium.org + +Hit testing is incorrect in some cases with perspective transforms +https://bugs.webkit.org/show_bug.cgi?id=79136 + +Reviewed by Simon Fraser. + +* transforms/3d/hit-testing/coplanar-with-camera-expected.txt: Added. +* transforms/3d/hit-testing/coplanar-with-camera.html: Added. +* transforms/3d/hit-testing/perspective-clipped-expected.txt: Added. +* transforms/3d/hit-testing/perspective-clipped.html: Added. + 2012-05-09 Dominik Röttsches dominik.rottsc...@intel.com Textarea-placeholder-wrapping.html may fail because of scrollbars Added: trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera-expected.txt (0 => 116543) --- trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera-expected.txt (rev 0) +++ trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera-expected.txt 2012-05-09 17:57:50 UTC (rev 116543) @@ -0,0 +1,9 @@ +The text on this element should be selectable. Hovering on this element should cause a highlight. Element at 98, 200 has id background: PASS +Element at 302, 200 has id background: PASS +Element at 200, 98 has id background: PASS +Element at 200, 302 has id background: PASS +Element at 101, 200 has id layer: PASS +Element at 299, 200 has id layer: PASS +Element at 200, 101 has id layer: PASS +Element at 200, 299 has id layer: PASS + Added: trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera.html (0 => 116543) --- trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera.html (rev 0) +++ trunk/LayoutTests/transforms/3d/hit-testing/coplanar-with-camera.html 2012-05-09 17:57:50 UTC (rev 116543) @@ -0,0 +1,84 @@ +html + !-- This test reproduces a divide-by-zero error that is hopefully fixed by + https://bugs.webkit.org/show_bug.cgi?id=79136. In that bug, a layer that gets + translated by z so that it is coplanar with the camera origin. As a result, when + trying to project a point from the container space to the local space, the + implementation had a divide-by-zero which made hit-testing results incorrect. -- + +head + style type=text/css +/* Marquee content. */ +#camera { +position: absolute; +top: 100px; +left: 100px; +-webkit-perspective: 800px; +} + +#container { +-webkit-transform-style: preserve-3d; +-webkit-transform: translateZ(800px) +} + +#layer { +position: absolute; +width: 200px; +height: 200px; +background-color: green; + +/* This should theoretically cancel out the container's transform, and hit-testing should work. */ +-webkit-transform: translateZ(-800px); +} + +#background { +position: absolute; +width: 400px; +height: 400px; +background-color: gray; + } + +#layer:hover { +background-color: orange; +} + +#results { +position: absolute; +top: 420px; +left: 20px; +} + /style + + script src="" + script +const hitTestData = [ +
[webkit-changes] [116332] trunk/Source
Title: [116332] trunk/Source Revision 116332 Author shawnsi...@chromium.org Date 2012-05-07 11:48:06 -0700 (Mon, 07 May 2012) Log Message [chromium] CCMathUtil projectPoint needs to avoid divide-by-zero https://bugs.webkit.org/show_bug.cgi?id=85560 Reviewed by Adrienne Walker. Source/WebCore: Unit test added: CCMathUtilTest.cpp - verifyProjectionOfPerpendicularPlane Unit test updated/renamed: CCLayerTreeHostCommonTest.cpp - verifyVisibleRectFor3dPerspectiveWhenClippedByW The divide-by-zero occurs in an innocuous case where the layers are probably invisible anyway. However, producing Infs and NaNs could cause values to be used when un-intended, so its appropriate to handle the divide-by-zero correctly. * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::projectPoint): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: (WebKitTests::TEST): * tests/CCMathUtilTest.cpp: (WebCore::TEST): (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (116331 => 116332) --- trunk/Source/WebCore/ChangeLog 2012-05-07 18:41:08 UTC (rev 116331) +++ trunk/Source/WebCore/ChangeLog 2012-05-07 18:48:06 UTC (rev 116332) @@ -1,3 +1,21 @@ +2012-05-07 Shawn Singh shawnsi...@chromium.org + +[chromium] CCMathUtil projectPoint needs to avoid divide-by-zero +https://bugs.webkit.org/show_bug.cgi?id=85560 + +Reviewed by Adrienne Walker. + +Unit test added: CCMathUtilTest.cpp - verifyProjectionOfPerpendicularPlane +Unit test updated/renamed: CCLayerTreeHostCommonTest.cpp - verifyVisibleRectFor3dPerspectiveWhenClippedByW + +The divide-by-zero occurs in an innocuous case where the layers +are probably invisible anyway. However, producing Infs and NaNs +could cause values to be used when un-intended, so its appropriate +to handle the divide-by-zero correctly. + +* platform/graphics/chromium/cc/CCMathUtil.cpp: +(WebCore::projectPoint): + 2012-05-07 Pravin D pravind@gmail.com Wrong positioning due to wrong width calculation wrt width:0 Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp (116331 => 116332) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp 2012-05-07 18:41:08 UTC (rev 116331) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp 2012-05-07 18:48:06 UTC (rev 116332) @@ -66,6 +66,13 @@ static HomogeneousCoordinate projectPoint(const TransformationMatrix transform, const FloatPoint p) { +// In this case, the layer we are trying to project onto is perpendicular to ray +// (point p and z-axis direction) that we are trying to project. This happens when the +// layer is rotated so that it is infinitesimally thin, or when it is co-planar with +// the camera origin -- i.e. when the layer is invisible anyway. +if (!transform.m33()) +return HomogeneousCoordinate(0, 0, 0, 1); + double x = p.x(); double y = p.y(); double z = -(transform.m13() * x + transform.m23() * y + transform.m43()) / transform.m33(); Modified: trunk/Source/WebKit/chromium/ChangeLog (116331 => 116332) --- trunk/Source/WebKit/chromium/ChangeLog 2012-05-07 18:41:08 UTC (rev 116331) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-05-07 18:48:06 UTC (rev 116332) @@ -1,3 +1,16 @@ +2012-05-07 Shawn Singh shawnsi...@chromium.org + +[chromium] CCMathUtil projectPoint needs to avoid divide-by-zero +https://bugs.webkit.org/show_bug.cgi?id=85560 + +Reviewed by Adrienne Walker. + +* tests/CCLayerTreeHostCommonTest.cpp: +(WebKitTests::TEST): +* tests/CCMathUtilTest.cpp: +(WebCore::TEST): +(WebCore): + 2012-05-07 Nat Duca nd...@chromium.org Unreviewed, rolling out r115525. Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (116331 => 116332) --- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-05-07 18:41:08 UTC (rev 116331) +++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp 2012-05-07 18:48:06 UTC (rev 116332) @@ -1172,7 +1172,7 @@ EXPECT_INT_RECT_EQ(expected, actual); } -TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveIsClipped) +TEST(CCLayerTreeHostCommonTest, verifyVisibleRectFor3dPerspectiveWhenClippedByW) { // Test the calculateVisibleRect() function works correctly when projecting a surface // onto a layer, but the layer is partially behind the camera (not just behind the @@ -1190,7 +1190,7 @@ // center of the layer. layerToSurfaceTransform.makeIdentity(); layerToSurfaceTransform.applyPerspective(1); -layerToSurfaceTransform.translate3d(0, 0, 1); +
[webkit-changes] [116195] trunk/Source
Title: [116195] trunk/Source Revision 116195 Author shawnsi...@chromium.org Date 2012-05-04 17:38:03 -0700 (Fri, 04 May 2012) Log Message [chromium] Changes to layer tree structure need to be tracked properly https://bugs.webkit.org/show_bug.cgi?id=85421 Reviewed by Adrienne Walker. Unit test added: TreeSynchronizerTest.syncSimpleTreeAndTrackStackingOrderChange Source/WebCore: Earlier, we were relying on WebCore behavior that always called setNeedsDisplay whenever the layer tree structure changed. However, in general it is more correct to consider layer tree changes even when things don't need repainting; for example Aura code is encountring this bug now. This patch corrects the compositor so that layer tree structural changes are considered property changes, without requiring that layers needed to be repainted. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::LayerChromium): (WebCore::LayerChromium::insertChild): (WebCore::LayerChromium::pushPropertiesTo): * platform/graphics/chromium/LayerChromium.h: (LayerChromium): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::setStackingOrderChanged): (WebCore): * platform/graphics/chromium/cc/CCLayerImpl.h: (CCLayerImpl): Source/WebKit/chromium: * tests/TreeSynchronizerTest.cpp: (WebKitTests): (WebKitTests::TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/TreeSynchronizerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (116194 => 116195) --- trunk/Source/WebCore/ChangeLog 2012-05-05 00:10:37 UTC (rev 116194) +++ trunk/Source/WebCore/ChangeLog 2012-05-05 00:38:03 UTC (rev 116195) @@ -1,3 +1,33 @@ +2012-05-04 Shawn Singh shawnsi...@chromium.org + +[chromium] Changes to layer tree structure need to be tracked properly +https://bugs.webkit.org/show_bug.cgi?id=85421 + +Reviewed by Adrienne Walker. + +Unit test added: TreeSynchronizerTest.syncSimpleTreeAndTrackStackingOrderChange + +Earlier, we were relying on WebCore behavior that always called +setNeedsDisplay whenever the layer tree structure changed. +However, in general it is more correct to consider layer tree +changes even when things don't need repainting; for example Aura +code is encountring this bug now. This patch corrects the +compositor so that layer tree structural changes are considered +property changes, without requiring that layers needed to be +repainted. + +* platform/graphics/chromium/LayerChromium.cpp: +(WebCore::LayerChromium::LayerChromium): +(WebCore::LayerChromium::insertChild): +(WebCore::LayerChromium::pushPropertiesTo): +* platform/graphics/chromium/LayerChromium.h: +(LayerChromium): +* platform/graphics/chromium/cc/CCLayerImpl.cpp: +(WebCore::CCLayerImpl::setStackingOrderChanged): +(WebCore): +* platform/graphics/chromium/cc/CCLayerImpl.h: +(CCLayerImpl): + 2012-05-04 Jeffrey Pfau jp...@apple.com Unreviewed; build fix after r116191. Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp (116194 => 116195) --- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-05-05 00:10:37 UTC (rev 116194) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-05-05 00:38:03 UTC (rev 116195) @@ -57,6 +57,7 @@ LayerChromium::LayerChromium() : m_needsDisplay(false) +, m_stackingOrderChanged(false) , m_layerId(s_nextLayerId++) , m_parent(0) , m_layerTreeHost(0) @@ -153,6 +154,7 @@ index = min(index, m_children.size()); child-removeFromParent(); child-setParent(this); +child-m_stackingOrderChanged = true; m_children.insert(index, child); setNeedsCommit(); } @@ -514,6 +516,8 @@ layer-setScrollDelta(layer-scrollDelta() - layer-sentScrollDelta()); layer-setSentScrollDelta(IntSize()); +layer-setStackingOrderChanged(m_stackingOrderChanged); + if (maskLayer()) maskLayer()-pushPropertiesTo(layer-maskLayer()); if (replicaLayer()) @@ -522,6 +526,7 @@ m_layerAnimationController-pushAnimationUpdatesTo(layer-layerAnimationController()); // Reset any state that should be cleared for the next update. +m_stackingOrderChanged = false; m_updateRect = FloatRect(); } Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h (116194 => 116195) --- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h 2012-05-05 00:10:37 UTC (rev 116194) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h 2012-05-05
[webkit-changes] [115386] trunk/Source
Title: [115386] trunk/Source Revision 115386 Author shawnsi...@chromium.org Date 2012-04-26 17:00:27 -0700 (Thu, 26 Apr 2012) Log Message Source/WebCore: Re-implement backFaceVisibility to avoid dealing with perspective w 0 problem https://bugs.webkit.org/show_bug.cgi?id=84059 Reviewed by Adrienne Walker. Unit tests added to CCMathUtilTest.cpp. This patch changes the implementation of backFaceIsVisible so that it doesn't need to deal with the w 0 problem from of perspective projections. Instead, it is equally correct to simply use the inverse-transpose of the matrix, and quickly check the third row, third column element. Additionally, it was appropriate to move this function into TransformationMatrix itself. Making this change fixes some issues related to disappearing layers in Chromium (where the compositor incorrectly thought that the back face was visible, and skipped the layer). * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateVisibleLayerRect): (WebCore::layerShouldBeSkipped): * platform/graphics/transforms/TransformationMatrix.cpp: (WebCore::TransformationMatrix::isBackFaceVisible): (WebCore): * platform/graphics/transforms/TransformationMatrix.h: (TransformationMatrix): Source/WebKit/chromium: [chromium] re-implement backFaceVisibility to avoid dealing with perspective w0 problem https://bugs.webkit.org/show_bug.cgi?id=84059 Reviewed by Adrienne Walker. * WebKit.gypi: * tests/CCMathUtilTest.cpp: Added. (WebCore): (WebCore::TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.cpp trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/WebKit.gypi Added Paths trunk/Source/WebKit/chromium/tests/CCMathUtilTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (115385 => 115386) --- trunk/Source/WebCore/ChangeLog 2012-04-26 23:03:06 UTC (rev 115385) +++ trunk/Source/WebCore/ChangeLog 2012-04-27 00:00:27 UTC (rev 115386) @@ -1,3 +1,32 @@ +2012-04-26 Shawn Singh shawnsi...@chromium.org + +Re-implement backFaceVisibility to avoid dealing with perspective w 0 problem +https://bugs.webkit.org/show_bug.cgi?id=84059 + +Reviewed by Adrienne Walker. + +Unit tests added to CCMathUtilTest.cpp. + +This patch changes the implementation of backFaceIsVisible so that +it doesn't need to deal with the w 0 problem from of perspective +projections. Instead, it is equally correct to simply use the +inverse-transpose of the matrix, and quickly check the third row, +third column element. Additionally, it was appropriate to move +this function into TransformationMatrix itself. + +Making this change fixes some issues related to disappearing +layers in Chromium (where the compositor incorrectly thought that +the back face was visible, and skipped the layer). + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::calculateVisibleLayerRect): +(WebCore::layerShouldBeSkipped): +* platform/graphics/transforms/TransformationMatrix.cpp: +(WebCore::TransformationMatrix::isBackFaceVisible): +(WebCore): +* platform/graphics/transforms/TransformationMatrix.h: +(TransformationMatrix): + 2012-04-26 Martin Robinson mrobin...@igalia.com [Cairo] Wrap cairo surfaces in a class when storing native images Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (115385 => 115386) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-04-26 23:03:06 UTC (rev 115385) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-04-27 00:00:27 UTC (rev 115386) @@ -42,20 +42,6 @@ namespace WebCore { -templatetypename LayerType -static inline bool backFaceIsVisible(LayerType* layer) -{ -// This is checked by computing the transformed normal of the layer in screen space. -FloatRect layerRect(FloatPoint(0, 0), FloatSize(layer-bounds())); -FloatQuad mappedLayer = layer-screenSpaceTransform().mapQuad(FloatQuad(layerRect)); -FloatSize horizontalDir = mappedLayer.p2() - mappedLayer.p1(); -FloatSize verticalDir = mappedLayer.p4() - mappedLayer.p1(); -FloatPoint3D xAxis(horizontalDir.width(), horizontalDir.height(), 0); -FloatPoint3D yAxis(verticalDir.width(), verticalDir.height(), 0); -FloatPoint3D zAxis = xAxis.cross(yAxis); -return zAxis.z() 0; -} - IntRect CCLayerTreeHostCommon::calculateVisibleRect(const IntRect targetSurfaceRect, const IntRect layerBoundRect, const TransformationMatrix transform) { // Is this layer fully contained within the target surface? @@ -86,7 +72,7 @@ // Animated layers can exist in the render surface
[webkit-changes] [114858] trunk/Source
Title: [114858] trunk/Source Revision 114858 Author shawnsi...@chromium.org Date 2012-04-22 13:22:24 -0700 (Sun, 22 Apr 2012) Log Message [chromium] Damage Tracker needs to use CCMathUtil transforms https://bugs.webkit.org/show_bug.cgi?id=84070 Reviewed by Adrienne Walker. Source/WebCore: Unit test added to CCDamageTracker.cpp. This patch makes CCDamageTracker use CCMathUtil transforms, so that perspective w 0 problem is correctly handled. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForLayer): (WebCore::CCDamageTracker::extendDamageForRenderSurface): Source/WebKit/chromium: * tests/CCDamageTrackerTest.cpp: (WebKitTests::TEST_F): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (114857 => 114858) --- trunk/Source/WebCore/ChangeLog 2012-04-22 16:43:27 UTC (rev 114857) +++ trunk/Source/WebCore/ChangeLog 2012-04-22 20:22:24 UTC (rev 114858) @@ -1,3 +1,19 @@ +2012-04-22 Shawn Singh shawnsi...@chromium.org + +[chromium] Damage Tracker needs to use CCMathUtil transforms +https://bugs.webkit.org/show_bug.cgi?id=84070 + +Reviewed by Adrienne Walker. + +Unit test added to CCDamageTracker.cpp. + +This patch makes CCDamageTracker use CCMathUtil transforms, so +that perspective w 0 problem is correctly handled. + +* platform/graphics/chromium/cc/CCDamageTracker.cpp: +(WebCore::CCDamageTracker::extendDamageForLayer): +(WebCore::CCDamageTracker::extendDamageForRenderSurface): + 2012-04-20 Jon Lee jon...@apple.com Add Notification constructor Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp (114857 => 114858) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-04-22 16:43:27 UTC (rev 114857) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-04-22 20:22:24 UTC (rev 114858) @@ -37,6 +37,7 @@ #include FilterOperations.h #include cc/CCLayerImpl.h #include cc/CCLayerTreeHostCommon.h +#include cc/CCMathUtil.h #include cc/CCRenderSurface.h namespace WebCore { @@ -228,7 +229,7 @@ bool layerIsNew = false; FloatRect oldLayerRect = removeRectFromCurrentFrame(layer-id(), layerIsNew); -FloatRect layerRectInTargetSpace = originTransform.mapRect(FloatRect(FloatPoint::zero(), layer-bounds())); +FloatRect layerRectInTargetSpace = CCMathUtil::mapClippedRect(originTransform, FloatRect(FloatPoint::zero(), layer-bounds())); saveRectForNextFrame(layer-id(), layerRectInTargetSpace); if (layerIsNew || layer-layerPropertyChanged()) { @@ -241,7 +242,7 @@ } else if (!layer-updateRect().isEmpty()) { // If the layer properties havent changed, then the the target surface is only // affected by the layer's update area, which could be empty. -FloatRect updateRectInTargetSpace = originTransform.mapRect(layer-updateRect()); +FloatRect updateRectInTargetSpace = CCMathUtil::mapClippedRect(originTransform, layer-updateRect()); targetDamageRect.uniteIfNonZero(updateRectInTargetSpace); } } @@ -283,12 +284,12 @@ // If there was damage, transform it to target space, and possibly contribute its reflection if needed. if (!damageRectInLocalSpace.isEmpty()) { const TransformationMatrix originTransform = renderSurface-originTransform(); -FloatRect damageRectInTargetSpace = originTransform.mapRect(damageRectInLocalSpace); +FloatRect damageRectInTargetSpace = CCMathUtil::mapClippedRect(originTransform, damageRectInLocalSpace); targetDamageRect.uniteIfNonZero(damageRectInTargetSpace); if (layer-replicaLayer()) { const TransformationMatrix replicaOriginTransform = renderSurface-replicaOriginTransform(); -targetDamageRect.uniteIfNonZero(replicaOriginTransform.mapRect(damageRectInLocalSpace)); +targetDamageRect.uniteIfNonZero(CCMathUtil::mapClippedRect(replicaOriginTransform, damageRectInLocalSpace)); } } @@ -301,7 +302,7 @@ // Compute the replica's originTransform that maps from the replica's origin space to the target surface origin space. const TransformationMatrix replicaOriginTransform = renderSurface-replicaOriginTransform(); -FloatRect replicaMaskLayerRect = replicaOriginTransform.mapRect(FloatRect(FloatPoint::zero(), FloatSize(replicaMaskLayer-bounds().width(), replicaMaskLayer-bounds().height(; +FloatRect replicaMaskLayerRect = CCMathUtil::mapClippedRect(replicaOriginTransform, FloatRect(FloatPoint::zero(), FloatSize(replicaMaskLayer-bounds().width(), replicaMaskLayer-bounds().height(; saveRectForNextFrame(replicaMaskLayer-id(),
[webkit-changes] [114147] trunk/Source/WebCore
Title: [114147] trunk/Source/WebCore Revision 114147 Author shawnsi...@chromium.org Date 2012-04-13 11:06:50 -0700 (Fri, 13 Apr 2012) Log Message [chromium] Support CCHeadsUpDisplay in threaded compositing mode https://bugs.webkit.org/show_bug.cgi?id=67499 Reviewed by James Robinson. No new tests because this code is debugging code itself. The last item that was needed to make the CCHeadsUpDisplay work in threaded compositing mode was to remove the font rendering code used on the impl-side thread. To solve this, this patch adds a CCFontAtlas that is initialized on the main thread (where the font rendering takes place). Then, when the HUD draws text on the impl thread, it uses the font atlas directly. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::create): (WebCore::LayerRendererChromium::initialize): * platform/graphics/chromium/LayerRendererChromium.h: (WebCore): (LayerRendererChromium): * platform/graphics/chromium/cc/CCFontAtlas.cpp: Added. (WebCore): (WebCore::CCFontAtlas::CCFontAtlas): (WebCore::wrapPositionIfNeeded): (WebCore::CCFontAtlas::generateAtlasForFont): (WebCore::CCFontAtlas::initialize): (WebCore::CCFontAtlas::drawText): (WebCore::CCFontAtlas::drawOneLineOfTextInternal): (WebCore::CCFontAtlas::drawDebugAtlas): * platform/graphics/chromium/cc/CCFontAtlas.h: Added. (WebCore): (CCFontAtlas): (WebCore::CCFontAtlas::create): * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp: (WebCore::CCHeadsUpDisplay::CCHeadsUpDisplay): (WebCore): (WebCore::CCHeadsUpDisplay::showPlatformLayerTree): (WebCore::CCHeadsUpDisplay::drawHudContents): (WebCore::CCHeadsUpDisplay::drawFPSCounter): (WebCore::CCHeadsUpDisplay::drawFPSCounterText): (WebCore::CCHeadsUpDisplay::drawPlatformLayerTree): * platform/graphics/chromium/cc/CCHeadsUpDisplay.h: (WebCore::CCHeadsUpDisplay::create): (CCHeadsUpDisplay): * platform/graphics/chromium/cc/CCLayerTreeHost.cpp: (WebCore::CCLayerTreeHost::initialize): * platform/graphics/chromium/cc/CCLayerTreeHost.h: (WebCore): (WebCore::CCLayerTreeHost::headsUpDisplayFontAtlas): (CCLayerTreeHost): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore): (CCLayerTreeHostImpl): * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::initializeLayerRenderer): (WebCore::CCSingleThreadProxy::recreateContext): * platform/graphics/chromium/cc/CCThreadProxy.cpp: (WebCore::CCThreadProxy::initializeLayerRendererOnImplThread): (WebCore::CCThreadProxy::recreateContextOnImplThread): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gypi trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCHeadsUpDisplay.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCThreadProxy.cpp Added Paths trunk/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCFontAtlas.h Diff Modified: trunk/Source/WebCore/ChangeLog (114146 => 114147) --- trunk/Source/WebCore/ChangeLog 2012-04-13 18:06:15 UTC (rev 114146) +++ trunk/Source/WebCore/ChangeLog 2012-04-13 18:06:50 UTC (rev 114147) @@ -1,3 +1,68 @@ +2012-04-12 Shawn Singh shawnsi...@chromium.org + +[chromium] Support CCHeadsUpDisplay in threaded compositing mode +https://bugs.webkit.org/show_bug.cgi?id=67499 + +Reviewed by James Robinson. + +No new tests because this code is debugging code itself. + +The last item that was needed to make the CCHeadsUpDisplay work in +threaded compositing mode was to remove the font rendering code +used on the impl-side thread. To solve this, this patch adds a +CCFontAtlas that is initialized on the main thread (where the font +rendering takes place). Then, when the HUD draws text on the impl +thread, it uses the font atlas directly. + +* WebCore.gypi: +* platform/graphics/chromium/LayerRendererChromium.cpp: +(WebCore::LayerRendererChromium::create): +(WebCore::LayerRendererChromium::initialize): +* platform/graphics/chromium/LayerRendererChromium.h: +(WebCore): +(LayerRendererChromium): +* platform/graphics/chromium/cc/CCFontAtlas.cpp: Added. +(WebCore): +(WebCore::CCFontAtlas::CCFontAtlas): +
[webkit-changes] [113606] trunk/Source
Title: [113606] trunk/Source Revision 113606 Author shawnsi...@chromium.org Date 2012-04-09 12:31:56 -0700 (Mon, 09 Apr 2012) Log Message [chromium] Fix layer sorting perspective w if w becomes negative https://bugs.webkit.org/show_bug.cgi?id=82997 Reviewed by Adrienne Walker. Source/WebCore: Unit test added to CCLayerSorterTest.cpp. This is a follow-up patch after r113364. That other patch implemented proper clipping so that perspective transforms do not accidentally make geometry disappear. This patch fixes a similar problem in the layer sorter code so that layers do not accidentally get sorted incorrectly. * platform/graphics/chromium/cc/CCLayerSorter.cpp: (WebCore::CCLayerSorter::LayerShape::LayerShape): * platform/graphics/chromium/cc/CCMathUtil.cpp: (WebCore::computeEnclosingRect): (WebCore::addVertexToClippedQuad): (WebCore::CCMathUtil::mapClippedQuad): (WebCore): (WebCore::CCMathUtil::computeEnclosingRectOfVertices): * platform/graphics/chromium/cc/CCMathUtil.h: (WebCore): (CCMathUtil): Source/WebKit/chromium: * tests/CCLayerSorterTest.cpp: (WebCore::TEST): (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerSorterTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113605 => 113606) --- trunk/Source/WebCore/ChangeLog 2012-04-09 19:31:39 UTC (rev 113605) +++ trunk/Source/WebCore/ChangeLog 2012-04-09 19:31:56 UTC (rev 113606) @@ -1,3 +1,30 @@ +2012-04-09 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix layer sorting perspective w if w becomes negative +https://bugs.webkit.org/show_bug.cgi?id=82997 + +Reviewed by Adrienne Walker. + +Unit test added to CCLayerSorterTest.cpp. + +This is a follow-up patch after r113364. That other patch +implemented proper clipping so that perspective transforms do not +accidentally make geometry disappear. This patch fixes a similar +problem in the layer sorter code so that layers do not +accidentally get sorted incorrectly. + +* platform/graphics/chromium/cc/CCLayerSorter.cpp: +(WebCore::CCLayerSorter::LayerShape::LayerShape): +* platform/graphics/chromium/cc/CCMathUtil.cpp: +(WebCore::computeEnclosingRect): +(WebCore::addVertexToClippedQuad): +(WebCore::CCMathUtil::mapClippedQuad): +(WebCore): +(WebCore::CCMathUtil::computeEnclosingRectOfVertices): +* platform/graphics/chromium/cc/CCMathUtil.h: +(WebCore): +(CCMathUtil): + 2012-04-09 Martin Robinson mrobin...@igalia.com [soup] Crash while loading http://www.jusco.cn Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.cpp (113605 => 113606) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.cpp 2012-04-09 19:31:39 UTC (rev 113605) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerSorter.cpp 2012-04-09 19:31:56 UTC (rev 113606) @@ -27,6 +27,7 @@ #include cc/CCLayerSorter.h #include TransformationMatrix.h +#include cc/CCMathUtil.h #include cc/CCRenderSurface.h #include limits.h #include wtf/Deque.h @@ -158,9 +159,31 @@ FloatPoint(-width * 0.5, -height * 0.5)); // Compute the projection of the layer quad onto the z = 0 plane. -projectedQuad = drawTransform.mapQuad(layerQuad); -projectedBounds = projectedQuad.boundingBox(); +FloatPoint clippedQuad[8]; +int numVerticesInClippedQuad; +CCMathUtil::mapClippedQuad(drawTransform, layerQuad, clippedQuad, numVerticesInClippedQuad); + +if (numVerticesInClippedQuad 3) { +projectedBounds = FloatRect(); +return; +} + +projectedBounds = CCMathUtil::computeEnclosingRectOfVertices(clippedQuad, numVerticesInClippedQuad); + +// NOTE: it will require very significant refactoring and overhead to deal with +// generalized polygons or multiple quads per layer here. For the sake of layer +// sorting it is equally correct to take a subsection of the polygon that can be made +// into a quad. This will only be incorrect in the case of intersecting layers, which +// are not supported yet anyway. +projectedQuad.setP1(clippedQuad[0]); +projectedQuad.setP2(clippedQuad[1]); +projectedQuad.setP3(clippedQuad[2]); +if (numVerticesInClippedQuad = 4) +projectedQuad.setP4(clippedQuad[3]); +else +projectedQuad.setP4(clippedQuad[2]); // this will be a degenerate quad that is actually a triangle. + // Compute the normal of the layer's plane. FloatPoint3D c1 = drawTransform.mapPoint(FloatPoint3D(0, 0, 0)); FloatPoint3D c2 = drawTransform.mapPoint(FloatPoint3D(0, 1, 0)); Modified:
[webkit-changes] [113341] trunk/Source
Title: [113341] trunk/Source Revision 113341 Author shawnsi...@chromium.org Date 2012-04-05 11:24:16 -0700 (Thu, 05 Apr 2012) Log Message [chromium] Need to clip to homogeneous w=0 plane when applying transforms. https://bugs.webkit.org/show_bug.cgi?id=80806 Reviewed by Adrienne Walker. Source/WebCore: Unit tests added to CCLayerTreeHostCommon. This change is also covered by other existing unit tests and layout tests. WebCore TransformationMatrix mapRect / mapQuad / projectQuad do not properly handle the case where a surface is oriented partially behind the camera, with a perspective projection. In this case, projected points may appear to be valid in cartesian coordinates, but they are indeed not valid, and this problem can only be detected in homogeneous coordinates after applying the transform, before the divide-by-w step. The correct solution is to clip geometry where w 0. This patch makes this change local to chromium only, to fix rendering bugs that arise from this problem. The primary fix is to correct calculateVisibleLayerRect(), but other ancillary locations are also fixed, in particular, the antialiasing code path is simply skipped when this case arises. Eventually this math needs to be merged into TransformationMatrix, to fix hit-testing bugs that occur in both Chromium and Safari. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Added. (WebCore): (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::computeClippedPointForEdge): (WebCore::expandBoundsToIncludePoint): (WebCore::computeEnclosingRectOfClippedQuad): (WebCore::computeEnclosingRect): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: Added. (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeUnoccludedContentRect): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: (WebKitTests::TEST): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gypi trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Added Paths trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.h Diff Modified: trunk/Source/WebCore/ChangeLog (113340 => 113341) --- trunk/Source/WebCore/ChangeLog 2012-04-05 18:16:25 UTC (rev 113340) +++ trunk/Source/WebCore/ChangeLog 2012-04-05 18:24:16 UTC (rev 113341) @@ -1,3 +1,61 @@ +2012-04-05 Shawn Singh shawnsi...@chromium.org + +[chromium] Need to clip to homogeneous w=0 plane when applying transforms. +https://bugs.webkit.org/show_bug.cgi?id=80806 + +Reviewed by Adrienne Walker. + +Unit tests added to CCLayerTreeHostCommon. This change is also +covered by other existing unit tests and layout tests. + +WebCore TransformationMatrix mapRect / mapQuad / projectQuad do +not properly handle the case where a surface is oriented partially +behind the camera, with a perspective projection. In this case, +projected points may appear to be valid in cartesian coordinates, +but they are indeed not valid, and this problem can only be +detected in homogeneous coordinates after applying the transform, +before the divide-by-w step. + +The correct solution is to clip geometry where w 0. This patch +makes this change local to chromium only, to fix rendering bugs +that arise from this problem. The primary fix is to correct +calculateVisibleLayerRect(), but other ancillary locations are +also fixed, in particular, the antialiasing code path is simply +skipped when this case arises. + +Eventually this math needs to be merged into TransformationMatrix, +to fix hit-testing bugs that occur in both Chromium and Safari. + +* WebCore.gypi: +* platform/graphics/chromium/LayerRendererChromium.cpp: +(WebCore::findTileProgramUniforms): +(WebCore::LayerRendererChromium::drawTileQuad): +*
[webkit-changes] [113347] trunk/Source
Title: [113347] trunk/Source Revision 113347 Author shawnsi...@chromium.org Date 2012-04-05 12:00:16 -0700 (Thu, 05 Apr 2012) Log Message Unreviewed, rolling out r113341. http://trac.webkit.org/changeset/113341 https://bugs.webkit.org/show_bug.cgi?id=83299 bots caught some build errors (Requested by shawnsingh on #webkit). Patch by Sheriff Bot webkit.review@gmail.com on 2012-04-05 Source/WebCore: * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed. * platform/graphics/chromium/cc/CCMathUtil.h: Removed. * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::projectQuad): (WebCore): (WebCore::computeUnoccludedContentRect): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gypi trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Removed Paths trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.h Diff Modified: trunk/Source/WebCore/ChangeLog (113346 => 113347) --- trunk/Source/WebCore/ChangeLog 2012-04-05 18:57:57 UTC (rev 113346) +++ trunk/Source/WebCore/ChangeLog 2012-04-05 19:00:16 UTC (rev 113347) @@ -1,3 +1,27 @@ +2012-04-05 Sheriff Bot webkit.review@gmail.com + +Unreviewed, rolling out r113341. +http://trac.webkit.org/changeset/113341 +https://bugs.webkit.org/show_bug.cgi?id=83299 + +bots caught some build errors (Requested by shawnsingh on +#webkit). + +* WebCore.gypi: +* platform/graphics/chromium/LayerRendererChromium.cpp: +(WebCore::findTileProgramUniforms): +(WebCore::LayerRendererChromium::drawTileQuad): +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::CCLayerTreeHostCommon::calculateVisibleRect): +(WebCore::isScaleOrTranslation): +(WebCore::calculateDrawTransformsAndVisibilityInternal): +* platform/graphics/chromium/cc/CCMathUtil.cpp: Removed. +* platform/graphics/chromium/cc/CCMathUtil.h: Removed. +* platform/graphics/chromium/cc/CCOcclusionTracker.cpp: +(WebCore::projectQuad): +(WebCore): +(WebCore::computeUnoccludedContentRect): + 2012-04-05 Justin Novosad ju...@chromium.org [Chromium] With the skia port, setting LCD text filtering is causing Modified: trunk/Source/WebCore/WebCore.gypi (113346 => 113347) --- trunk/Source/WebCore/WebCore.gypi 2012-04-05 18:57:57 UTC (rev 113346) +++ trunk/Source/WebCore/WebCore.gypi 2012-04-05 19:00:16 UTC (rev 113347) @@ -3607,8 +3607,6 @@ 'platform/graphics/chromium/cc/CCLayerTreeHostCommon.h', 'platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp', 'platform/graphics/chromium/cc/CCLayerTreeHostImpl.h', -'platform/graphics/chromium/cc/CCMathUtil.cpp', -'platform/graphics/chromium/cc/CCMathUtil.h', 'platform/graphics/chromium/cc/CCOcclusionTracker.cpp', 'platform/graphics/chromium/cc/CCOcclusionTracker.h', 'platform/graphics/chromium/cc/CCOverdrawMetrics.cpp', Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (113346 => 113347) --- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2012-04-05 18:57:57 UTC (rev 113346) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2012-04-05 19:00:16 UTC (rev 113347) @@ -55,7 +55,6 @@ #include cc/CCDebugBorderDrawQuad.h #include cc/CCLayerImpl.h #include cc/CCLayerTreeHostCommon.h -#include cc/CCMathUtil.h #include cc/CCProxy.h #include cc/CCRenderPass.h #include cc/CCRenderSurfaceDrawQuad.h @@ -565,11 +564,9 @@ uniforms.edgeLocation = program-fragmentShader().edgeLocation(); } -static void findTileProgramUniforms(LayerRendererChromium* layerRenderer, const CCTileDrawQuad* quad, TileProgramUniforms uniforms, bool quadIsClipped) +static void findTileProgramUniforms(LayerRendererChromium* layerRenderer, const CCTileDrawQuad* quad, TileProgramUniforms uniforms) { -// For now, we simply skip anti-aliasing with the quad is clipped. This only happens -// on perspective transformed layers that go partially behind the camera. -if (quad-isAntialiased() !quadIsClipped) { +
[webkit-changes] [113364] trunk/Source
Title: [113364] trunk/Source Revision 113364 Author shawnsi...@chromium.org Date 2012-04-05 13:14:18 -0700 (Thu, 05 Apr 2012) Log Message [chromium] Need to clip to homogeneous w=0 plane when applying transforms. https://bugs.webkit.org/show_bug.cgi?id=80806 Reviewed by Adrienne Walker. Source/WebCore: Unit tests added to CCLayerTreeHostCommon. This change is also covered by other existing unit tests and layout tests. WebCore TransformationMatrix mapRect / mapQuad / projectQuad do not properly handle the case where a surface is oriented partially behind the camera, with a perspective projection. In this case, projected points may appear to be valid in cartesian coordinates, but they are indeed not valid, and this problem can only be detected in homogeneous coordinates after applying the transform, before the divide-by-w step. The correct solution is to clip geometry where w 0. This patch makes this change local to chromium only, to fix rendering bugs that arise from this problem. The primary fix is to correct calculateVisibleLayerRect(), but other ancillary locations are also fixed, in particular, the antialiasing code path is simply skipped when this case arises. Eventually this math needs to be merged into TransformationMatrix, to fix hit-testing bugs that occur in both Chromium and Safari. * WebCore.gypi: * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::findTileProgramUniforms): (WebCore::LayerRendererChromium::drawTileQuad): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::CCLayerTreeHostCommon::calculateVisibleRect): (WebCore::isScaleOrTranslation): (WebCore::calculateDrawTransformsAndVisibilityInternal): * platform/graphics/chromium/cc/CCMathUtil.cpp: Added. (WebCore): (WebCore::HomogeneousCoordinate::HomogeneousCoordinate): (HomogeneousCoordinate): (WebCore::HomogeneousCoordinate::shouldBeClipped): (WebCore::HomogeneousCoordinate::cartesianPoint2d): (WebCore::projectPoint): (WebCore::mapPoint): (WebCore::computeClippedPointForEdge): (WebCore::expandBoundsToIncludePoint): (WebCore::computeEnclosingRectOfClippedQuad): (WebCore::computeEnclosingRect): (WebCore::CCMathUtil::mapClippedRect): (WebCore::CCMathUtil::projectClippedRect): (WebCore::CCMathUtil::mapQuad): (WebCore::CCMathUtil::projectQuad): * platform/graphics/chromium/cc/CCMathUtil.h: Added. (WebCore): (CCMathUtil): * platform/graphics/chromium/cc/CCOcclusionTracker.cpp: (WebCore::computeUnoccludedContentRect): Source/WebKit/chromium: * tests/CCLayerTreeHostCommonTest.cpp: (WebKitTests::TEST): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/WebCore.gypi trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp Added Paths trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCMathUtil.h Diff Modified: trunk/Source/WebCore/ChangeLog (113363 => 113364) --- trunk/Source/WebCore/ChangeLog 2012-04-05 20:09:33 UTC (rev 113363) +++ trunk/Source/WebCore/ChangeLog 2012-04-05 20:14:18 UTC (rev 113364) @@ -1,3 +1,61 @@ +2012-04-05 Shawn Singh shawnsi...@chromium.org + +[chromium] Need to clip to homogeneous w=0 plane when applying transforms. +https://bugs.webkit.org/show_bug.cgi?id=80806 + +Reviewed by Adrienne Walker. + +Unit tests added to CCLayerTreeHostCommon. This change is also +covered by other existing unit tests and layout tests. + +WebCore TransformationMatrix mapRect / mapQuad / projectQuad do +not properly handle the case where a surface is oriented partially +behind the camera, with a perspective projection. In this case, +projected points may appear to be valid in cartesian coordinates, +but they are indeed not valid, and this problem can only be +detected in homogeneous coordinates after applying the transform, +before the divide-by-w step. + +The correct solution is to clip geometry where w 0. This patch +makes this change local to chromium only, to fix rendering bugs +that arise from this problem. The primary fix is to correct +calculateVisibleLayerRect(), but other ancillary locations are +also fixed, in particular, the antialiasing code path is simply +skipped when this case arises. + +Eventually this math needs to be merged into TransformationMatrix, +to fix hit-testing bugs that occur in both Chromium and Safari. + +* WebCore.gypi: +* platform/graphics/chromium/LayerRendererChromium.cpp: +(WebCore::findTileProgramUniforms): +(WebCore::LayerRendererChromium::drawTileQuad): +*
[webkit-changes] [113248] trunk/Source
Title: [113248] trunk/Source Revision 113248 Author shawnsi...@chromium.org Date 2012-04-04 15:23:28 -0700 (Wed, 04 Apr 2012) Log Message [chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl https://bugs.webkit.org/show_bug.cgi?id=82091 Reviewed by James Robinson. Source/WebCore: No new tests needed, minor refactoring covered by existing tests. This patch is just a minor cleanup, moving clearRenderSurfacesOnCCLayerImplRecursive() from LayerRendererChromium to CCLayerTreeHostImpl. It makes more sense to place the code there, so that LayerRendererChromium is more like a blind utility for drawing things while CCLayerTreeHostImpl actually manages the state of the resources. * platform/graphics/chromium/LayerRendererChromium.cpp: (WebCore::LayerRendererChromium::beginDrawingFrame): * platform/graphics/chromium/LayerRendererChromium.h: (LayerRendererChromium): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): (WebCore::CCLayerTreeHostImpl::sendDidLoseContextRecursive): (WebCore::CCLayerTreeHostImpl::clearRenderSurfacesOnCCLayerImplRecursive): (WebCore): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: (WebCore::CCLayerTreeHostImpl::rootLayer): (CCLayerTreeHostImpl): Source/WebKit/chromium: * tests/LayerRendererChromiumTest.cpp: (FakeLayerRendererChromiumClient::FakeLayerRendererChromiumClient): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/LayerRendererChromiumTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (113247 => 113248) --- trunk/Source/WebCore/ChangeLog 2012-04-04 22:23:10 UTC (rev 113247) +++ trunk/Source/WebCore/ChangeLog 2012-04-04 22:23:28 UTC (rev 113248) @@ -1,3 +1,31 @@ +2012-04-04 Shawn Singh shawnsi...@chromium.org + +[chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl +https://bugs.webkit.org/show_bug.cgi?id=82091 + +Reviewed by James Robinson. + +No new tests needed, minor refactoring covered by existing tests. + +This patch is just a minor cleanup, moving clearRenderSurfacesOnCCLayerImplRecursive() +from LayerRendererChromium to CCLayerTreeHostImpl. It makes more sense to place the code +there, so that LayerRendererChromium is more like a blind utility for drawing things +while CCLayerTreeHostImpl actually manages the state of the resources. + +* platform/graphics/chromium/LayerRendererChromium.cpp: +(WebCore::LayerRendererChromium::beginDrawingFrame): +* platform/graphics/chromium/LayerRendererChromium.h: +(LayerRendererChromium): +* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: +(WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl): +(WebCore::CCLayerTreeHostImpl::initializeLayerRenderer): +(WebCore::CCLayerTreeHostImpl::sendDidLoseContextRecursive): +(WebCore::CCLayerTreeHostImpl::clearRenderSurfacesOnCCLayerImplRecursive): +(WebCore): +* platform/graphics/chromium/cc/CCLayerTreeHostImpl.h: +(WebCore::CCLayerTreeHostImpl::rootLayer): +(CCLayerTreeHostImpl): + 2012-04-04 Chris Rogers crog...@google.com Web Audio should use MutexTryLocker class Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (113247 => 113248) --- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2012-04-04 22:23:10 UTC (rev 113247) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2012-04-04 22:23:28 UTC (rev 113248) @@ -320,19 +320,6 @@ cleanupSharedObjects(); } -void LayerRendererChromium::clearRenderSurfacesOnCCLayerImplRecursive(CCLayerImpl* layer) -{ -for (size_t i = 0; i layer-children().size(); ++i) -clearRenderSurfacesOnCCLayerImplRecursive(layer-children()[i].get()); -layer-clearRenderSurface(); -} - -void LayerRendererChromium::close() -{ -if (rootLayer()) -clearRenderSurfacesOnCCLayerImplRecursive(rootLayer()); -} - GraphicsContext3D* LayerRendererChromium::context() { return m_context.get(); @@ -407,6 +394,7 @@ ensureFramebuffer(); m_defaultRenderSurface = rootLayer()-renderSurface(); +ASSERT(m_defaultRenderSurface); // FIXME: use the frame begin time from the overall compositor scheduler. // This value is currently inaccessible because it is up in Chromium's Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.h (113247 => 113248) ---
[webkit-changes] [113070] trunk/Source/WebCore
Title: [113070] trunk/Source/WebCore Revision 113070 Author shawnsi...@chromium.org Date 2012-04-03 12:24:31 -0700 (Tue, 03 Apr 2012) Log Message [chromium] remove dead function declarations in RenderSurfacechromium https://bugs.webkit.org/show_bug.cgi?id=82086 Reviewed by James Robinson. No tests needed, no change in behavior. * platform/graphics/chromium/RenderSurfaceChromium.h: (RenderSurfaceChromium): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h Diff Modified: trunk/Source/WebCore/ChangeLog (113069 => 113070) --- trunk/Source/WebCore/ChangeLog 2012-04-03 19:21:09 UTC (rev 113069) +++ trunk/Source/WebCore/ChangeLog 2012-04-03 19:24:31 UTC (rev 113070) @@ -1,3 +1,15 @@ +2012-04-03 Shawn Singh shawnsi...@chromium.org + +[chromium] remove dead function declarations in RenderSurfacechromium +https://bugs.webkit.org/show_bug.cgi?id=82086 + +Reviewed by James Robinson. + +No tests needed, no change in behavior. + +* platform/graphics/chromium/RenderSurfaceChromium.h: +(RenderSurfaceChromium): + 2012-04-03 Jia Pu j...@apple.com Rename GraphicsContext::drawLineForTextChecking() to GraphicsContext::drawLineForDocumentMarker() Modified: trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h (113069 => 113070) --- trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h 2012-04-03 19:21:09 UTC (rev 113069) +++ trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h 2012-04-03 19:24:31 UTC (rev 113070) @@ -50,10 +50,6 @@ explicit RenderSurfaceChromium(LayerChromium*); ~RenderSurfaceChromium(); -bool prepareContentsTexture(); -void releaseContentsTexture(); -void draw(const IntRect targetSurfaceRect); - // Returns the rect that encloses the RenderSurface including any reflection. FloatRect drawableContentRect() const; ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [113078] trunk/Source/WebKit/chromium
Title: [113078] trunk/Source/WebKit/chromium Revision 113078 Author shawnsi...@chromium.org Date 2012-04-03 13:16:05 -0700 (Tue, 03 Apr 2012) Log Message [chromium] Fix incorrect comment in CCDamageTrackerTest https://bugs.webkit.org/show_bug.cgi?id=82118 Reviewed by Adrienne Walker. * tests/CCDamageTrackerTest.cpp: (WebKitTests::TEST_F): Modified Paths trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebKit/chromium/ChangeLog (113077 => 113078) --- trunk/Source/WebKit/chromium/ChangeLog 2012-04-03 20:15:00 UTC (rev 113077) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-04-03 20:16:05 UTC (rev 113078) @@ -1,3 +1,13 @@ +2012-04-03 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix incorrect comment in CCDamageTrackerTest +https://bugs.webkit.org/show_bug.cgi?id=82118 + +Reviewed by Adrienne Walker. + +* tests/CCDamageTrackerTest.cpp: +(WebKitTests::TEST_F): + 2012-04-03 Adam Barth aba...@webkit.org Another attempt to fix the Windows build. This uses WebSecurityOrigin Modified: trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp (113077 => 113078) --- trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp 2012-04-03 20:15:00 UTC (rev 113077) +++ trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp 2012-04-03 20:16:05 UTC (rev 113078) @@ -804,12 +804,8 @@ CCLayerImpl* grandChild1 = child1-children()[0].get(); // Verify that the correct replicaOriginTransform is used for the replicaMask; the -// incorrect old code did not actually correctly account for the anchor for the -// replica. -// -// Create a reflection about the left edge, but the anchor point is shifted all the -// way to the right. this case the reflection should be directly on top (but -// horizontally flipped) of grandChild1. +// incorrect old code incorrectly accounted for the anchor for the replica. A +// non-zero anchor point should not affect the replica reflection. grandChild1-setAnchorPoint(FloatPoint(1.0, 0.0)); // This is the anchor being tested. ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [112696] trunk/LayoutTests
Title: [112696] trunk/LayoutTests Revision 112696 Author shawnsi...@chromium.org Date 2012-03-30 11:13:11 -0700 (Fri, 30 Mar 2012) Log Message Unreviewed rebaseline after r112436 * platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium/test_expectations.txt: Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/test_expectations.txt trunk/LayoutTests/platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png trunk/LayoutTests/platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png trunk/LayoutTests/platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png trunk/LayoutTests/platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png trunk/LayoutTests/platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png Diff Modified: trunk/LayoutTests/ChangeLog (112695 => 112696) --- trunk/LayoutTests/ChangeLog 2012-03-30 18:09:29 UTC (rev 112695) +++ trunk/LayoutTests/ChangeLog 2012-03-30 18:13:11 UTC (rev 112696) @@ -1,3 +1,14 @@ +2012-03-30 Shawn Singh shawnsi...@chromium.org + +Unreviewed rebaseline after r112436 + +* platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png: +* platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png: +* platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png: +* platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png: +* platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png: +* platform/chromium/test_expectations.txt: + 2012-03-30 Chris Fleizach cfleiz...@apple.com AX: Crash at WebCore::renderObjectContainsPosition(WebCore::RenderObject*, WebCore::Position const) Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (112695 => 112696) --- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-30 18:09:29 UTC (rev 112695) +++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-30 18:13:11 UTC (rev 112696) @@ -4093,10 +4093,6 @@ BUGWK78412 MAC WIN : fast/repaint/scroll-relative-table-inside-table-cell.html = IMAGE BUGWK78412 MAC WIN : fast/table/cell-pref-width-invalidation.html = TEXT -// Needs rebaselining after https://bugs.webkit.org/show_bug.cgi?id=74147. -// It is correct for the reflected text to be visible. -BUGWK74147 : compositing/reflections/nested-reflection-on-overflow.html = IMAGE - // Need rebaselining. BUGWK37244 : tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT BUGWK37244 : tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT Modified: trunk/LayoutTests/platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: trunk/LayoutTests/platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: trunk/LayoutTests/platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: trunk/LayoutTests/platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: trunk/LayoutTests/platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [112702] branches/chromium/1084
Title: [112702] branches/chromium/1084 Revision 112702 Author shawnsi...@chromium.org Date 2012-03-30 11:42:25 -0700 (Fri, 30 Mar 2012) Log Message Merge 112436 - [chromium] layer-clipRect() is not initialized for layers that create a renderSurface. https://bugs.webkit.org/show_bug.cgi?id=74147 Reviewed by Adrienne Walker. Source/WebCore: Added 3 additional unit tests; Modified existing unit tests and layout tests. The layer's clipRect and usesLayerClipping information was not being initialized for layers that created a renderSurface. (It was, however, being initialized for the renderSurface itself.) This patch adds a unit test that reproduces that this is an error, other unit tests to tightly test the value of clipRect being initialized, and adds the logic to properly initialize the clipRect. Before this patch, this bug was causing flashing on tab-switch on the apple iphone page. Even worse, with partial swap enabled, the layers would simply disappear, because the first frame the clipRect is uninitialized and the layer is not drawn, and the second frame onwards, the damage tracker correctly things nothing is damaged, so it doesn't draw that layer again until other damage causes it to be redrawn. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): Source/WebKit/chromium: Added 3 more unit tests. One reproduces the clipRect problem in an integrated manner, the other two directly test that clipRects are properly initialized. * tests/CCLayerTreeHostCommonTest.cpp: (WebCore::TEST): (WebCore): * tests/CCLayerTreeTestCommon.h: (WebKitTests): LayoutTests: * platform/chromium/test_expectations.txt: marked test as needing rebaselining TBR=shawnsi...@chromium.org Review URL: https://chromiumcodereview.appspot.com/9958025 Modified Paths branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.h branches/chromium/1084/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp branches/chromium/1084/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h Diff Modified: branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt (112701 => 112702) --- branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt 2012-03-30 18:39:43 UTC (rev 112701) +++ branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt 2012-03-30 18:42:25 UTC (rev 112702) @@ -4139,6 +4139,10 @@ BUGWK78412 MAC WIN : fast/repaint/scroll-relative-table-inside-table-cell.html = IMAGE BUGWK78412 MAC WIN : fast/table/cell-pref-width-invalidation.html = TEXT +// Needs rebaselining after https://bugs.webkit.org/show_bug.cgi?id=74147. +// It is correct for the reflected text to be visible. +BUGWK74147 : compositing/reflections/nested-reflection-on-overflow.html = IMAGE + // Need rebaselining. BUGWK37244 : tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT BUGWK37244 : tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT Modified: branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h (112701 => 112702) --- branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h 2012-03-30 18:39:43 UTC (rev 112701) +++ branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h 2012-03-30 18:42:25 UTC (rev 112702) @@ -158,6 +158,7 @@ bool drawOpacityIsAnimating() const { return m_drawOpacityIsAnimating; } void setDrawOpacityIsAnimating(bool drawOpacityIsAnimating) { m_drawOpacityIsAnimating = drawOpacityIsAnimating; } +// Usage: if this-usesLayerClipping() is false, then this clipRect should not be used. const IntRect clipRect() const { return m_clipRect; } void setClipRect(const IntRect rect) { m_clipRect = rect; } CCRenderSurface* targetRenderSurface() const { return m_targetRenderSurface; } Modified: branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (112701 => 112702) --- branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-03-30 18:39:43 UTC (rev 112701) +++ branches/chromium/1084/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-03-30 18:42:25 UTC (rev 112702) @@ -370,6 +370,10 @@ // surface and is therefore expressed in the parent's coordinate system. renderSurface-setClipRect(layer-parent() ? layer-parent()-clipRect() : layer-clipRect()); +// The layer's clipRect can be reset here. The renderSurface will correctly clip the subtree.
[webkit-changes] [112704] branches/chromium/1084/LayoutTests/platform
Title: [112704] branches/chromium/1084/LayoutTests/platform Revision 112704 Author shawnsi...@chromium.org Date 2012-03-30 11:45:22 -0700 (Fri, 30 Mar 2012) Log Message Merge 112696 - Unreviewed rebaseline after r112436 * platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png: * platform/chromium/test_expectations.txt: TBR=shawnsi...@chromium.org Review URL: https://chromiumcodereview.appspot.com/9956029 Modified Paths branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt branches/chromium/1084/LayoutTests/platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png branches/chromium/1084/LayoutTests/platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png branches/chromium/1084/LayoutTests/platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png branches/chromium/1084/LayoutTests/platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png branches/chromium/1084/LayoutTests/platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png Diff Modified: branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt (112703 => 112704) --- branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt 2012-03-30 18:44:58 UTC (rev 112703) +++ branches/chromium/1084/LayoutTests/platform/chromium/test_expectations.txt 2012-03-30 18:45:22 UTC (rev 112704) @@ -4139,10 +4139,6 @@ BUGWK78412 MAC WIN : fast/repaint/scroll-relative-table-inside-table-cell.html = IMAGE BUGWK78412 MAC WIN : fast/table/cell-pref-width-invalidation.html = TEXT -// Needs rebaselining after https://bugs.webkit.org/show_bug.cgi?id=74147. -// It is correct for the reflected text to be visible. -BUGWK74147 : compositing/reflections/nested-reflection-on-overflow.html = IMAGE - // Need rebaselining. BUGWK37244 : tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT BUGWK37244 : tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT Modified: branches/chromium/1084/LayoutTests/platform/chromium-linux/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: branches/chromium/1084/LayoutTests/platform/chromium-mac/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: branches/chromium/1084/LayoutTests/platform/chromium-mac-leopard/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: branches/chromium/1084/LayoutTests/platform/chromium-mac-snowleopard/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) Modified: branches/chromium/1084/LayoutTests/platform/chromium-win/compositing/reflections/nested-reflection-on-overflow-expected.png (Binary files differ) ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [112436] trunk
Title: [112436] trunk Revision 112436 Author shawnsi...@chromium.org Date 2012-03-28 13:42:19 -0700 (Wed, 28 Mar 2012) Log Message [chromium] layer-clipRect() is not initialized for layers that create a renderSurface. https://bugs.webkit.org/show_bug.cgi?id=74147 Reviewed by Adrienne Walker. Source/WebCore: Added 3 additional unit tests; Modified existing unit tests and layout tests. The layer's clipRect and usesLayerClipping information was not being initialized for layers that created a renderSurface. (It was, however, being initialized for the renderSurface itself.) This patch adds a unit test that reproduces that this is an error, other unit tests to tightly test the value of clipRect being initialized, and adds the logic to properly initialize the clipRect. Before this patch, this bug was causing flashing on tab-switch on the apple iphone page. Even worse, with partial swap enabled, the layers would simply disappear, because the first frame the clipRect is uninitialized and the layer is not drawn, and the second frame onwards, the damage tracker correctly things nothing is damaged, so it doesn't draw that layer again until other damage causes it to be redrawn. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): Source/WebKit/chromium: Added 3 more unit tests. One reproduces the clipRect problem in an integrated manner, the other two directly test that clipRects are properly initialized. * tests/CCLayerTreeHostCommonTest.cpp: (WebCore::TEST): (WebCore): * tests/CCLayerTreeTestCommon.h: (WebKitTests): LayoutTests: * platform/chromium/test_expectations.txt: marked test as needing rebaselining Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/platform/chromium/test_expectations.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCOcclusionTracker.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCSharedQuadState.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp trunk/Source/WebKit/chromium/tests/CCLayerTreeTestCommon.h Diff Modified: trunk/LayoutTests/ChangeLog (112435 => 112436) --- trunk/LayoutTests/ChangeLog 2012-03-28 20:41:15 UTC (rev 112435) +++ trunk/LayoutTests/ChangeLog 2012-03-28 20:42:19 UTC (rev 112436) @@ -1,3 +1,12 @@ +2012-03-26 Shawn Singh shawnsi...@chromium.org + +[chromium] layer-clipRect() is not initialized for layers that create a renderSurface. +https://bugs.webkit.org/show_bug.cgi?id=74147 + +Reviewed by Adrienne Walker. + +* platform/chromium/test_expectations.txt: marked test as needing rebaselining + 2012-03-28 John Abd-El-Malek j...@chromium.org [chromium] Update worker-multi-port-expected.txt. Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (112435 => 112436) --- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-28 20:41:15 UTC (rev 112435) +++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-28 20:42:19 UTC (rev 112436) @@ -4124,6 +4124,10 @@ BUGWK78412 MAC WIN : fast/repaint/scroll-relative-table-inside-table-cell.html = IMAGE BUGWK78412 MAC WIN : fast/table/cell-pref-width-invalidation.html = TEXT +// Needs rebaselining after https://bugs.webkit.org/show_bug.cgi?id=74147. +// It is correct for the reflected text to be visible. +BUGWK74147 : compositing/reflections/nested-reflection-on-overflow.html = IMAGE + // Need rebaselining. BUGWK37244 : tables/mozilla/bugs/bug27038-1.html = IMAGE+TEXT BUGWK37244 : tables/mozilla/bugs/bug27038-2.html = IMAGE+TEXT Modified: trunk/Source/WebCore/ChangeLog (112435 => 112436) --- trunk/Source/WebCore/ChangeLog 2012-03-28 20:41:15 UTC (rev 112435) +++ trunk/Source/WebCore/ChangeLog 2012-03-28 20:42:19 UTC (rev 112436) @@ -1,3 +1,31 @@ +2012-03-26 Shawn Singh shawnsi...@chromium.org + +[chromium] layer-clipRect() is not initialized for layers that create a renderSurface. +https://bugs.webkit.org/show_bug.cgi?id=74147 + +Reviewed by Adrienne Walker. + +Added 3 additional unit tests; Modified existing unit tests and layout tests. + +The layer's clipRect and usesLayerClipping information was not +being initialized for layers that created a renderSurface. (It +was, however, being initialized for the renderSurface itself.) +This patch adds a unit test that reproduces that this is an error, +other unit tests to tightly test the value of clipRect being +initialized, and adds the logic to properly initialize the +clipRect. + +Before this patch, this bug was causing flashing on tab-switch on +the apple iphone page. Even worse,
[webkit-changes] [111982] trunk/Source
Title: [111982] trunk/Source Revision 111982 Author shawnsi...@chromium.org Date 2012-03-23 23:51:34 -0700 (Fri, 23 Mar 2012) Log Message [chromium] Incorrect replica originTransform used in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=82118 Reviewed by Adrienne Walker. Source/WebCore: Unit test added to CCDamageTrackerTest.cpp * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::extendDamageForRenderSurface): Source/WebKit/chromium: * tests/CCDamageTrackerTest.cpp: (WebKitTests::TEST_F): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (111981 => 111982) --- trunk/Source/WebCore/ChangeLog 2012-03-24 06:44:52 UTC (rev 111981) +++ trunk/Source/WebCore/ChangeLog 2012-03-24 06:51:34 UTC (rev 111982) @@ -1,3 +1,15 @@ +2012-03-23 Shawn Singh shawnsi...@chromium.org + +[chromium] Incorrect replica originTransform used in CCDamageTracker +https://bugs.webkit.org/show_bug.cgi?id=82118 + +Reviewed by Adrienne Walker. + +Unit test added to CCDamageTrackerTest.cpp + +* platform/graphics/chromium/cc/CCDamageTracker.cpp: +(WebCore::CCDamageTracker::extendDamageForRenderSurface): + 2012-03-23 Dana Jansens dan...@chromium.org [chromium] When prepainting fails, tiles dirty rects may be cleared Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp (111981 => 111982) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-03-24 06:44:52 UTC (rev 111981) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-03-24 06:51:34 UTC (rev 111982) @@ -297,11 +297,7 @@ removeRectFromCurrentFrame(replicaMaskLayer-id(), replicaIsNew); // Compute the replica's originTransform that maps from the replica's origin space to the target surface origin space. -TransformationMatrix replicaOriginTransform = layer-renderSurface()-originTransform(); -replicaOriginTransform.translate(layer-replicaLayer()-position().x(), layer-replicaLayer()-position().y()); -replicaOriginTransform.multiply(layer-replicaLayer()-transform()); -replicaOriginTransform.translate(-layer-replicaLayer()-position().x(), -layer-replicaLayer()-position().y()); - +const TransformationMatrix replicaOriginTransform = renderSurface-replicaOriginTransform(); FloatRect replicaMaskLayerRect = replicaOriginTransform.mapRect(FloatRect(FloatPoint::zero(), FloatSize(replicaMaskLayer-bounds().width(), replicaMaskLayer-bounds().height(; saveRectForNextFrame(replicaMaskLayer-id(), replicaMaskLayerRect); Modified: trunk/Source/WebKit/chromium/ChangeLog (111981 => 111982) --- trunk/Source/WebKit/chromium/ChangeLog 2012-03-24 06:44:52 UTC (rev 111981) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-24 06:51:34 UTC (rev 111982) @@ -1,3 +1,14 @@ +2012-03-23 Shawn Singh shawnsi...@chromium.org + +[chromium] Incorrect replica originTransform used in CCDamageTracker +https://bugs.webkit.org/show_bug.cgi?id=82118 + +Reviewed by Adrienne Walker. + +* tests/CCDamageTrackerTest.cpp: +(WebKitTests::TEST_F): +(WebKitTests): + 2012-03-23 Dana Jansens dan...@chromium.org [chromium] When prepainting fails, tiles dirty rects may be cleared Modified: trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp (111981 => 111982) --- trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp 2012-03-24 06:44:52 UTC (rev 111981) +++ trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp 2012-03-24 06:51:34 UTC (rev 111982) @@ -797,6 +797,56 @@ EXPECT_FLOAT_RECT_EQ(FloatRect(194, 200, 6, 8), childDamageRect); } +TEST_F(CCDamageTrackerTest, verifyDamageForReplicaMaskWithAnchor) +{ +OwnPtrCCLayerImpl root = createAndSetUpTestTreeWithTwoSurfaces(); +CCLayerImpl* child1 = root-children()[0].get(); +CCLayerImpl* grandChild1 = child1-children()[0].get(); + +// Verify that the correct replicaOriginTransform is used for the replicaMask; the +// incorrect old code did not actually correctly account for the anchor for the +// replica. +// +// Create a reflection about the left edge, but the anchor point is shifted all the +// way to the right. this case the reflection should be directly on top (but +// horizontally flipped) of grandChild1. + +grandChild1-setAnchorPoint(FloatPoint(1.0, 0.0)); // This is the anchor being tested. + +{ +OwnPtrCCLayerImpl grandChild1Replica = CCLayerImpl::create(6); +grandChild1Replica-setPosition(FloatPoint::zero()); +grandChild1Replica-setAnchorPoint(FloatPoint::zero()); // note, this is not the anchor being tested. +
[webkit-changes] [111963] trunk/Source
Title: [111963] trunk/Source Revision 111963 Author shawnsi...@chromium.org Date 2012-03-23 18:28:12 -0700 (Fri, 23 Mar 2012) Log Message [chromium] Fix race bug that clobbers CCLayerImpl updateRect https://bugs.webkit.org/show_bug.cgi?id=82109 Reviewed by Dirk Pranke. Source/WebCore: If the main thread commits twice before the impl thread actually draws, then the updateRect of the first frame gets lost forever, and not propagated to the damage tracker. The solution is to accumulate the updateRect. The CCLayerImpl updateRect is already being correctly cleared at the appropriate time after drawing. Unit test added to LayerChromiumTest.cpp. * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::pushPropertiesTo): Source/WebKit/chromium: * tests/LayerChromiumTest.cpp: Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (111962 => 111963) --- trunk/Source/WebCore/ChangeLog 2012-03-24 01:25:20 UTC (rev 111962) +++ trunk/Source/WebCore/ChangeLog 2012-03-24 01:28:12 UTC (rev 111963) @@ -1,3 +1,23 @@ +2012-03-23 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix race bug that clobbers CCLayerImpl updateRect +https://bugs.webkit.org/show_bug.cgi?id=82109 + +Reviewed by Dirk Pranke. + +If the main thread commits twice before the impl thread actually +draws, then the updateRect of the first frame gets lost forever, +and not propagated to the damage tracker. + +The solution is to accumulate the updateRect. The CCLayerImpl +updateRect is already being correctly cleared at the appropriate +time after drawing. + +Unit test added to LayerChromiumTest.cpp. + +* platform/graphics/chromium/LayerChromium.cpp: +(WebCore::LayerChromium::pushPropertiesTo): + 2012-03-23 Rafael Weinstein rafa...@chromium.org [MutationObservers] attributeFilter should be case sensitive at all times Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp (111962 => 111963) --- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-03-24 01:25:20 UTC (rev 111962) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-03-24 01:28:12 UTC (rev 111963) @@ -480,6 +480,11 @@ layer-setSublayerTransform(m_sublayerTransform); if (!transformIsAnimating()) layer-setTransform(m_transform); + +// If the main thread commits multiple times before the impl thread actually draws, then damage tracking +// will become incorrect if we simply clobber the updateRect here. The CCLayerImpl's updateRect needs to +// accumulate (i.e. union) any update changes that have occurred on the main thread. +m_updateRect.uniteIfNonZero(layer-updateRect()); layer-setUpdateRect(m_updateRect); layer-setScrollDelta(layer-scrollDelta() - layer-sentScrollDelta()); Modified: trunk/Source/WebKit/chromium/ChangeLog (111962 => 111963) --- trunk/Source/WebKit/chromium/ChangeLog 2012-03-24 01:25:20 UTC (rev 111962) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-24 01:28:12 UTC (rev 111963) @@ -1,3 +1,12 @@ +2012-03-23 Shawn Singh shawnsi...@chromium.org + +[chromium] Fix race bug that clobbers CCLayerImpl updateRect +https://bugs.webkit.org/show_bug.cgi?id=82109 + +Reviewed by Dirk Pranke. + +* tests/LayerChromiumTest.cpp: + 2012-03-23 Daniel Cheng dch...@chromium.org [chromium] Support file drag out using DataTransferItemList::add(File) Modified: trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp (111962 => 111963) --- trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp 2012-03-24 01:25:20 UTC (rev 111962) +++ trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp 2012-03-24 01:28:12 UTC (rev 111963) @@ -26,13 +26,14 @@ #include LayerChromium.h -#include cc/CCLayerTreeHost.h #include CCLayerTreeTestCommon.h #include FakeCCLayerTreeHostClient.h #include LayerPainterChromium.h #include NonCompositedContentHost.h #include WebCompositor.h +#include cc/CCLayerImpl.h #include cc/CCLayerTreeHost.h +#include cc/CCSingleThreadProxy.h #include gmock/gmock.h #include gtest/gtest.h @@ -530,6 +531,29 @@ EXPECT_TRUE(testLayer-needsDisplay()); } +TEST_F(LayerChromiumTest, verifyPushPropertiesAccumulatesUpdateRect) +{ +DebugScopedSetImplThread setImplThread; + +RefPtrLayerChromium testLayer = LayerChromium::create(); +OwnPtrCCLayerImpl implLayer = CCLayerImpl::create(1); + +testLayer-setNeedsDisplayRect(FloatRect(FloatPoint::zero(), FloatSize(5, 5))); +testLayer-pushPropertiesTo(implLayer.get()); +EXPECT_FLOAT_RECT_EQ(FloatRect(FloatPoint::zero(), FloatSize(5, 5)), implLayer-updateRect()); + +// The CCLayerImpl's updateRect should be
[webkit-changes] [111817] trunk/Source
Title: [111817] trunk/Source Revision 111817 Author shawnsi...@chromium.org Date 2012-03-22 20:02:40 -0700 (Thu, 22 Mar 2012) Log Message [chromium] Target surface should be damaged for a new layers even when layer had no changes https://bugs.webkit.org/show_bug.cgi?id=81879 Reviewed by Adrienne Walker. Source/WebCore: Unit test added to CCDamageTrackerTest. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a boolean arg to detect if the layer is new on this update. (WebCore::CCDamageTracker::extendDamageForLayer): added logic that damages the target surface if the layer is new. (WebCore::CCDamageTracker::extendDamageForRenderSurface): added logic that damages the target surface if the descendant surface is new; similar logic for the surface's replica if the replica is new. * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): Source/WebKit/chromium: * tests/CCDamageTrackerTest.cpp: (WebKitTests::TEST_F): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (111816 => 111817) --- trunk/Source/WebCore/ChangeLog 2012-03-23 02:59:53 UTC (rev 111816) +++ trunk/Source/WebCore/ChangeLog 2012-03-23 03:02:40 UTC (rev 111817) @@ -1,3 +1,26 @@ +2012-03-22 Shawn Singh shawnsi...@chromium.org + +[chromium] Target surface should be damaged for a new layers even when layer had no changes +https://bugs.webkit.org/show_bug.cgi?id=81879 + +Reviewed by Adrienne Walker. + +Unit test added to CCDamageTrackerTest. + +* platform/graphics/chromium/cc/CCDamageTracker.cpp: +(WebCore::CCDamageTracker::removeRectFromCurrentFrame): added a +boolean arg to detect if the layer is new on this update. + +(WebCore::CCDamageTracker::extendDamageForLayer): added logic that +damages the target surface if the layer is new. + +(WebCore::CCDamageTracker::extendDamageForRenderSurface): added +logic that damages the target surface if the descendant surface is +new; similar logic for the surface's replica if the replica is new. + +* platform/graphics/chromium/cc/CCDamageTracker.h: +(CCDamageTracker): + 2012-03-22 Charles Wei charles@torchmobile.com.cn [BlackBerry] Need to store the meta info of a page in the ViewState of the history Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp (111816 => 111817) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-03-23 02:59:53 UTC (rev 111816) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-03-23 03:02:40 UTC (rev 111817) @@ -142,9 +142,10 @@ swap(m_currentRectHistory, m_nextRectHistory); } -FloatRect CCDamageTracker::removeRectFromCurrentFrame(int layerID) +FloatRect CCDamageTracker::removeRectFromCurrentFrame(int layerID, bool layerIsNew) { -// This function exists mainly for readability of the code. +layerIsNew = !m_currentRectHistory-contains(layerID); + // take() will remove the entry from the map, or if not found, return a default (empty) rect. return m_currentRectHistory-take(layerID); } @@ -221,13 +222,14 @@ TransformationMatrix originTransform = layer-drawTransform(); originTransform.translate(-0.5 * layer-bounds().width(), -0.5 * layer-bounds().height()); -FloatRect oldLayerRect = removeRectFromCurrentFrame(layer-id()); +bool layerIsNew = false; +FloatRect oldLayerRect = removeRectFromCurrentFrame(layer-id(), layerIsNew); FloatRect layerRectInTargetSpace = originTransform.mapRect(FloatRect(FloatPoint::zero(), layer-bounds())); saveRectForNextFrame(layer-id(), layerRectInTargetSpace); -if (layer-layerPropertyChanged()) { -// If a layer has changed, then its entire layer rect affects the target surface. +if (layerIsNew || layer-layerPropertyChanged()) { +// If a layer is new or has changed, then its entire layer rect affects the target surface. targetDamageRect.uniteIfNonZero(layerRectInTargetSpace); // The layer's old region is now exposed on the target surface, too. @@ -257,13 +259,14 @@ CCRenderSurface* renderSurface = layer-renderSurface(); -FloatRect oldSurfaceRect = removeRectFromCurrentFrame(layer-id()); +bool surfaceIsNew = false; +FloatRect oldSurfaceRect = removeRectFromCurrentFrame(layer-id(), surfaceIsNew); FloatRect surfaceRectInTargetSpace = renderSurface-drawableContentRect(); // already includes replica if it exists. saveRectForNextFrame(layer-id(), surfaceRectInTargetSpace); FloatRect damageRectInLocalSpace; -if
[webkit-changes] [110635] trunk/Source
Title: [110635] trunk/Source Revision 110635 Author shawnsi...@chromium.org Date 2012-03-13 16:28:38 -0700 (Tue, 13 Mar 2012) Log Message [chromium] wrong transform causing incorrect culling https://bugs.webkit.org/show_bug.cgi?id=80471 Reviewed by James Robinson. Source/WebCore: Unit test added to CCRenderSurfaceTest.cpp In addition to using originTransform() instead of drawTransform(), this patch shuffles a bit of code so that a unit test can be easily added. * platform/graphics/chromium/cc/CCRenderPass.cpp: (WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): * platform/graphics/chromium/cc/CCRenderSurface.cpp: (WebCore::CCRenderSurface::createSharedQuadState): (WebCore): * platform/graphics/chromium/cc/CCRenderSurface.h: (CCRenderSurface): Source/WebKit/chromium: * tests/CCRenderSurfaceTest.cpp: (WebCore::TEST): (WebCore): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCRenderSurfaceTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (110634 => 110635) --- trunk/Source/WebCore/ChangeLog 2012-03-13 23:18:42 UTC (rev 110634) +++ trunk/Source/WebCore/ChangeLog 2012-03-13 23:28:38 UTC (rev 110635) @@ -1,3 +1,24 @@ +2012-03-13 Shawn Singh shawnsi...@chromium.org + +[chromium] wrong transform causing incorrect culling +https://bugs.webkit.org/show_bug.cgi?id=80471 + +Reviewed by James Robinson. + +Unit test added to CCRenderSurfaceTest.cpp + +In addition to using originTransform() instead of drawTransform(), +this patch shuffles a bit of code so that a unit test can be +easily added. + +* platform/graphics/chromium/cc/CCRenderPass.cpp: +(WebCore::CCRenderPass::appendQuadsForRenderSurfaceLayer): +* platform/graphics/chromium/cc/CCRenderSurface.cpp: +(WebCore::CCRenderSurface::createSharedQuadState): +(WebCore): +* platform/graphics/chromium/cc/CCRenderSurface.h: +(CCRenderSurface): + 2012-03-13 Dave Tharp dth...@codeaurora.org Alternate xml-stylesheets with no title are loaded, in violation of the CSSOM draft Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp (110634 => 110635) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp 2012-03-13 23:18:42 UTC (rev 110634) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderPass.cpp 2012-03-13 23:28:38 UTC (rev 110635) @@ -61,8 +61,7 @@ // FIXME: render surface layers should be a CCLayerImpl-derived class and // not be handled specially here. CCRenderSurface* surface = layer-renderSurface(); -bool isOpaque = false; -OwnPtrCCSharedQuadState sharedQuadState = CCSharedQuadState::create(surface-drawTransform(), surface-drawTransform(), surface-contentRect(), surface-clipRect(), surface-drawOpacity(), isOpaque); +OwnPtrCCSharedQuadState sharedQuadState = surface-createSharedQuadState(); m_quadList.append(CCRenderSurfaceDrawQuad::create(sharedQuadState.get(), surface-contentRect(), layer, surfaceDamageRect())); m_sharedQuadStateList.append(sharedQuadState.release()); } Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp (110634 => 110635) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp 2012-03-13 23:18:42 UTC (rev 110634) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp 2012-03-13 23:28:38 UTC (rev 110635) @@ -41,6 +41,7 @@ #include cc/CCLayerImpl.h #include cc/CCProxy.h #include cc/CCRenderSurfaceFilters.h +#include cc/CCSharedQuadState.h #include wtf/text/CString.h namespace WebCore { @@ -301,5 +302,11 @@ return m_surfacePropertyChanged !m_owningLayer-layerPropertyChanged(); } +PassOwnPtrCCSharedQuadState CCRenderSurface::createSharedQuadState() const +{ +bool isOpaque = false; +return CCSharedQuadState::create(originTransform(), drawTransform(), contentRect(), clipRect(), drawOpacity(), isOpaque); } + +} #endif // USE(ACCELERATED_COMPOSITING) Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h (110634 => 110635) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h 2012-03-13 23:18:42 UTC (rev 110634) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h 2012-03-13 23:28:38 UTC (rev 110635) @@ -43,6 +43,7 @@ namespace WebCore { class CCDamageTracker; +class CCSharedQuadState; class CCLayerImpl; class LayerRendererChromium; class ManagedTexture; @@ -114,6 +115,8 @@ CCDamageTracker* damageTracker() const { return m_damageTracker.get(); } +PassOwnPtrCCSharedQuadState createSharedQuadState() const; + private: void
[webkit-changes] [110456] trunk
Title: [110456] trunk Revision 110456 Author shawnsi...@chromium.org Date 2012-03-12 12:24:45 -0700 (Mon, 12 Mar 2012) Log Message Fix regression on fast/table/table-row-compositing-repaint-crash.html https://bugs.webkit.org/show_bug.cgi?id=80804 Reviewed by Simon Fraser. Covered by existing tests. http://trac.webkit.org/changeset/110401/ accidentally caused fast/table/table-row-compositing-repaint-crash.html to fail. * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): Modified Paths trunk/LayoutTests/platform/chromium/test_expectations.txt trunk/LayoutTests/platform/qt/Skipped trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp Diff Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (110455 => 110456) --- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-12 19:20:56 UTC (rev 110455) +++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-03-12 19:24:45 UTC (rev 110456) @@ -3937,7 +3937,6 @@ BUGABARTH SNOWLEOPARD : fast/events/input-image-scrolled-x-y.html = PASS CRASH BUGWK80801 : fast/js/function-constructor-error.html = TEXT -BUGWK80804 DEBUG : fast/table/table-row-compositing-repaint-crash.html = CRASH BUGWK80807 MAC : fast/events/invalid-001.html = PASS CRASH BUGWK80807 MAC : fast/events/invalid-002.html = PASS CRASH Modified: trunk/LayoutTests/platform/qt/Skipped (110455 => 110456) --- trunk/LayoutTests/platform/qt/Skipped 2012-03-12 19:20:56 UTC (rev 110455) +++ trunk/LayoutTests/platform/qt/Skipped 2012-03-12 19:24:45 UTC (rev 110456) @@ -2740,7 +2740,3 @@ # https://bugs.webkit.org/show_bug.cgi?id=75568 plugins/mouse-click-plugin-clears-selection.html fast/events/mouse-relative-position.html - -# [Qt] REGRESSION(r110401): fast/table/table-row-compositing-repaint-crash.html asserts -# https://bugs.webkit.org/show_bug.cgi?id=80833 -fast/table/table-row-compositing-repaint-crash.html Modified: trunk/Source/WebCore/ChangeLog (110455 => 110456) --- trunk/Source/WebCore/ChangeLog 2012-03-12 19:20:56 UTC (rev 110455) +++ trunk/Source/WebCore/ChangeLog 2012-03-12 19:24:45 UTC (rev 110456) @@ -1,3 +1,18 @@ +2012-03-11 Shawn Singh shawnsi...@chromium.org + +Fix regression on fast/table/table-row-compositing-repaint-crash.html +https://bugs.webkit.org/show_bug.cgi?id=80804 + +Reviewed by Simon Fraser. + +Covered by existing tests. + +http://trac.webkit.org/changeset/110401/ accidentally caused +fast/table/table-row-compositing-repaint-crash.html to fail. + +* rendering/RenderLayerCompositor.cpp: +(WebCore::RenderLayerCompositor::updateBacking): + 2012-03-12 Mike Lawther mikelawt...@chromium.org CSS3 calc: enable mixed percent/absolute for font Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (110455 => 110456) --- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2012-03-12 19:20:56 UTC (rev 110455) +++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp 2012-03-12 19:24:45 UTC (rev 110456) @@ -420,7 +420,8 @@ // The RenderLayer's needs to update repaint rects here, because the target // repaintContainer may have changed after becoming a composited layer. // https://bugs.webkit.org/show_bug.cgi?id=80641 -layer-computeRepaintRects(); +if (layer-parent()) +layer-computeRepaintRects(); #if PLATFORM(MAC) USE(CA) Settings* settings = m_renderView-document()-settings(); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [110401] trunk
Title: [110401] trunk Revision 110401 Author shawnsi...@chromium.org Date 2012-03-11 15:17:36 -0700 (Sun, 11 Mar 2012) Log Message REGRESSION (r93614): scrolling div does not repaint https://bugs.webkit.org/show_bug.cgi?id=80641 Reviewed by Simon Fraser. Source/WebCore: Test: compositing/repaint/newly-composited-repaint-rect.html * rendering/RenderLayerCompositor.cpp: (WebCore::RenderLayerCompositor::updateBacking): When a layer becomes newly composited and creates its backing, the repaintRect may become invalid. This patch recomputes repaintRects in this case. LayoutTests: * compositing/repaint/newly-composited-repaint-rect-expected.png: Added. * compositing/repaint/newly-composited-repaint-rect-expected.txt: Added. * compositing/repaint/newly-composited-repaint-rect.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp Added Paths trunk/LayoutTests/compositing/repaint/newly-composited-repaint-rect-expected.png trunk/LayoutTests/compositing/repaint/newly-composited-repaint-rect-expected.txt trunk/LayoutTests/compositing/repaint/newly-composited-repaint-rect.html Diff Modified: trunk/LayoutTests/ChangeLog (110400 => 110401) --- trunk/LayoutTests/ChangeLog 2012-03-11 22:07:06 UTC (rev 110400) +++ trunk/LayoutTests/ChangeLog 2012-03-11 22:17:36 UTC (rev 110401) @@ -1,3 +1,14 @@ +2012-03-11 Shawn Singh shawnsi...@chromium.org + +REGRESSION (r93614): scrolling div does not repaint +https://bugs.webkit.org/show_bug.cgi?id=80641 + +Reviewed by Simon Fraser. + +* compositing/repaint/newly-composited-repaint-rect-expected.png: Added. +* compositing/repaint/newly-composited-repaint-rect-expected.txt: Added. +* compositing/repaint/newly-composited-repaint-rect.html: Added. + 2012-03-11 Gavin Barraclough barraclo...@apple.com Inconsistent SyntaxError from new Function(...) Added: trunk/LayoutTests/compositing/repaint/newly-composited-repaint-rect-expected.png (0 => 110401) --- trunk/LayoutTests/compositing/repaint/newly-composited-repaint-rect-expected.png (rev 0) +++ trunk/LayoutTests/compositing/repaint/newly-composited-repaint-rect-expected.png 2012-03-11 22:17:36 UTC (rev 110401) @@ -0,0 +1,6 @@ +\x89PNG + + +IHDR X \x9Av\x82p )tEXtchecksum cb02d7c4e6fe2eb222964125a3aac0b7\x87\xF17 \xCCIDATx\x9C\xEDݱm\xC3@A\x9E\xC1\xBE\xE8\xD6\xDC;;G- +\x82\xBC4ș\xF8\xFCD\xC1\xEAsι \xCE \xB8 d \x90 @F\x80 d \x90Y\x8F\x8C1\x8A;\xE0\xFC\xAD \xC0c s\xB8\x80\xFC\xF0\xCB.\xFC\xCER \xF0 \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 \x99\xF5\xEC\xDEe|\x8D\xB3O\xB8\x9C\xFDs\xF9\xB3۶\xBD\xEF .\xC3 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90Y\xCF\x80\xFFk\xDF\xF7\x97?\xBBm\xDB\xFB \xE02, @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90s\xCE\xF9\xF0\xC1˲,\xCB\xC13\xB85\xDF \x80\xE7X@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 \xC8 #@ \x80\x8C 2 Ȭ\xCFc\xFC\xE5 \xC0 +X@ \x80\xCC\xE12\xE7,\xEE n\xC0 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90
[webkit-changes] [109965] trunk/Source/WebCore
Title: [109965] trunk/Source/WebCore Revision 109965 Author shawnsi...@chromium.org Date 2012-03-06 15:09:37 -0800 (Tue, 06 Mar 2012) Log Message [chromium] Make compositeAndReadback and damage tracking play nicely together https://bugs.webkit.org/show_bug.cgi?id=80199 Reviewed by James Robinson. Requires system-level testing (pixels on front-buffer should be observed for correct behavior) that cannot be done by layout tests or unit tests, have to rely on manual testing. * platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: (WebCore::CCSingleThreadProxy::compositeAndReadback): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (109964 => 109965) --- trunk/Source/WebCore/ChangeLog 2012-03-06 23:06:51 UTC (rev 109964) +++ trunk/Source/WebCore/ChangeLog 2012-03-06 23:09:37 UTC (rev 109965) @@ -1,3 +1,17 @@ +2012-03-06 Shawn Singh shawnsi...@chromium.org + +[chromium] Make compositeAndReadback and damage tracking play nicely together +https://bugs.webkit.org/show_bug.cgi?id=80199 + +Reviewed by James Robinson. + +Requires system-level testing (pixels on front-buffer should be +observed for correct behavior) that cannot be done by layout tests +or unit tests, have to rely on manual testing. + +* platform/graphics/chromium/cc/CCSingleThreadProxy.cpp: +(WebCore::CCSingleThreadProxy::compositeAndReadback): + 2012-03-06 Luke Macpherson macpher...@chromium.org Make CSSStyleSelector::convertToLength() behave more like CSSPrimitiveValue::convertToLength(). Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp (109964 => 109965) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp 2012-03-06 23:06:51 UTC (rev 109964) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp 2012-03-06 23:09:37 UTC (rev 109965) @@ -80,11 +80,12 @@ m_layerTreeHostImpl-readback(pixels, rect); -didSwapFrame(); - if (m_layerTreeHostImpl-isContextLost()) return false; +m_layerTreeHostImpl-swapBuffers(); +didSwapFrame(); + return true; } ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [109794] branches/chromium/1025
Title: [109794] branches/chromium/1025 Revision 109794 Author shawnsi...@chromium.org Date 2012-03-05 13:44:05 -0800 (Mon, 05 Mar 2012) Log Message Merge 109060 - RenderLayer ClipRect not accounting for transforms https://bugs.webkit.org/show_bug.cgi?id=76486 Reviewed by Simon Fraser. Source/WebCore: Test: compositing/layer-creation/overlap-transformed-and-clipped.html This patch changes calculateClipRects() so that the clipRect offset is allowed to be converted across layers with transforms. This is necessary because the RenderLayerCompositor needs clipRects in document space, rather than with respect to some local clipping layer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderObject.cpp: (WebCore::RenderObject::localToContainerPoint): (WebCore): * rendering/RenderObject.h: (RenderObject): LayoutTests: * compositing/layer-creation/overlap-transformed-and-clipped-expected.png: Added. * compositing/layer-creation/overlap-transformed-and-clipped-expected.txt: Added. * compositing/layer-creation/overlap-transformed-and-clipped.html: Added. TBR=shawnsi...@chromium.org Review URL: https://chromiumcodereview.appspot.com/9599025 Modified Paths branches/chromium/1025/Source/WebCore/rendering/RenderLayer.cpp branches/chromium/1025/Source/WebCore/rendering/RenderObject.cpp branches/chromium/1025/Source/WebCore/rendering/RenderObject.h Added Paths branches/chromium/1025/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png branches/chromium/1025/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt branches/chromium/1025/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped.html Diff Copied: branches/chromium/1025/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png (from rev 109060, trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png) (0 => 109794) --- branches/chromium/1025/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png (rev 0) +++ branches/chromium/1025/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png 2012-03-05 21:44:05 UTC (rev 109794) @@ -0,0 +1,4 @@ +\x89PNG + + +IHDR X \x9Av\x82p )tEXtchecksum 38db6661a8f7b1efa64f4cb51638e167Krjk \x81IDATx\x9C\xED\xD91\x84@A\x96\x8F#^n\xD2/\xEA\xA2\xEA\x938hy\xCD\xCC\xBCκ\xD7\xEE \xFC\x98\xCB \xFC\xE3\xDC= \xF8 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90Y33\xBBG \xDF\xE0 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90
[webkit-changes] [109060] trunk
Title: [109060] trunk Revision 109060 Author shawnsi...@chromium.org Date 2012-02-27 18:36:59 -0800 (Mon, 27 Feb 2012) Log Message RenderLayer ClipRect not accounting for transforms https://bugs.webkit.org/show_bug.cgi?id=76486 Reviewed by Simon Fraser. Source/WebCore: Test: compositing/layer-creation/overlap-transformed-and-clipped.html This patch changes calculateClipRects() so that the clipRect offset is allowed to be converted across layers with transforms. This is necessary because the RenderLayerCompositor needs clipRects in document space, rather than with respect to some local clipping layer. * rendering/RenderLayer.cpp: (WebCore::RenderLayer::calculateClipRects): * rendering/RenderObject.cpp: (WebCore::RenderObject::localToContainerPoint): (WebCore): * rendering/RenderObject.h: (RenderObject): LayoutTests: * compositing/layer-creation/overlap-transformed-and-clipped-expected.png: Added. * compositing/layer-creation/overlap-transformed-and-clipped-expected.txt: Added. * compositing/layer-creation/overlap-transformed-and-clipped.html: Added. Modified Paths trunk/LayoutTests/ChangeLog trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayer.cpp trunk/Source/WebCore/rendering/RenderObject.cpp trunk/Source/WebCore/rendering/RenderObject.h Added Paths trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.txt trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped.html Diff Modified: trunk/LayoutTests/ChangeLog (109059 => 109060) --- trunk/LayoutTests/ChangeLog 2012-02-28 02:35:29 UTC (rev 109059) +++ trunk/LayoutTests/ChangeLog 2012-02-28 02:36:59 UTC (rev 109060) @@ -1,3 +1,14 @@ +2012-02-27 Shawn Singh shawnsi...@chromium.org + +RenderLayer ClipRect not accounting for transforms +https://bugs.webkit.org/show_bug.cgi?id=76486 + +Reviewed by Simon Fraser. + +* compositing/layer-creation/overlap-transformed-and-clipped-expected.png: Added. +* compositing/layer-creation/overlap-transformed-and-clipped-expected.txt: Added. +* compositing/layer-creation/overlap-transformed-and-clipped.html: Added. + 2012-02-27 Adam Klein ad...@chromium.org [MutationObservers] Clear pending mutation records on disconnect() Added: trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png (0 => 109060) --- trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png (rev 0) +++ trunk/LayoutTests/compositing/layer-creation/overlap-transformed-and-clipped-expected.png 2012-02-28 02:36:59 UTC (rev 109060) @@ -0,0 +1,4 @@ +\x89PNG + + +IHDR X \x9Av\x82p )tEXtchecksum 38db6661a8f7b1efa64f4cb51638e167Krjk \x81IDATx\x9C\xED\xD91\x84@A\x96\x8F#^n\xD2/\xEA\xA2\xEA\x938hy\xCD\xCC\xBCκ\xD7\xEE \xFC\x98\xCB \xFC\xE3\xDC= \xF8 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90Y33\xBBG \xDF\xE0 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90 @F\x80 d \x90
[webkit-changes] [108426] trunk/Source/WebCore
Title: [108426] trunk/Source/WebCore Revision 108426 Author shawnsi...@chromium.org Date 2012-02-21 17:49:36 -0800 (Tue, 21 Feb 2012) Log Message [chromium] Refactor CCLayerTreeHostCommon: merge scattered setTargetRenderSurface logic https://bugs.webkit.org/show_bug.cgi?id=78936 Reviewed by James Robinson. No change in behavior, the code moved around already covered by existing tests. In calculateDrawTransformsAndVisibility(), there are two separate if-else statements where setTargetRenderSurface logic is performed, and this makes the code less readable and more error prone. This patch merges the logic, removing the redundant if-else statements. This code also merges one other set of if-statements that are equivalent, if (layer-parent()) and if (layer!=rootLayer). * platform/graphics/chromium/LayerChromium.cpp: (WebCore::LayerChromium::createRenderSurface): * platform/graphics/chromium/cc/CCLayerImpl.cpp: (WebCore::CCLayerImpl::createRenderSurface): * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::calculateDrawTransformsAndVisibilityInternal): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (108425 => 108426) --- trunk/Source/WebCore/ChangeLog 2012-02-22 01:36:11 UTC (rev 108425) +++ trunk/Source/WebCore/ChangeLog 2012-02-22 01:49:36 UTC (rev 108426) @@ -1,3 +1,28 @@ +2012-02-21 Shawn Singh shawnsi...@chromium.org + +[chromium] Refactor CCLayerTreeHostCommon: merge scattered setTargetRenderSurface logic +https://bugs.webkit.org/show_bug.cgi?id=78936 + +Reviewed by James Robinson. + +No change in behavior, the code moved around already covered by existing tests. + +In calculateDrawTransformsAndVisibility(), there are two separate +if-else statements where setTargetRenderSurface logic is +performed, and this makes the code less readable and more error +prone. This patch merges the logic, removing the redundant if-else +statements. + +This code also merges one other set of if-statements that are +equivalent, if (layer-parent()) and if (layer!=rootLayer). + +* platform/graphics/chromium/LayerChromium.cpp: +(WebCore::LayerChromium::createRenderSurface): +* platform/graphics/chromium/cc/CCLayerImpl.cpp: +(WebCore::CCLayerImpl::createRenderSurface): +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::calculateDrawTransformsAndVisibilityInternal): + 2012-02-21 Kentaro Hara hara...@chromium.org Remove FIXME from resolve-supplemental.pl Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp (108425 => 108426) --- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-02-22 01:36:11 UTC (rev 108425) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp 2012-02-22 01:49:36 UTC (rev 108426) @@ -503,6 +503,7 @@ { ASSERT(!m_renderSurface); m_renderSurface = adoptPtr(new RenderSurfaceChromium(this)); +setTargetRenderSurface(m_renderSurface.get()); } bool LayerChromium::descendantDrawsContent() Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp (108425 => 108426) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp 2012-02-22 01:36:11 UTC (rev 108425) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp 2012-02-22 01:49:36 UTC (rev 108426) @@ -104,6 +104,7 @@ { ASSERT(!m_renderSurface); m_renderSurface = adoptPtr(new CCRenderSurface(this)); +setTargetRenderSurface(m_renderSurface.get()); } bool CCLayerImpl::descendantDrawsContent() Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (108425 => 108426) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-02-22 01:36:11 UTC (rev 108425) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-02-22 01:49:36 UTC (rev 108426) @@ -323,18 +323,19 @@ layer-setDrawOpacity(drawOpacity); -if (layer-parent()) { +if (layer != rootLayer) { +ASSERT(layer-parent()); +layer-clearRenderSurface(); + // Layers inherit the clip rect from their parent. layer-setClipRect(layer-parent()-clipRect()); if (layer-parent()-usesLayerClipping()) layer-setUsesLayerClipping(true); +// Layers without their own renderSurface will render into the nearest ancestor surface. layer-setTargetRenderSurface(layer-parent()-targetRenderSurface()); } -if (layer != rootLayer) -layer-clearRenderSurface(); - if
[webkit-changes] [107921] trunk/Source/WebCore
Title: [107921] trunk/Source/WebCore Revision 107921 Author shawnsi...@chromium.org Date 2012-02-16 04:15:50 -0800 (Thu, 16 Feb 2012) Log Message [chromium] Refactor CCLayerTreeHostCommon: create helper function for complex boolean condition https://bugs.webkit.org/show_bug.cgi?id=78539 Reviewed by James Robinson. This change should introduce no change in behavior, and its expected behavior is already covered by existing tests. In calculateDrawTransformsAndVisibility, there is a complex boolean condition that indicates whether we should create a RenderSurface or not. This patch pulls out that boolean logic, and wraps it in a helper function for much better readability. * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: (WebCore::layerShouldBeSkipped): (WebCore): (WebCore::subtreeShouldRenderToSeparateSurface): (WebCore::calculateDrawTransformsAndVisibilityInternal): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (107920 => 107921) --- trunk/Source/WebCore/ChangeLog 2012-02-16 12:11:33 UTC (rev 107920) +++ trunk/Source/WebCore/ChangeLog 2012-02-16 12:15:50 UTC (rev 107921) @@ -1,3 +1,24 @@ +2012-02-16 Shawn Singh shawnsi...@chromium.org + +[chromium] Refactor CCLayerTreeHostCommon: create helper function for complex boolean condition +https://bugs.webkit.org/show_bug.cgi?id=78539 + +Reviewed by James Robinson. + +This change should introduce no change in behavior, and its +expected behavior is already covered by existing tests. + +In calculateDrawTransformsAndVisibility, there is a complex +boolean condition that indicates whether we should create a +RenderSurface or not. This patch pulls out that boolean logic, +and wraps it in a helper function for much better readability. + +* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp: +(WebCore::layerShouldBeSkipped): +(WebCore): +(WebCore::subtreeShouldRenderToSeparateSurface): +(WebCore::calculateDrawTransformsAndVisibilityInternal): + 2012-02-16 Andrey Kosyakov ca...@chromium.org Web Inspector: [refactoring] move timeline overview sidebar creation to TimelineOverviewPane Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (107920 => 107921) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-02-16 12:11:33 UTC (rev 107920) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-02-16 12:15:50 UTC (rev 107921) @@ -72,7 +72,7 @@ } templatetypename LayerType -bool layerShouldBeSkipped(LayerType* layer) +static bool layerShouldBeSkipped(LayerType* layer) { // Layers can be skipped if any of these conditions are met. // - does not draw content. @@ -104,6 +104,49 @@ return false; } +templatetypename LayerType +static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlignedWithRespectToParent) +{ +// FIXME: If we decide to create a render surface here while this layer does +//preserve-3d, then we may be sorting incorrectly because we will not be +//sorting the individual layers of this subtree with other layers outside of +//this subtree. + +// Cache this value, because otherwise it walks the entire subtree several times. +bool descendantDrawsContent = layer-descendantDrawsContent(); + +// +// A layer and its descendants should render onto a new RenderSurface if any of these rules hold: +// + +// If the layer uses a mask. +if (layer-maskLayer()) +return true; + +// If the layer has a reflection. +if (layer-replicaLayer()) +return true; + +// If the layer uses a CSS filter. +if (layer-filters().size() 0) +return true; + +// If the layer flattens its subtree (i.e. the layer doesn't preserve-3d), but it is +// treated as a 3D object by its parent (i.e. parent does preserve-3d). +if (layer-parent() layer-parent()-preserves3D() !layer-preserves3D() descendantDrawsContent) +return true; + +// If the layer clips its descendants but it is not axis-aligned with respect to its parent. +if (layer-masksToBounds() !axisAlignedWithRespectToParent descendantDrawsContent) +return true; + +// If the layer has opacity != 1 and does not have a preserves-3d transform style. +if (layer-opacity() != 1 !layer-preserves3D() descendantDrawsContent) +return true; + +return false; +} + // Recursively walks the layer tree starting at the given node and computes all the // necessary transformations, clipRects, render surfaces, etc. templatetypename LayerType, typename RenderSurfaceType, typename LayerSorter @@ -229,23 +272,7 @@ // FIXME: This seems like the wrong place to set this
[webkit-changes] [107130] trunk/Source
Title: [107130] trunk/Source Revision 107130 Author shawnsi...@chromium.org Date 2012-02-08 13:41:47 -0800 (Wed, 08 Feb 2012) Log Message [chromium] Remove incorrect early exit in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=76924 Reviewed by James Robinson. Source/WebCore: New unit test added to CCDamageTrackerTest.cpp This patch does three things: (1) adds unit test that demonstrates that early exiting in CCDamageTracker is wrong, (2) removes the early exit and cleans up the surrounding code, and (3) re-names several functions in CCDamageTracker so that state updating is implied by the name, and not just a bad side-effect of the functions. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::updateDamageTrackingState): (WebCore::CCDamageTracker::trackDamageFromActiveLayers): (WebCore::CCDamageTracker::trackDamageFromSurfaceMask): (WebCore::CCDamageTracker::trackDamageFromLeftoverRects): * platform/graphics/chromium/cc/CCDamageTracker.h: (CCDamageTracker): * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: (WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): Source/WebKit/chromium: * tests/CCDamageTrackerTest.cpp: (WebKitTests::emulateDrawingOneFrame): (WebKitTests::TEST_F): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (107129 => 107130) --- trunk/Source/WebCore/ChangeLog 2012-02-08 21:37:31 UTC (rev 107129) +++ trunk/Source/WebCore/ChangeLog 2012-02-08 21:41:47 UTC (rev 107130) @@ -1,3 +1,28 @@ +2012-02-08 Shawn Singh shawnsi...@chromium.org + +[chromium] Remove incorrect early exit in CCDamageTracker +https://bugs.webkit.org/show_bug.cgi?id=76924 + +Reviewed by James Robinson. + +New unit test added to CCDamageTrackerTest.cpp + +This patch does three things: (1) adds unit test that demonstrates +that early exiting in CCDamageTracker is wrong, (2) removes the +early exit and cleans up the surrounding code, and (3) re-names +several functions in CCDamageTracker so that state updating is +implied by the name, and not just a bad side-effect of the functions. + +* platform/graphics/chromium/cc/CCDamageTracker.cpp: +(WebCore::CCDamageTracker::updateDamageTrackingState): +(WebCore::CCDamageTracker::trackDamageFromActiveLayers): +(WebCore::CCDamageTracker::trackDamageFromSurfaceMask): +(WebCore::CCDamageTracker::trackDamageFromLeftoverRects): +* platform/graphics/chromium/cc/CCDamageTracker.h: +(CCDamageTracker): +* platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp: +(WebCore::CCLayerTreeHostImpl::trackDamageForAllSurfaces): + 2012-02-08 James Robinson jam...@chromium.org [chromium] Check that we can make the SharedGraphicsContext3D current before returning Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp (107129 => 107130) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-02-08 21:37:31 UTC (rev 107129) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-02-08 21:41:47 UTC (rev 107130) @@ -56,13 +56,13 @@ { } -void CCDamageTracker::updateDamageRectForNextFrame(const VectorRefPtrCCLayerImpl layerList, int targetSurfaceLayerID, CCLayerImpl* targetSurfaceMaskLayer) +void CCDamageTracker::updateDamageTrackingState(const VectorRefPtrCCLayerImpl layerList, int targetSurfaceLayerID, CCLayerImpl* targetSurfaceMaskLayer) { // -// This function computes the damage rect of a target surface. The damage -// rect is the region of the surface that may have changed and needs to be redrawn. -// This can be used to scissor what is actually drawn, to save GPU computation and -// bandwidth. +// This function computes the damage rect of a target surface, and updates the state +// that is used to correctly track damage across frames. The damage rect is the region +// of the surface that may have changed and needs to be redrawn. This can be used to +// scissor what is actually drawn, to save GPU computation and bandwidth. // // The surface's damage rect is computed as the union of all possible changes that // have happened to the surface since the last frame was drawn. This includes: @@ -121,23 +121,23 @@ // damage tracker is ready for the next frame. // +// These functions cannot be bypassed with early-exits, even if we know what the +// damage will be for this frame, because we need to update the damage tracker state +// to correctly track the
[webkit-changes] [106841] branches/chromium/1025
Title: [106841] branches/chromium/1025 Revision 106841 Author shawnsi...@chromium.org Date 2012-02-06 13:19:30 -0800 (Mon, 06 Feb 2012) Log Message Merge 106459 - Fix the semantics of passing contentsVisible flag to GraphicsLayers https://bugs.webkit.org/show_bug.cgi?id=76975 Reviewed by Simon Fraser. Source/WebCore: This patch is covered by existing tests, in particular compositing/visibility/layer-visible-content.html; its expectations are rebaselined. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): LayoutTests: * compositing/visibility/layer-visible-content-expected.txt: rebaselined expected result * compositing/visibility/layer-visible-content.html: fixed height so that result is platform-independent * platform/chromium/test_expectations.txt: removed fail expectation, it should pass now. TBR=shawnsi...@chromium.org Review URL: https://chromiumcodereview.appspot.com/9342003 Modified Paths branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp Diff Modified: branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (106840 => 106841) --- branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-02-06 21:17:49 UTC (rev 106840) +++ branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-02-06 21:19:30 UTC (rev 106841) @@ -3,11 +3,10 @@ (children 1 (GraphicsLayer (bounds 800.00 600.00) - (children 1 + (children 2 (GraphicsLayer (bounds 200.00 200.00) (drawsContent 1) - (contentsVisible 0) (children 1 (GraphicsLayer (bounds 200.00 200.00) @@ -19,6 +18,11 @@ ) ) ) +(GraphicsLayer + (bounds 800.00 16.00) + (opacity 0.00) + (drawsContent 1) +) ) ) ) Modified: branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html (106840 => 106841) --- branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html 2012-02-06 21:17:49 UTC (rev 106840) +++ branches/chromium/1025/LayoutTests/compositing/visibility/layer-visible-content.html 2012-02-06 21:19:30 UTC (rev 106841) @@ -37,6 +37,7 @@ } pre { opacity: 0; /* hide in pixel result */ +height: 16px; /* avoid platform-dependent height difference of hidden text layer-tree */ } /style script Modified: branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt (106840 => 106841) --- branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt 2012-02-06 21:17:49 UTC (rev 106840) +++ branches/chromium/1025/LayoutTests/platform/chromium/test_expectations.txt 2012-02-06 21:19:30 UTC (rev 106841) @@ -4012,8 +4012,6 @@ // Need to implement file name logging. BUGWK76572 : http/tests/download = FAIL -BUGWK76716 : compositing/visibility/layer-visible-content.html = IMAGE+TEXT - BUGWK76967 : media/media-fragments/TC0030-TC0039.html = PASS TIMEOUT BUGABARTH : media/audio-garbage-collect.html = PASS TIMEOUT Modified: branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp (106840 => 106841) --- branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-02-06 21:17:49 UTC (rev 106840) +++ branches/chromium/1025/Source/WebCore/rendering/RenderLayerBacking.cpp 2012-02-06 21:19:30 UTC (rev 106841) @@ -403,8 +403,12 @@ #endif m_owningLayer-updateVisibilityStatus(); -m_graphicsLayer-setContentsVisible(m_owningLayer-hasVisibleContent()); - + +// m_graphicsLayer is the corresponding GraphicsLayer for this RenderLayer and its non-compositing +// descendants. So, the visibility flag for m_graphicsLayer should be true if there are any +// non-compositing visible layers. +m_graphicsLayer-setContentsVisible(m_owningLayer-hasVisibleContent() || hasVisibleNonCompositingDescendantLayers()); + RenderStyle* style = renderer()-style(); m_graphicsLayer-setPreserves3D(style-transformStyle3D() == TransformStyle3DPreserve3D !renderer()-hasReflection()); m_graphicsLayer-setBackfaceVisibility(style-backfaceVisibility() == BackfaceVisibilityVisible); ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes
[webkit-changes] [106754] trunk/Source
Title: [106754] trunk/Source Revision 106754 Author shawnsi...@chromium.org Date 2012-02-04 22:13:47 -0800 (Sat, 04 Feb 2012) Log Message [chromium] Add support to force full damage in CCDamageTracker https://bugs.webkit.org/show_bug.cgi?id=76805 Reviewed by James Robinson. Source/WebCore: Unit test added to CCDamageTrackerTest.cpp. This feature is needed for events that should cause the entire surface to be damaged, even if layers themselves had only partial damage or no damage at all. For example, tab-switching is one such event. * platform/graphics/chromium/cc/CCDamageTracker.cpp: (WebCore::CCDamageTracker::CCDamageTracker): (WebCore::CCDamageTracker::updateDamageRectForNextFrame): * platform/graphics/chromium/cc/CCDamageTracker.h: (WebCore::CCDamageTracker::forceFullDamageNextUpdate): (CCDamageTracker): Source/WebKit/chromium: * tests/CCDamageTrackerTest.cpp: (WebKitTests::TEST_F): (WebKitTests): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/CCDamageTrackerTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (106753 => 106754) --- trunk/Source/WebCore/ChangeLog 2012-02-05 02:53:18 UTC (rev 106753) +++ trunk/Source/WebCore/ChangeLog 2012-02-05 06:13:47 UTC (rev 106754) @@ -1,3 +1,24 @@ +2012-02-04 Shawn Singh shawnsi...@chromium.org + +[chromium] Add support to force full damage in CCDamageTracker +https://bugs.webkit.org/show_bug.cgi?id=76805 + +Reviewed by James Robinson. + +Unit test added to CCDamageTrackerTest.cpp. + +This feature is needed for events that should cause the entire +surface to be damaged, even if layers themselves had only partial +damage or no damage at all. For example, tab-switching is one such +event. + +* platform/graphics/chromium/cc/CCDamageTracker.cpp: +(WebCore::CCDamageTracker::CCDamageTracker): +(WebCore::CCDamageTracker::updateDamageRectForNextFrame): +* platform/graphics/chromium/cc/CCDamageTracker.h: +(WebCore::CCDamageTracker::forceFullDamageNextUpdate): +(CCDamageTracker): + 2012-02-04 Anders Carlsson ander...@apple.com Remove dead code from ScrollingCoordinator Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp (106753 => 106754) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-02-05 02:53:18 UTC (rev 106753) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.cpp 2012-02-05 06:13:47 UTC (rev 106754) @@ -46,6 +46,7 @@ } CCDamageTracker::CCDamageTracker() +: m_forceFullDamageNextUpdate(false) { m_currentRectHistory = adoptPtr(new RectMap); m_nextRectHistory = adoptPtr(new RectMap); @@ -125,6 +126,7 @@ CCLayerImpl* layer = layerList[0].get(); if (layer-targetRenderSurface()-surfacePropertyChangedOnlyFromDescendant()) { m_currentDamageRect = FloatRect(layer-targetRenderSurface()-contentRect()); +// FIXME: this early exit is incorrect: https://bugs.webkit.org/show_bug.cgi?id=76924 return; } @@ -132,9 +134,14 @@ FloatRect damageFromSurfaceMask = computeDamageFromSurfaceMask(targetSurfaceMaskLayer); FloatRect damageFromLeftoverRects = computeDamageFromLeftoverRects(); -m_currentDamageRect = damageFromActiveLayers; -m_currentDamageRect.uniteIfNonZero(damageFromSurfaceMask); -m_currentDamageRect.uniteIfNonZero(damageFromLeftoverRects); +if (m_forceFullDamageNextUpdate) { +m_currentDamageRect = FloatRect(layer-targetRenderSurface()-contentRect()); +m_forceFullDamageNextUpdate = false; +} else { +m_currentDamageRect = damageFromActiveLayers; +m_currentDamageRect.uniteIfNonZero(damageFromSurfaceMask); +m_currentDamageRect.uniteIfNonZero(damageFromLeftoverRects); +} // The next history map becomes the current map for the next frame. swap(m_currentRectHistory, m_nextRectHistory); Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h (106753 => 106754) --- trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h 2012-02-05 02:53:18 UTC (rev 106753) +++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCDamageTracker.h 2012-02-05 06:13:47 UTC (rev 106754) @@ -43,6 +43,7 @@ static PassOwnPtrCCDamageTracker create(); ~CCDamageTracker(); +void forceFullDamageNextUpdate() { m_forceFullDamageNextUpdate = true; } void updateDamageRectForNextFrame(const VectorRefPtrCCLayerImpl layerList, int targetSurfaceLayerID, CCLayerImpl* targetSurfaceMaskLayer); const FloatRect currentDamageRect() { return m_currentDamageRect; } @@ -68,6 +69,7 @@ OwnPtrRectMap m_nextRectHistory; FloatRect m_currentDamageRect; +bool
[webkit-changes] [106459] trunk
Title: [106459] trunk Revision 106459 Author shawnsi...@chromium.org Date 2012-02-01 02:31:15 -0800 (Wed, 01 Feb 2012) Log Message Fix the semantics of passing contentsVisible flag to GraphicsLayers https://bugs.webkit.org/show_bug.cgi?id=76975 Reviewed by Simon Fraser. Source/WebCore: This patch is covered by existing tests, in particular compositing/visibility/layer-visible-content.html; its expectations are rebaselined. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): LayoutTests: * compositing/visibility/layer-visible-content-expected.txt: rebaselined expected result * compositing/visibility/layer-visible-content.html: fixed height so that result is platform-independent * platform/chromium/test_expectations.txt: removed fail expectation, it should pass now. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt trunk/LayoutTests/compositing/visibility/layer-visible-content.html trunk/LayoutTests/platform/chromium/test_expectations.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayerBacking.cpp Diff Modified: trunk/LayoutTests/ChangeLog (106458 => 106459) --- trunk/LayoutTests/ChangeLog 2012-02-01 10:25:36 UTC (rev 106458) +++ trunk/LayoutTests/ChangeLog 2012-02-01 10:31:15 UTC (rev 106459) @@ -1,3 +1,14 @@ +2012-02-01 Shawn Singh shawnsi...@chromium.org + +Fix the semantics of passing contentsVisible flag to GraphicsLayers +https://bugs.webkit.org/show_bug.cgi?id=76975 + +Reviewed by Simon Fraser. + +* compositing/visibility/layer-visible-content-expected.txt: rebaselined expected result +* compositing/visibility/layer-visible-content.html: fixed height so that result is platform-independent +* platform/chromium/test_expectations.txt: removed fail expectation, it should pass now. + 2012-02-01 Philippe Normand pnorm...@igalia.com Unreviewed, GTK rebaseline after r106445 Modified: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (106458 => 106459) --- trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-02-01 10:25:36 UTC (rev 106458) +++ trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-02-01 10:31:15 UTC (rev 106459) @@ -3,11 +3,10 @@ (children 1 (GraphicsLayer (bounds 800.00 600.00) - (children 1 + (children 2 (GraphicsLayer (bounds 200.00 200.00) (drawsContent 1) - (contentsVisible 0) (children 1 (GraphicsLayer (bounds 200.00 200.00) @@ -19,6 +18,11 @@ ) ) ) +(GraphicsLayer + (bounds 800.00 16.00) + (opacity 0.00) + (drawsContent 1) +) ) ) ) Modified: trunk/LayoutTests/compositing/visibility/layer-visible-content.html (106458 => 106459) --- trunk/LayoutTests/compositing/visibility/layer-visible-content.html 2012-02-01 10:25:36 UTC (rev 106458) +++ trunk/LayoutTests/compositing/visibility/layer-visible-content.html 2012-02-01 10:31:15 UTC (rev 106459) @@ -37,6 +37,7 @@ } pre { opacity: 0; /* hide in pixel result */ +height: 16px; /* avoid platform-dependent height difference of hidden text layer-tree */ } /style script Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (106458 => 106459) --- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-02-01 10:25:36 UTC (rev 106458) +++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-02-01 10:31:15 UTC (rev 106459) @@ -4014,8 +4014,6 @@ // Need to implement file name logging. BUGWK76572 : http/tests/download = FAIL -BUGWK76716 : compositing/visibility/layer-visible-content.html = IMAGE+TEXT - BUGWK76967 : media/media-fragments/TC0030-TC0039.html = PASS TIMEOUT BUGABARTH : media/audio-garbage-collect.html = PASS TIMEOUT Modified: trunk/Source/WebCore/ChangeLog (106458 => 106459) --- trunk/Source/WebCore/ChangeLog 2012-02-01 10:25:36 UTC (rev 106458) +++ trunk/Source/WebCore/ChangeLog 2012-02-01 10:31:15 UTC (rev 106459) @@ -1,3 +1,17 @@ +2012-02-01 Shawn Singh shawnsi...@chromium.org + +Fix the semantics of passing contentsVisible flag to GraphicsLayers +https://bugs.webkit.org/show_bug.cgi?id=76975 + +Reviewed by Simon Fraser. + +This patch is covered by existing tests, in particular +compositing/visibility/layer-visible-content.html; its +expectations are rebaselined. + +* rendering/RenderLayerBacking.cpp: +(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): + 2012-02-01 Philippe Normand pnorm...@igalia.com Unreviewed, another GTK build fix after r106446. Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (106458 => 106459) ---
[webkit-changes] [105906] trunk
Title: [105906] trunk Revision 105906 Author shawnsi...@chromium.org Date 2012-01-25 11:53:05 -0800 (Wed, 25 Jan 2012) Log Message Fix the semantics of passing contentsVisible flag to GraphicsLayers https://bugs.webkit.org/show_bug.cgi?id=76975 Reviewed by Simon Fraser. Source/WebCore: This patch is covered by existing tests, in particular compositing/visibility/layer-visible-content.html; its expectations are rebaselined. * rendering/RenderLayerBacking.cpp: (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): LayoutTests: * compositing/visibility/layer-visible-content-expected.txt: rebaselined expectations. * compositing/visibility/visibility-image-layers-dynamic-expected.txt: rebaselined expectations. * platform/chromium/test_expectations.txt: removed the expectation that the test fails on chromium, it should pass now. Modified Paths trunk/LayoutTests/ChangeLog trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt trunk/LayoutTests/compositing/visibility/visibility-image-layers-dynamic-expected.txt trunk/LayoutTests/platform/chromium/test_expectations.txt trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/rendering/RenderLayerBacking.cpp Diff Modified: trunk/LayoutTests/ChangeLog (105905 => 105906) --- trunk/LayoutTests/ChangeLog 2012-01-25 19:43:06 UTC (rev 105905) +++ trunk/LayoutTests/ChangeLog 2012-01-25 19:53:05 UTC (rev 105906) @@ -1,3 +1,14 @@ +2012-01-25 Shawn Singh shawnsi...@chromium.org + +Fix the semantics of passing contentsVisible flag to GraphicsLayers +https://bugs.webkit.org/show_bug.cgi?id=76975 + +Reviewed by Simon Fraser. + +* compositing/visibility/layer-visible-content-expected.txt: rebaselined expectations. +* compositing/visibility/visibility-image-layers-dynamic-expected.txt: rebaselined expectations. +* platform/chromium/test_expectations.txt: removed the expectation that the test fails on chromium, it should pass now. + 2012-01-25 MORITA Hajime morr...@google.com Unreviewed test fix to followup r105900. Modified: trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt (105905 => 105906) --- trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-01-25 19:43:06 UTC (rev 105905) +++ trunk/LayoutTests/compositing/visibility/layer-visible-content-expected.txt 2012-01-25 19:53:05 UTC (rev 105906) @@ -3,11 +3,10 @@ (children 1 (GraphicsLayer (bounds 800.00 600.00) - (children 1 + (children 2 (GraphicsLayer (bounds 200.00 200.00) (drawsContent 1) - (contentsVisible 0) (children 1 (GraphicsLayer (bounds 200.00 200.00) @@ -19,6 +18,11 @@ ) ) ) +(GraphicsLayer + (bounds 800.00 15.00) + (opacity 0.00) + (drawsContent 1) +) ) ) ) Modified: trunk/LayoutTests/compositing/visibility/visibility-image-layers-dynamic-expected.txt (105905 => 105906) --- trunk/LayoutTests/compositing/visibility/visibility-image-layers-dynamic-expected.txt 2012-01-25 19:43:06 UTC (rev 105905) +++ trunk/LayoutTests/compositing/visibility/visibility-image-layers-dynamic-expected.txt 2012-01-25 19:53:05 UTC (rev 105906) @@ -35,7 +35,6 @@ (GraphicsLayer (position 14.00 314.00) (bounds 757.00 152.00) - (contentsVisible 0) (children 1 (GraphicsLayer (position 20.00 20.00) @@ -50,10 +49,10 @@ After step 1 (GraphicsLayer - (bounds 785.00 1301.00) + (bounds 785.00 1286.00) (children 1 (GraphicsLayer - (bounds 785.00 1301.00) + (bounds 785.00 1286.00) (children 3 (GraphicsLayer (position 14.00 6.00) @@ -80,7 +79,6 @@ (GraphicsLayer (position 14.00 314.00) (bounds 757.00 152.00) - (contentsVisible 0) (children 1 (GraphicsLayer (position 20.00 20.00) @@ -95,10 +93,10 @@ After step 2 (GraphicsLayer - (bounds 785.00 1965.00) + (bounds 785.00 1935.00) (children 1 (GraphicsLayer - (bounds 785.00 1965.00) + (bounds 785.00 1935.00) (children 3 (GraphicsLayer (position 14.00 6.00) @@ -124,7 +122,6 @@ (GraphicsLayer (position 14.00 314.00) (bounds 757.00 152.00) - (contentsVisible 0) (children 1 (GraphicsLayer (position 20.00 20.00) Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (105905 => 105906) --- trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-25 19:43:06 UTC (rev 105905) +++ trunk/LayoutTests/platform/chromium/test_expectations.txt 2012-01-25 19:53:05 UTC (rev 105906) @@ -4004,8 +4004,6 @@ // Need to implement file name logging. BUGWK76572 : http/tests/download = FAIL -BUGWK76716 :
[webkit-changes] [105680] trunk/Source
Title: [105680] trunk/Source Revision 105680 Author shawnsi...@chromium.org Date 2012-01-23 18:45:03 -0800 (Mon, 23 Jan 2012) Log Message [chromium] updateRect is incorrect when contentBounds != bounds https://bugs.webkit.org/show_bug.cgi?id=72919 Reviewed by James Robinson. Source/WebCore: Unit test added to TiledLayerChromiumTest.cpp The m_updateRect member in LayerChromium types is used to track what was painted for that layer. For tiled layers (especially image layers), the updateRect was being given with respect to the size of the content, rather than the size of the layer. This patch adds a conversion so that updateRect is always with respect to the layer size, so that damage tracking will work correctly in those cases. * platform/graphics/chromium/LayerChromium.h: * platform/graphics/chromium/TiledLayerChromium.cpp: (WebCore::TiledLayerChromium::updateCompositorResources): Source/WebKit/chromium: * tests/TiledLayerChromiumTest.cpp: (WTF::FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds): (WTF::FakeTiledLayerWithScaledBounds::setContentBounds): (WTF::FakeTiledLayerWithScaledBounds::contentBounds): (WTF::FakeTiledLayerWithScaledBounds::updateRect): (WTF::TEST): Modified Paths trunk/Source/WebCore/ChangeLog trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp trunk/Source/WebKit/chromium/ChangeLog trunk/Source/WebKit/chromium/tests/TiledLayerChromiumTest.cpp Diff Modified: trunk/Source/WebCore/ChangeLog (105679 => 105680) --- trunk/Source/WebCore/ChangeLog 2012-01-24 02:39:00 UTC (rev 105679) +++ trunk/Source/WebCore/ChangeLog 2012-01-24 02:45:03 UTC (rev 105680) @@ -1,3 +1,24 @@ +2012-01-23 Shawn Singh shawnsi...@chromium.org + +[chromium] updateRect is incorrect when contentBounds != bounds +https://bugs.webkit.org/show_bug.cgi?id=72919 + +Reviewed by James Robinson. + +Unit test added to TiledLayerChromiumTest.cpp + +The m_updateRect member in LayerChromium types is used to track +what was painted for that layer. For tiled layers (especially +image layers), the updateRect was being given with respect to the +size of the content, rather than the size of the layer. This patch +adds a conversion so that updateRect is always with respect to the +layer size, so that damage tracking will work correctly in those +cases. + +* platform/graphics/chromium/LayerChromium.h: +* platform/graphics/chromium/TiledLayerChromium.cpp: +(WebCore::TiledLayerChromium::updateCompositorResources): + 2012-01-23 Konrad Piascik kpias...@rim.com Web Inspector: Make Copy as HTML use the same copy functions as other copy methods. Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h (105679 => 105680) --- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h 2012-01-24 02:39:00 UTC (rev 105679) +++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h 2012-01-24 02:45:03 UTC (rev 105680) @@ -214,6 +214,7 @@ // The update rect is the region of the compositor resource that was actually updated by the compositor. // For layers that may do updating outside the compositor's control (i.e. plugin layers), this information // is not available and the update rect will remain empty. +// Note this rect is in layer space (not content space). FloatRect m_updateRect; RefPtrLayerChromium m_maskLayer; Modified: trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp (105679 => 105680) --- trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp 2012-01-24 02:39:00 UTC (rev 105679) +++ trunk/Source/WebCore/platform/graphics/chromium/TiledLayerChromium.cpp 2012-01-24 02:45:03 UTC (rev 105680) @@ -240,7 +240,11 @@ } } +// The updateRect should be in layer space. So we have to convert the paintRect from content space to layer space. m_updateRect = FloatRect(m_paintRect); +float widthScale = bounds().width() / static_castfloat(contentBounds().width()); +float heightScale = bounds().height() / static_castfloat(contentBounds().height()); +m_updateRect.scale(widthScale, heightScale); } void TiledLayerChromium::setTilingOption(TilingOption tilingOption) Modified: trunk/Source/WebKit/chromium/ChangeLog (105679 => 105680) --- trunk/Source/WebKit/chromium/ChangeLog 2012-01-24 02:39:00 UTC (rev 105679) +++ trunk/Source/WebKit/chromium/ChangeLog 2012-01-24 02:45:03 UTC (rev 105680) @@ -1,3 +1,17 @@ +2012-01-23 Shawn Singh shawnsi...@chromium.org + +[chromium] updateRect is incorrect when contentBounds != bounds +https://bugs.webkit.org/show_bug.cgi?id=72919 + +Reviewed by James Robinson. + +* tests/TiledLayerChromiumTest.cpp: +(WTF::FakeTiledLayerWithScaledBounds::FakeTiledLayerWithScaledBounds): +
[webkit-changes] [105560] trunk/Tools
Title: [105560] trunk/Tools Revision 105560 Author shawnsi...@chromium.org Date 2012-01-20 18:06:04 -0800 (Fri, 20 Jan 2012) Log Message Changed my status in commiters.py Unreviewed. * Scripts/webkitpy/common/config/committers.py: Modified Paths trunk/Tools/ChangeLog trunk/Tools/Scripts/webkitpy/common/config/committers.py Diff Modified: trunk/Tools/ChangeLog (105559 => 105560) --- trunk/Tools/ChangeLog 2012-01-21 01:34:07 UTC (rev 105559) +++ trunk/Tools/ChangeLog 2012-01-21 02:06:04 UTC (rev 105560) @@ -1,3 +1,11 @@ +2012-01-20 Shawn Singh shawnsi...@chromium.org + +Changed my status in commiters.py + +Unreviewed. + +* Scripts/webkitpy/common/config/committers.py: + 2012-01-20 Ojan Vafai o...@chromium.org run-webkit-tests --lint-test-files crawls the whole LayoutTests subtree Modified: trunk/Tools/Scripts/webkitpy/common/config/committers.py (105559 => 105560) --- trunk/Tools/Scripts/webkitpy/common/config/committers.py 2012-01-21 01:34:07 UTC (rev 105559) +++ trunk/Tools/Scripts/webkitpy/common/config/committers.py 2012-01-21 02:06:04 UTC (rev 105560) @@ -139,7 +139,6 @@ Contributor(Peter Gal, galpe...@inf.u-szeged.hu, elecro), Contributor(Peter Linss, peter.li...@hp.com, plinss), Contributor(Radar WebKit Bug Importer, webkit-bug-impor...@group.apple.com), -Contributor(Shawn Singh, shawnsi...@chromium.org, shawnsingh), Contributor(Tab Atkins, [tabatk...@google.com, jackalm...@gmail.com], tabatkins), Contributor(Tamas Czene, [tcz...@inf.u-szeged.hu, czene.ta...@stud.u-szeged.hu], tczene), Contributor(WebKit Review Bot, webkit.review@gmail.com, sheriff-bot), @@ -326,6 +325,7 @@ Committer(Satish Sampath, sat...@chromium.org), Committer(Scott Violet, s...@chromium.org, sky), Committer(Sergio Villar Senin, [svil...@igalia.com, ser...@webkit.org], svillar), +Committer(Shawn Singh, shawnsi...@chromium.org, shawnsingh), Committer(Siddharth Mathur, siddharth.mat...@nokia.com, simathur), Committer(Steve Lacey, s...@chromium.org, stevela), Committer(Takashi Toyoshima, toyos...@chromium.org, toyoshim), ___ webkit-changes mailing list webkit-changes@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes