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

Issue 2623213002: Expand PaintLayer clip to account for hidden URL bar with document.rootScroller (Closed)

Created:
3 years, 11 months ago by bokan
Modified:
3 years, 9 months ago
Reviewers:
chrishtr
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, dtapuska+blinkwatch_chromium.org, eae+blinkwatch, jchaffraix+rendering, kinuko+watch, leviw+renderwatch, Navid Zolghadr, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Expand PaintLayer clip to account for hidden URL bar with document.rootScroller In previous patches, the document.rootScroller would disable clipping on all parent layers in the compositor. This was fine in terms of visibility; however, hit testing is done on PaintLayers which come before compositor layers in the lifecycle. This means hit testing would still be blocked by parent layers, even if the area is visible. This is particularily problematic in terms of the top controls expansion. In order for a root scroller deeper in the frame hierarchy to get hit tested in the area exposed by the hidden URL bar, we need to use the root frame's visible content area when recursing down the PaintLayer tree for hit testing. This patch makes a few changes: -For hit testing entry, PaintLayers that are ancestors of the global RootScroller will use the root FrameView's size for clipping. In order for this to work, local LayoutBox hit testing needs to use the top LayoutView's overflowClipRect. There's an exception for SVG viewports since those appear to need clipping based on the SVG root rather than the viewport. I've also tried to consolidate this logic inside TopDocumentRootScrollerController and reuse it across call-sites. -Since we're expanding the clipping on PaintLayers, we no longer need to do the URL bar adjustment for root scrollers in CompositedLayerMapping. -PaintLayerClipper uses treats the local root scroller as the clipping root. -Had to fix BlockBoundTest in WebFrameTest as it didn't have a WebView size so it's FrameView had (0, 0) size which was now causing a failed hit test. BUG=505516 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 #

Patch Set 2 : Minor Changes #

Patch Set 3 : Fixes for broken tests #

Patch Set 4 : Fix for hittesting scrollbars #

Patch Set 5 : Cleanup #

Patch Set 6 : Rebase #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+352 lines, -42 lines) Patch
M third_party/WebKit/Source/core/frame/FrameView.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/input/EventHandlingUtil.cpp View 1 2 3 4 2 chunks +17 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 5 4 chunks +28 lines, -1 line 3 comments Download
M third_party/WebKit/Source/core/layout/compositing/CompositedLayerMapping.cpp View 1 2 3 1 chunk +0 lines, -10 lines 1 comment Download
M third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.h View 1 2 3 4 2 chunks +6 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp View 1 2 3 4 2 chunks +25 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 5 chunks +29 lines, -4 lines 1 comment Download
M third_party/WebKit/Source/core/paint/PaintLayerClipper.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerClipper.cpp View 1 2 3 4 4 chunks +13 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollTypes.h View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/scroll/ScrollableArea.h View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/tests/RootScrollerTest.cpp View 3 2 chunks +223 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 35 (28 generated)
bokan
Hey Chris, In a couple of the previous patches (https://codereview.chromium.org/2289833002/, https://codereview.chromium.org/2499853002/) I made the root ...
3 years, 11 months ago (2017-01-17 19:03:02 UTC) #27
chrishtr
How about just starting all hit tests at the root scroller? Anything above it can't ...
3 years, 11 months ago (2017-01-18 23:23:09 UTC) #30
bokan
On 2017/01/18 23:23:09, chrishtr wrote: > How about just starting all hit tests at the ...
3 years, 11 months ago (2017-01-18 23:46:58 UTC) #31
chrishtr
On 2017/01/18 at 23:46:58, bokan wrote: > On 2017/01/18 23:23:09, chrishtr wrote: > > How ...
3 years, 11 months ago (2017-01-19 01:43:23 UTC) #32
bokan
On 2017/01/19 01:43:23, chrishtr wrote: > On 2017/01/18 at 23:46:58, bokan wrote: > > On ...
3 years, 11 months ago (2017-01-19 03:18:03 UTC) #33
chrishtr
I still feel it's strange to have content outside of the rootScroller. The example of ...
3 years, 11 months ago (2017-01-21 02:06:47 UTC) #34
bokan
3 years, 11 months ago (2017-01-24 20:38:54 UTC) #35
On 2017/01/21 02:06:47, chrishtr wrote:
> I still feel it's strange to have content outside of the rootScroller. The
> example
> of a fixed-position overlay outside of the scroller also sounds strange,
because
> it
> means there are some magic-like effects outside of the rootScroller that
> everyone
> has to remember all the time.
> 
> If we only had to be concerned with things in the rootScroller and below it in
> the DOM
> etc, it would fit in much better with the way the paint, hit testing and
> compositing
> system make assumptions. e.g. SPv1 composited layers are perhaps a good
analogy
> to
> rootScroller - they are independent things that don't depend on any layout/DOM
> state
> from things above them. Such effects are applied by composited layers above
them
> in the
> graphics layer tree.
> 
> For the situation of a modal dialog or fading between views, maybe it's
> sufficient
> to remove the rootScroller property during such conditions. e.g. the app could
> turn off
> rootScroller, show the popup, and also put a hit testing region over the
entire
> screen
> so that the rootScroller can't be scrolled (which is probably desireable UX).
> Similarly for fading?
> 
> Or have a bunch of rootScrollers and rotate the active one, to maximize
> performance/
> encapsulation? Anyway that is getting into bikeshedding the spec; the concern
I
> have here
> is about implementation complexity and performance.

Thanks for the review, points taken. I'll see how far I can get with making the
root scroller the paint root, or at least preventing "magical" effects outside
its containing layer.

Powered by Google App Engine
This is Rietveld 408576698