diff options
author | jchaffraix@webkit.org <jchaffraix@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-01-10 15:48:40 +0000 |
---|---|---|
committer | jchaffraix@webkit.org <jchaffraix@webkit.org@bbb929c8-8fbe-4397-9dbb-9b2b20218538> | 2012-01-10 15:48:40 +0000 |
commit | 89a1b2e698a2a6eb40a70b796d09d7a222bc0f90 (patch) | |
tree | b6d3fa4ed4de1f89754e5fc30fb63ea707f6a017 | |
parent | 0d55c51c7344ebfd31f22c57dc7caa9534db071f (diff) | |
download | chromium_src-89a1b2e698a2a6eb40a70b796d09d7a222bc0f90.zip chromium_src-89a1b2e698a2a6eb40a70b796d09d7a222bc0f90.tar.gz chromium_src-89a1b2e698a2a6eb40a70b796d09d7a222bc0f90.tar.bz2 |
REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling
https://bugs.webkit.org/show_bug.cgi?id=67100
Reviewed by Dan Bernstein.
Source/WebCore:
Tests: fast/layers/scroll-with-transform-composited-layer.html
fast/layers/scroll-with-transform-layer.html
The regression came from a previous optimization that was wrongly kept after r93614.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::updateLayerPositionsAfterScroll):
Remove the early return for transformed layer. This change worked as we used
to call updateLayerPositions from scrollTo which would call updateLayerPosition on
all our descendants. After r93614, this is no longer the case and we explicitely need
to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll.
LayoutTests:
Added 2 tests for scrolling inside a transformed layer (either composited
or not). Unfortunately due to some platform-specifics differences, they are
not ref-tests.
* fast/layers/scroll-with-transform-composited-layer-expected.txt: Added.
* fast/layers/scroll-with-transform-composited-layer.html: Added.
* fast/layers/scroll-with-transform-layer-expected.txt: Added.
* fast/layers/scroll-with-transform-layer.html: Added.
* platform/mac-snowleopard/fast/layers/scroll-with-transform-composited-layer-expected.png: Added.
* platform/mac-snowleopard/fast/layers/scroll-with-transform-layer-expected.png: Added.
git-svn-id: svn://svn.chromium.org/blink/trunk@104575 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed, 195 insertions, 5 deletions
diff --git a/third_party/WebKit/LayoutTests/ChangeLog b/third_party/WebKit/LayoutTests/ChangeLog index 852e748..9fbb5db 100644 --- a/third_party/WebKit/LayoutTests/ChangeLog +++ b/third_party/WebKit/LayoutTests/ChangeLog @@ -1,3 +1,21 @@ +2012-01-10 Julien Chaffraix <jchaffraix@webkit.org> + + REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling + https://bugs.webkit.org/show_bug.cgi?id=67100 + + Reviewed by Dan Bernstein. + + Added 2 tests for scrolling inside a transformed layer (either composited + or not). Unfortunately due to some platform-specifics differences, they are + not ref-tests. + + * fast/layers/scroll-with-transform-composited-layer-expected.txt: Added. + * fast/layers/scroll-with-transform-composited-layer.html: Added. + * fast/layers/scroll-with-transform-layer-expected.txt: Added. + * fast/layers/scroll-with-transform-layer.html: Added. + * platform/mac-snowleopard/fast/layers/scroll-with-transform-composited-layer-expected.png: Added. + * platform/mac-snowleopard/fast/layers/scroll-with-transform-layer-expected.png: Added. + 2012-01-10 Hugo Parente Lima <hugo.lima@openbossa.org> [Qt] fast/events/dont-loose-last-event test fails on WK1 diff --git a/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-composited-layer-expected.txt b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-composited-layer-expected.txt new file mode 100644 index 0000000..fb4fc4a --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-composited-layer-expected.txt @@ -0,0 +1,7 @@ +http://webkit.org/b/67100: REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling +All the boxes should only contain green content. + + + + + diff --git a/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-composited-layer.html b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-composited-layer.html new file mode 100644 index 0000000..56a49b8 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-composited-layer.html @@ -0,0 +1,72 @@ +<!DOCTYPE html> +<html> +<head> +<style> + p { height: 100px; width: 100px; margin: 0px; } + p.red { background-color: red; } + p.green { background-color: green; } + div { height: 100px; width: 100px; } + div.relative { position: relative } + div.composited + { + -webkit-transform: translateZ(0); + -moz-transform: translateZ(0); + transform: translateZ(0); + } + div.translated + { + -webkit-transform: translate(0); + -moz-transform: translate(0); + transform: translate(0); + } +</style> +<script> + if (window.layoutTestController) + layoutTestController.dumpAsText(true); +</script> +</head> +<body> + <!-- This test should be a ref-test but small scrollbars difference between platforms makes it fail. --> + <span>http://webkit.org/b/67100: REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling</span><br/> + <span>All the boxes should only contain green content.</span> + <!-- Use a translation. --> + <div class="scrollMe composited" style="overflow: hidden;"> + <div class="relative"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <div class="scrollMe composited" style="overflow: scroll;"> + <div class="relative"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <!-- Nest composited and non-composited. --> + <div class="scrollMe composited" style="overflow: hidden;"> + <div class="relative translated"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <div class="scrollMe translated" style="overflow: scroll;"> + <div class="relative composited"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <script> + var scrollMes = document.getElementsByClassName("scrollMe"); + for (var i = 0; i < scrollMes.length; ++i) + scrollMes[i].scrollTop = 100; + </script> +</body> +</html> diff --git a/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-layer-expected.txt b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-layer-expected.txt new file mode 100644 index 0000000..fb4fc4a --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-layer-expected.txt @@ -0,0 +1,7 @@ +http://webkit.org/b/67100: REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling +All the boxes should only contain green content. + + + + + diff --git a/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-layer.html b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-layer.html new file mode 100644 index 0000000..0793c84 --- /dev/null +++ b/third_party/WebKit/LayoutTests/fast/layers/scroll-with-transform-layer.html @@ -0,0 +1,72 @@ +<!DOCTYPE html> +<html> +<head> +<style> + p { height: 100px; width: 100px; margin: 0px; } + p.red { background-color: red; } + p.green { background-color: green; } + div { height: 100px; width: 100px; } + div.relative { position: relative } + div.rotated + { + -webkit-transform: rotate(360deg); + -moz-transform: rotate(360deg); + transform: rotate(360deg); + } + div.translated + { + -webkit-transform: translate(0); + -moz-transform: translate(0); + transform: translate(0); + } +</style> +<script> + if (window.layoutTestController) + layoutTestController.dumpAsText(true); +</script> +</head> +<body> + <!-- This test should be a ref-test but small scrollbars difference between platforms makes it fail. --> + <span>http://webkit.org/b/67100: REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling</span><br/> + <span>All the boxes should only contain green content.</span> + <!-- Use a translation. --> + <div class="scrollMe translated" style="overflow: hidden;"> + <div class="relative"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <div class="scrollMe translated" style="overflow: scroll;"> + <div class="relative"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <!-- Use a rotation. --> + <div class="scrollMe rotated" style="overflow: hidden;"> + <div class="relative"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <div class="scrollMe rotated" style="overflow: scroll;"> + <div class="relative"> + <p class="red"></p> + <p class="green"></p> + <p class="red"></p> + </div> + </div> + <br> + <script> + var scrollMes = document.getElementsByClassName("scrollMe"); + for (var i = 0; i < scrollMes.length; ++i) + scrollMes[i].scrollTop = 100; + </script> +</body> +</html> diff --git a/third_party/WebKit/Source/WebCore/ChangeLog b/third_party/WebKit/Source/WebCore/ChangeLog index 0dd496e..e7c4704 100644 --- a/third_party/WebKit/Source/WebCore/ChangeLog +++ b/third_party/WebKit/Source/WebCore/ChangeLog @@ -1,3 +1,22 @@ +2012-01-10 Julien Chaffraix <jchaffraix@webkit.org> + + REGRESSION (r93614): Safari Reader doesn't repaint correctly when scrolling + https://bugs.webkit.org/show_bug.cgi?id=67100 + + Reviewed by Dan Bernstein. + + Tests: fast/layers/scroll-with-transform-composited-layer.html + fast/layers/scroll-with-transform-layer.html + + The regression came from a previous optimization that was wrongly kept after r93614. + + * rendering/RenderLayer.cpp: + (WebCore::RenderLayer::updateLayerPositionsAfterScroll): + Remove the early return for transformed layer. This change worked as we used + to call updateLayerPositions from scrollTo which would call updateLayerPosition on + all our descendants. After r93614, this is no longer the case and we explicitely need + to call updateLayerPosition on our descendants from updateLayerPositionsAfterScroll. + 2012-01-10 Stephen White <senorblanco@chromium.org> Fix Chrome/Mac build. diff --git a/third_party/WebKit/Source/WebCore/rendering/RenderLayer.cpp b/third_party/WebKit/Source/WebCore/rendering/RenderLayer.cpp index 587e237..90915a3 100644 --- a/third_party/WebKit/Source/WebCore/rendering/RenderLayer.cpp +++ b/third_party/WebKit/Source/WebCore/rendering/RenderLayer.cpp @@ -465,11 +465,6 @@ void RenderLayer::updateLayerPositionsAfterScroll(UpdateLayerPositionsAfterScrol // FIXME: Is it worth passing the offsetFromRoot around like in updateLayerPositions? computeRepaintRects(); flags |= HasSeenFixedPositionedAncestor; - } else if (renderer()->hasTransform() && !renderer()->isRenderView()) { - // Transforms act as fixed position containers, so nothing inside a - // transformed element can be fixed relative to the viewport if the - // transformed element is not fixed itself or child of a fixed element. - return; } else if ((flags & HasSeenAncestorWithOverflowClip) && !m_canSkipRepaintRectsUpdateOnScroll) { // If we have seen an overflow clip, we should update our repaint rects as clippedOverflowRectForRepaint // intersects it with our ancestor overflow clip that may have moved. |