Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Issue 2584653002: Force subtree paint property updates on local border box changes (Closed)

Created:
4 years ago by pdr.
Modified:
3 years, 11 months ago
Reviewers:
chrishtr, Xianzhu
CC:
blink-reviews, blink-reviews-paint_chromium.org, chromium-reviews, dshwang
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Force subtree paint property updates on local border box changes If the local border box changes, the paint properties of descendants may also need updating. This patch updates the local border box code to work like all other paint property updates where changes force a subtree update. This DCHECK was missed previously because paint offset changes would invalidate these cases. TEST=virtual/spinvalidation/paint/invalidation/scroll-descendant-with-cached-cliprects.html BUG=674623 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 #

Total comments: 3

Patch Set 2 : fix bugs #

Unified diffs Side-by-side diffs Delta from patch set Stats (+128 lines, -16 lines) Patch
M third_party/WebKit/Source/core/paint/ObjectPaintProperties.h View 1 1 chunk +33 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp View 1 1 chunk +92 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/graphics/paint/PropertyTreeState.h View 1 5 chunks +1 line, -7 lines 0 comments Download

Messages

Total messages: 20 (10 generated)
pdr.
4 years ago (2016-12-15 19:34:38 UTC) #3
pdr.
4 years ago (2016-12-15 19:34:41 UTC) #4
chrishtr
https://codereview.chromium.org/2584653002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp File third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp (right): https://codereview.chromium.org/2584653002/diff/1/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp#newcode3234 third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp:3234: TEST_P(PaintPropertyTreeBuilderTest, LocalBorderBoxChanges) { For completeness, please also add a ...
4 years ago (2016-12-15 19:42:52 UTC) #7
Xianzhu
https://codereview.chromium.org/2584653002/diff/1/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h File third_party/WebKit/Source/core/paint/ObjectPaintProperties.h (right): https://codereview.chromium.org/2584653002/diff/1/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h#newcode141 third_party/WebKit/Source/core/paint/ObjectPaintProperties.h:141: m_localBorderBoxProperties->paintOffset = paintOffset; What's the relationship between this check ...
4 years ago (2016-12-15 19:46:28 UTC) #8
pdr.
On 2016/12/15 at 19:46:28, wangxianzhu wrote: > https://codereview.chromium.org/2584653002/diff/1/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h > File third_party/WebKit/Source/core/paint/ObjectPaintProperties.h (right): > > https://codereview.chromium.org/2584653002/diff/1/third_party/WebKit/Source/core/paint/ObjectPaintProperties.h#newcode141 ...
4 years ago (2016-12-15 20:04:54 UTC) #9
pdr.
On 2016/12/15 at 20:04:54, pdr. wrote: > On 2016/12/15 at 19:46:28, wangxianzhu wrote: > > ...
4 years ago (2016-12-15 21:09:39 UTC) #12
Xianzhu
lgtm
4 years ago (2016-12-15 21:29:30 UTC) #13
Xianzhu
When thinking of solution of subtree movement, I thought of a question about this CL: ...
4 years ago (2016-12-16 00:45:39 UTC) #16
pdr.
On 2016/12/16 at 00:45:39, wangxianzhu wrote: > When thinking of solution of subtree movement, I ...
4 years ago (2016-12-16 03:04:56 UTC) #17
chrishtr
4 years ago (2016-12-16 19:28:44 UTC) #20
On 2016/12/16 at 03:04:56, pdr wrote:
> On 2016/12/16 at 00:45:39, wangxianzhu wrote:
> > When thinking of solution of subtree movement, I thought of a question about
this CL: can checking of localBorderBoxProperties change catch all cases of
crbug.com/674623? For example, can this CL catch the case that an ancestor
object changes 'position' which doesn't affect its own localBorderBoxProperties
but causes some descendant needs property update?
> 
> This is a good question. We would need a case where properties after
updateLocalBorderBoxContext are affected by the position change. There are some
paint offset cases that would be different, but we should be able to catch
those. The absolute or fixed contexts could also change though. I made a few
testcases of abs/fixed context changes that ended up being safe in different
ways, which makes me a bit worried.
> 
> Lets not land this patch and work through the remaining test failures. If no
more position changing bugs come up, lets land this. Otherwise, we may need to
force a subtree update on positioning changes.

<style>
* { margin: 0; }
</style>
<div id=ancestor style="position: absolute; overflow: hidden">
  <div id=descendant style="position: absolute">
  </div>
</div>
<script>
ancestor.style.position = "relative";
</script>

When executing the line of script above, |ancestor| will not change its local
border box properties, because its containing block does not change.
Also, it has the same local property tree objects, because its overflow clipping
does not change. Same goes for paintOffset.

However, |descendant|'s clipping container changes because its containing block
is no longer "ancestor".

Therefore this CL needs to change to force subtree on positioning change.

Powered by Google App Engine
This is Rietveld 408576698