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

Issue 2276783002: Fix incorrect invalidation of foreign objects under window zoom. (Closed)

Created:
4 years, 4 months ago by wkorman
Modified:
4 years, 2 months ago
Reviewers:
pdr., Xianzhu, fs
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix incorrect invalidation of foreign objects under window zoom. Add an over-invalidation hack along the lines of what already exists for dealing with ancestor clip changes. On window zoom we see a call to invalidate where the foreign object's previous paint invalidation rect matches the new paint invalidation rect, but we still have to force subtree invalidation in order to allow subtree to resize for the new zoom level. BUG=640265

Patch Set 1 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+14 lines, -1 line) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp View 1 chunk +14 lines, -0 lines 5 comments Download

Messages

Total messages: 10 (4 generated)
wkorman
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode419 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:419: if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() This is just a minor adaptation of ...
4 years, 4 months ago (2016-08-23 23:13:10 UTC) #3
pdr.
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode419 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:419: if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() On 2016/08/23 at 23:13:10, wkorman wrote: > ...
4 years, 4 months ago (2016-08-24 18:12:19 UTC) #6
Xianzhu
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode419 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:419: if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() On 2016/08/24 18:12:19, pdr. wrote: > On ...
4 years, 4 months ago (2016-08-24 18:19:48 UTC) #7
fs
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode419 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:419: if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() On 2016/08/24 at 18:12:19, pdr. wrote: > ...
4 years, 4 months ago (2016-08-24 19:11:45 UTC) #8
pdr.
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right): https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp#newcode419 third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:419: if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled() On 2016/08/24 at 19:11:44, fs wrote: > ...
4 years, 4 months ago (2016-08-24 19:55:23 UTC) #9
fs
4 years, 4 months ago (2016-08-24 21:17:17 UTC) #10
On 2016/08/24 at 19:55:23, pdr wrote:
>
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/c...
> File third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp (right):
> 
>
https://codereview.chromium.org/2276783002/diff/1/third_party/WebKit/Source/c...
> third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp:419: if
(!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
> On 2016/08/24 at 19:11:44, fs wrote:
> > On 2016/08/24 at 18:12:19, pdr. wrote:
> > > On 2016/08/23 at 23:13:10, wkorman wrote:
> > > > This is just a minor adaptation of your patch:
> > > > https://codereview.chromium.org/1835843002/patch/1/10036
> > > > 
> > > > Per my change description however, I find that on window zoom we see
this called with the new and previous paint invalidation rect matching, thus we
won't force subtree invalidation, and it appears that we do need to do so in
order for all contents of the foreign object to be invalidated.
> > > > 
> > > > So, I've removed:
> > > > 
> > > > && previousPaintInvalidationRect !=
this->previousPaintInvalidationRect()
> > > > 
> > > > which could mean we'll be over-invalidating more frequently than we
would, ideally. Do you have alternate suggestions or insight?
> > > 
> > > I am not sure if my original patch was on the right track. Looking back at
it, I think I was off in the weeds.
> > > 
> > > Do you know how paint invalidation works for zoom changes in svg in
general? The root SVG layout object should apply zoom globally (see
LayoutSVGRoot::buildLocalToBorderBoxTransform and
SVGRootPainter::transformToPixelSnappedBorderBox). When the root's zoom changes,
how do regular SVG objects get invalidated?
> > 
> > Like Xianzhu say, zoom ought to trigger layout for the whole subtree (the
fancy screen-scale-changed flag doohickey), which then in turn will invalidate
the objects. Maybe that breaks down at the fO boundary. Can think of obvious
stuff wrt clipping (although I rather suspect we don't apply it at all in these
cases...)

Uhm, s/Can/Can't/ there if that wasn't clear from context...
 
> I see, that makes sense.
> 
> Would something like the following work?
>     if (!RuntimeEnabledFeatures::slimmingPaintV2Enabled()
>         && previousPaintInvalidationRect !=
this->previousPaintInvalidationRect()
>         && !usesCompositedScrolling()
>         // Note that isLayoutView() below becomes unnecessary after the launch
of root layer scrolling.
>         && (hasOverflowClip() || isLayoutView() || isSVGRoot()))
>        
newPaintInvalidationState.setForceSubtreeInvalidationRectUpdateWithinContainer();

Are there indications that this is a problem in other cases than the "fO
boundary"? (The above seems to cover quite a bit more.)

Powered by Google App Engine
This is Rietveld 408576698