-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure update of scrollbar and caret visual rects on ancestor clip ch…
…ange When an ancestor clip changes, we set kSubtreeVisualRectUpdate to update descendant visual rects which may be affected by the clip change. Previously we early returned in PaintInvalidator::InvalidatePaint() for descendants that had only kSubtreeVisualRectUpdate flag set. This caused other visual rects (of e.g. scrollbars, carets) that are updated during LayoutObject::InvalidatePaint() not updated. Now move the early return from PaintInvalidator::InvalidatePaint() into ObjectPaintInvalidator::ComputePaintInvalidationReason() to ensure the visual rects are updated. [email protected] (cherry picked from commit 6dfcf90) Bug: 727155 Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I28f92281363c693b16121f48d21ab4f808990f14 Reviewed-on: https://chromium-review.googlesource.com/719716 Commit-Queue: Xianzhu Wang <[email protected]> Reviewed-by: Chris Harrelson <[email protected]> Cr-Original-Commit-Position: refs/heads/master@{#509648} Reviewed-on: https://chromium-review.googlesource.com/728300 Reviewed-by: Xianzhu Wang <[email protected]> Cr-Commit-Position: refs/branch-heads/3239@{#66} Cr-Branched-From: adb61db-refs/heads/master@{#508578}
- Loading branch information
1 parent
73d1627
commit 470d6c4
Showing
11 changed files
with
220 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...cific/enable-slimming-paint-v2/paint/invalidation/caret-ancestor-clip-change-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"layers": [ | ||
{ | ||
"name": "LayoutView #document", | ||
"bounds": [800, 600], | ||
"contentsOpaque": true, | ||
"backgroundColor": "#FFFFFF", | ||
"paintInvalidations": [ | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"rect": [8, 8, 95, 112], | ||
"reason": "paint property change" | ||
}, | ||
{ | ||
"object": "LayoutTextControl INPUT id='target'", | ||
"rect": [8, 8, 95, 112], | ||
"reason": "paint property change" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"rect": [8, 8, 95, 50], | ||
"reason": "paint property change" | ||
}, | ||
{ | ||
"object": "LayoutTextControl INPUT id='target'", | ||
"rect": [8, 8, 95, 50], | ||
"reason": "paint property change" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
7 changes: 7 additions & 0 deletions
7
third_party/WebKit/LayoutTests/paint/invalidation/caret-ancestor-clip-change-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<!DOCTYPE html> | ||
<script> | ||
onload = function() { target.focus(); } | ||
</script> | ||
<div style="width: 200px; height: 300px; overflow: hidden"> | ||
<input id="target" style="font-size: 100px; width: 100px; margin-left: -10px; margin-top: -10px"> | ||
</div> |
46 changes: 46 additions & 0 deletions
46
third_party/WebKit/LayoutTests/paint/invalidation/caret-ancestor-clip-change-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"layers": [ | ||
{ | ||
"name": "LayoutView #document", | ||
"bounds": [800, 600], | ||
"contentsOpaque": true, | ||
"backgroundColor": "#FFFFFF", | ||
"paintInvalidations": [ | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"rect": [8, 8, 200, 300], | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"rect": [8, 8, 200, 300], | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='clip'", | ||
"rect": [8, 58, 200, 250], | ||
"reason": "incremental" | ||
} | ||
] | ||
} | ||
], | ||
"objectPaintInvalidations": [ | ||
{ | ||
"object": "LayoutBlockFlow DIV id='clip'", | ||
"reason": "incremental" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "RootInlineBox", | ||
"reason": "geometry" | ||
} | ||
] | ||
} | ||
|
21 changes: 21 additions & 0 deletions
21
third_party/WebKit/LayoutTests/paint/invalidation/caret-ancestor-clip-change.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE html> | ||
<script src="resources/text-based-repaint.js"></script> | ||
<script> | ||
function repaintTest() { | ||
clip.style.height = '300px'; | ||
} | ||
onload = function() { | ||
target.focus(); | ||
runRepaintAndPixelTest(); | ||
} | ||
</script> | ||
<div id="clip" style="width: 200px; height: 50px; overflow: hidden"> | ||
<!-- These two divs isolate layout of |target| from |clip|, so that we won't | ||
layout |target| on |clip|'s height change. --> | ||
<div style="width: 300px; height: 300px; overflow: hidden"> | ||
<div style="width: 300px; height: 300px; overflow: hidden"> | ||
<!-- Use negative margins to avoid scroll on focus which would cause extra invalidations. --> | ||
<input id="target" style="font-size: 100px; width: 100px; margin-left: -10px; margin-top: -10px"> | ||
</div> | ||
</div> | ||
</div> |
4 changes: 4 additions & 0 deletions
4
..._party/WebKit/LayoutTests/paint/invalidation/scrollbar-ancestor-clip-change-expected.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<!DOCTYPE html> | ||
<div style="width: 100px; height: 200px; overflow: scroll"> | ||
<div style="width: 400px; height: 400px"></div> | ||
</div> |
78 changes: 78 additions & 0 deletions
78
...d_party/WebKit/LayoutTests/paint/invalidation/scrollbar-ancestor-clip-change-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"layers": [ | ||
{ | ||
"name": "LayoutView #document", | ||
"bounds": [800, 600], | ||
"contentsOpaque": true, | ||
"backgroundColor": "#FFFFFF", | ||
"paintInvalidations": [ | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"rect": [8, 8, 100, 300], | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"rect": [8, 8, 100, 300], | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='clip'", | ||
"rect": [8, 108, 100, 200], | ||
"reason": "incremental" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='target'", | ||
"rect": [8, 193, 85, 15], | ||
"reason": "scroll control" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='target'", | ||
"rect": [93, 8, 15, 185], | ||
"reason": "scroll control" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='target'", | ||
"rect": [93, 8, 15, 100], | ||
"reason": "scroll control" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='target'", | ||
"rect": [93, 193, 15, 15], | ||
"reason": "scroll control" | ||
} | ||
] | ||
} | ||
], | ||
"objectPaintInvalidations": [ | ||
{ | ||
"object": "LayoutBlockFlow DIV id='clip'", | ||
"reason": "incremental" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV", | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='target'", | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "HorizontalScrollbar", | ||
"reason": "scroll control" | ||
}, | ||
{ | ||
"object": "LayoutBlockFlow DIV id='target'", | ||
"reason": "geometry" | ||
}, | ||
{ | ||
"object": "VerticalScrollbar", | ||
"reason": "scroll control" | ||
} | ||
] | ||
} | ||
|
19 changes: 19 additions & 0 deletions
19
third_party/WebKit/LayoutTests/paint/invalidation/scrollbar-ancestor-clip-change.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<!DOCTYPE html> | ||
<script src="resources/text-based-repaint.js"></script> | ||
<script> | ||
function repaintTest() { | ||
clip.style.height = '300px'; | ||
} | ||
onload = runRepaintAndPixelTest; | ||
</script> | ||
<div id="clip" style="width: 100px; height: 100px; overflow: hidden"> | ||
<!-- These two divs isolate layout of |target| from |clip|, so that we won't | ||
layout |target| on |clip|'s height change. --> | ||
<div style="width: 300px; height: 300px; overflow: hidden"> | ||
<div style="width: 300px; height: 300px; overflow: hidden"> | ||
<div id="target" style="width: 100px; height: 200px; overflow: scroll"> | ||
<div style="width: 400px; height: 400px"></div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters