[root layer scrolls] layout test failures in rootscroller |
||
Issue description
Six layout tests under virtual/android/fast/rootscroller/... fail on Linux with --root-layer-scrolls:
virtual/android/fast/rootscroller/browser-controls-background-iframe.html
virtual/android/fast/rootscroller/browser-controls-gradient-background-iframe-scroller.html
virtual/android/fast/rootscroller/browser-controls-gradient-background-iframe.html
virtual/android/fast/rootscroller/browser-controls-gradient-background.html
virtual/android/fast/rootscroller/nested-rootscroller-browser-controls-bounds-hidden.html
virtual/android/fast/rootscroller/nested-rootscroller-browser-controls-bounds-shown.html
The failures look like layer size issues:
-layer at (0,0) size 800x500
+layer at (0,0) size 800x600
LayoutView at (0,0) size 800x500
layer at (0,0) size 800x500
LayoutBlockFlow {HTML} at (0,0) size 800x500
LayoutBlockFlow {BODY} at (0,0) size 800x500 [bgcolor=#FF0000]
layer at (0,0) size 800x500
LayoutIFrame (positioned) {IFRAME} at (0,0) size 800x500
- layer at (0,0) size 800x500
+ layer at (0,0) size 800x600
LayoutView at (0,0) size 800x500
layer at (0,0) size 800x500
LayoutBlockFlow {HTML} at (0,0) size 800x500 [bgcolor=#800000]
The bots run fast/rootscroller tests under virtual/android and virtual/rootlayerscrolls, but not both. Maybe virtual/rootlayerscrolls/fast/rootscroller should include the Android flags.
@bokan can you take a look?
,
Jan 11 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/db6961c90d381c41b504bbe86a3ce493637a8aa3 commit db6961c90d381c41b504bbe86a3ce493637a8aa3 Author: David Bokan <bokan@chromium.org> Date: Thu Jan 11 18:51:49 2018 Make scroll element id SetNeedsCommit Currently, a scrollbar layer getting a new scroll element id marks the tree as needing a full tree sync. This seems somewhat overkill as this (by itself) doesn't cause any changes to the tree structure. Worse, this only marks the _structure_ of the tree as needing to be synced. It doesn't mark the layer as needing to push its properties across the commit. So if the layer doesn't need to push properties for any other reasons, the new scroll element id wouldn't get committed to the impl side layer! Some code archaeology shows this goes all the way back to https://crrev.com/0bf9472475c27b921b18c55dad34f9d7ad15d18e. At that time, it looks like a tree sync also pushed all properties so at some point this was optimized out. We typically don't notice as changing a scrolling layer on a scrollbar doesn't really happen today. This is changing with document.rootScroller since the viewport scrollbars can be reparented to the new rootScroller. This can cause a crash when the impl side scrollbar layers have an invalid scroll element id after a commit. This CL changes the SetScrollElementId on each type of scrollbar layer to call SetNeedsCommit instead of SetNeedsFullTreeSync. SetNeedsCommit calls SetNeedsPushProperties on the layer so the scroll element id is now committed. Bug: 773362 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel Change-Id: I3387e71a4de44fb24d2911b2900299cc1842334c Reviewed-on: https://chromium-review.googlesource.com/861323 Reviewed-by: enne <enne@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#528686} [modify] https://crrev.com/db6961c90d381c41b504bbe86a3ce493637a8aa3/cc/layers/painted_overlay_scrollbar_layer.cc [modify] https://crrev.com/db6961c90d381c41b504bbe86a3ce493637a8aa3/cc/layers/painted_scrollbar_layer.cc [modify] https://crrev.com/db6961c90d381c41b504bbe86a3ce493637a8aa3/cc/layers/scrollbar_layer_impl_base.h [modify] https://crrev.com/db6961c90d381c41b504bbe86a3ce493637a8aa3/cc/layers/scrollbar_layer_unittest.cc [modify] https://crrev.com/db6961c90d381c41b504bbe86a3ce493637a8aa3/cc/layers/solid_color_scrollbar_layer.cc
,
Jan 12 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e1bfa83b72c16ce19270d8e5641aa2bc46447b37 commit e1bfa83b72c16ce19270d8e5641aa2bc46447b37 Author: David Bokan <bokan@chromium.org> Date: Fri Jan 12 19:29:09 2018 Fix rootScroller URL bar adjustment under root-layer-scrolls position: fixed elements fixed to the bottom of the viewport require a special adjustment on Android due to the URL bar. As the URL bar hides, the viewport becomes taller; however, for performance reasons we can't resize the Blink widget at 60fps. Since layers are positioned from the top left, until Blink resizes the bottom-fixed layer will no longer be at the bottom of the viewport. To account for this, CC adjusts bottom-fixed layers by the URL bar offset. This adjustment is cleared when the Blink widget is resized and committed. Blink marks position-fixed containing layers that should apply this adjustment using SetIsResizedByBrowserControls. This is marked on all LayoutViews that have the global root-scroller as a descendant. This is so that, if the global root-scroller is inside an iframe, fixed elements in both the iframe and the parent frame will be adjusted. Prior to this CL, PLC would mark each root layer's scroll layer appropriately. However, IsFixedContainer is set from CLM on all child layers. When the property tree is built, it's actually the scrolling contents layer that fixed-layers will attach to so it too must be marked as IsResizedByBrowserControls. This CL moves this logic to CLM and marks the same layers as are marked for IsFixedContainer (but on the root layer only). Additionally, LayoutViews that have a root-scroller as a descendant shouldn't clip since they're guaranteed to be viewport-filling - this prevents clipping out content below as the URL bar is hidden. For the non-RLS case this happens by marking the OverflowControlsHostLayer as non-MasksToBounds. This CL extends this behavior to the root layer's CLM when running with RLS. Finally, as a small cleanup, I've removed the pointless indirection of SetLayerIsContainerForFixedPositionLayers through ScrollingCoordinator and made it directly settable on GraphicsLayer. This makes it consistent with other similar properties. Bug: 773362 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I547f344c15fc0c25c48161e8eee1e8440960edcc Reviewed-on: https://chromium-review.googlesource.com/854735 Reviewed-by: Steve Kobes <skobes@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#529016} [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/LayoutTests/FlagExpectations/root-layer-scrolls [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/frame/VisualViewport.cpp [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.cpp [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/page/scrolling/ScrollingCoordinator.h [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/page/scrolling/TopDocumentRootScrollerController.cpp [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/paint/compositing/CompositedLayerMapping.cpp [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/paint/compositing/PaintLayerCompositor.cpp [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/core/paint/compositing/PaintLayerCompositor.h [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/platform/graphics/GraphicsLayer.cpp [modify] https://crrev.com/e1bfa83b72c16ce19270d8e5641aa2bc46447b37/third_party/WebKit/Source/platform/graphics/GraphicsLayer.h
,
Jan 12 2018
|
||
►
Sign in to add a comment |
||
Comment 1 by bokan@chromium.org
, Jan 8 2018