diff options
author | wangxianzhu@chromium.org <wangxianzhu@chromium.org> | 2014-10-02 22:49:02 +0000 |
---|---|---|
committer | wangxianzhu@chromium.org <wangxianzhu@chromium.org> | 2014-10-02 22:49:02 +0000 |
commit | 0c847fee92f61fbbecc1629fe1e14f4eab2ce02d (patch) | |
tree | 0ff5b7d24b4de7ca6b1d78f2f382c670d17305ef /third_party/WebKit/LayoutTests/compositing/repaint | |
parent | 924332712a02e025c13e5cb7bbb326854b277ad0 (diff) | |
download | chromium_src-0c847fee92f61fbbecc1629fe1e14f4eab2ce02d.zip chromium_src-0c847fee92f61fbbecc1629fe1e14f4eab2ce02d.tar.gz chromium_src-0c847fee92f61fbbecc1629fe1e14f4eab2ce02d.tar.bz2 |
Remove setShouldDoFullPaintInvalidationIfSelfPaintingLayer
For now we set the flag on children when overflowClip of a RenderBox
changes. However, even if the layer is self painting, it's not always
necessary to do a full paint invalidation.
Call setMayNeedPaintInvalidation() instead to ensure the children will
be reached during invalidateTreeIfNeeded(). Then invalidation will be
issued if needed according to the change of paintInvalidationRect and
positionFromPaintInvalidationBacking.
If a child is composited, cc will handle any visual updates caused
by the change of overflow clipping, so invalidation of the composited
children is unnecessary.
TEST=existing fast/repaint*overflow*.html
TEST=compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change.html
Review URL: https://codereview.chromium.org/618123006
git-svn-id: svn://svn.chromium.org/blink/trunk@183167 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Diffstat (limited to 'third_party/WebKit/LayoutTests/compositing/repaint')
3 files changed, 106 insertions, 0 deletions
diff --git a/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.png b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.png Binary files differnew file mode 100644 index 0000000..09bace0 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.png diff --git a/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt new file mode 100644 index 0000000..d01ea24 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change-expected.txt @@ -0,0 +1,61 @@ +{ + "bounds": [800, 600], + "children": [ + { + "bounds": [800, 600], + "contentsOpaque": true, + "drawsContent": true, + "repaintRects": [ + [0, 200, 200, 200], + [0, 0, 200, 200] + ], + "children": [ + { + "bounds": [100, 100], + "contentsOpaque": true, + "drawsContent": true, + "backfaceVisibility": "hidden", + "backgroundColor": "#008000" + }, + { + "position": [0, 200], + "bounds": [200, 200], + "shouldFlattenTransform": false, + "children": [ + { + "bounds": [100, 100], + "contentsOpaque": true, + "drawsContent": true, + "backfaceVisibility": "hidden", + "backgroundColor": "#008000" + } + ] + }, + { + "position": [150, 150], + "bounds": [100, 100], + "contentsOpaque": true, + "drawsContent": true, + "backfaceVisibility": "hidden", + "backgroundColor": "#008000" + }, + { + "position": [0, 200], + "bounds": [200, 200], + "shouldFlattenTransform": false, + "children": [ + { + "position": [150, 150], + "bounds": [100, 100], + "contentsOpaque": true, + "drawsContent": true, + "backfaceVisibility": "hidden", + "backgroundColor": "#008000" + } + ] + } + ] + } + ] +} + diff --git a/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change.html b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change.html new file mode 100644 index 0000000..ead0e81 --- /dev/null +++ b/third_party/WebKit/LayoutTests/compositing/repaint/should-not-repaint-composited-descendants-on-overflow-change.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<script src="../../fast/repaint/resources/text-based-repaint.js"></script> +<script> +function repaintTest() { + document.getElementById('overflow1').style.overflow = "visible"; + document.getElementById('overflow2').style.overflow = "hidden"; +} +onload = runRepaintAndPixelTest; +</script> +<style> +body { + margin: 0; +} +#overflow1 { + overflow: hidden; + width: 200px; + height: 200px; +} +#overflow2 { + overflow: visible; + width: 200px; + height: 200px; +} +.composited-child { + width: 100px; + height: 100px; + background-color: green; + backface-visibility: hidden; +} +.overflow-child { + position: relative; + top: 50px; + left: 150px; +} +</style> +<!-- We should not repaint composited descendants on overflow style changes (verified with the text expectation). +The compositor should handle any visual change caused by the change of overflow clipping (verified with the pixel expectation). --> +<div id="overflow1"> + <div class="composited-child"></div> + <div class="composited-child overflow-child"></div> +</div> +<div id="overflow2"> + <div class="composited-child"></div> + <div class="composited-child overflow-child"></div> +</div> |