forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix wrong PaintInvalidationIncremental on empty object
The bug was because LayoutBox::getPaintInvalidatinReason() returned PaintInvalidationIncremental after LayoutObject::getPaintInvalidationReason() returned PaintInvalidationNone for an empty object. In the case we should not do any paint invalidation but executed incrementallyInvalidatePaint() and triggered the assertion failure. BUG=634807 Review-Url: https://codereview.chromium.org/2212223004 Cr-Commit-Position: refs/heads/master@{#410231}
- Loading branch information
1 parent
b886659
commit b9ec37c
Showing
3 changed files
with
29 additions
and
2 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
third_party/WebKit/LayoutTests/paint/invalidation/empty-object-move-and-resize-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,13 @@ | ||
{ | ||
"name": "Content Root Layer", | ||
"bounds": [800, 600], | ||
"children": [ | ||
{ | ||
"name": "LayoutView #document", | ||
"bounds": [800, 600], | ||
"contentsOpaque": true, | ||
"drawsContent": true | ||
} | ||
] | ||
} | ||
|
14 changes: 14 additions & 0 deletions
14
third_party/WebKit/LayoutTests/paint/invalidation/empty-object-move-and-resize.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,14 @@ | ||
<!DOCTYPE html> | ||
<script src="../../fast/repaint/resources/text-based-repaint.js"></script> | ||
<script> | ||
function repaintTest() { | ||
target.style.top = '200px'; | ||
target.style.left = '200px'; | ||
target.style.width = '200px'; | ||
target.style.height = '200px'; | ||
} | ||
onload = runRepaintTest; | ||
</script> | ||
Tests paint invalidation of an empty object when moved and resized. | ||
It passes if there is not any assertion failure or paint invalidation. | ||
<div id="target" style="position: absolute; top: 100px; left: 100px; width: 100px; height: 100px"></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