[root-layer-scrolls] Fix android fullscreen video
Android uses an "overlay" composited video layer when a video is fullscreened. This layer is parented to the PaintLayerCompositor's root_content_layer and the actual content (LayoutView) is detached. With root-layer-scrolling enabled, PLC doesn't create a root_content_layer and the top-most GraphicsLayer in PLC is that of the LayoutView. This CL connects the video layer to the PLC's parent instead. This is currently the outer viewport scroll layer. We also need to make sure painting starts from the child of this layer, rather than the PLC's root layer since the video layer is no longer connected to the root. This doesn't matter for the video itself, however, the media player controls need to be painted from Blink. These changes exposed some brittleness in the compositor and the Android fullscreen video layout tests were hitting the DCHECK in ScrollbarLayerImplBase::CanScrollOrientation. This is because the viewport scrollbars use the outer/layout viewport as their ElementId but are owned by the inner/visual viewport. So when we disconnect the PLC's content layers, we remove the ScrollNode in the compositor but the visual viewport and its scrollbar layers live on. The rest of this patch changes the visual viewport scrollbars to use the visual viewport's element id. TEST=virtual/android/fullscreen/video-scrolled-iframe.html, virtual/android/fullscreen/video-controls-timeline.html, virtual/android/fullscreen/full-screen-iframe-allowed-video.html Bug: 711468,811024 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: Ic1c52e1853f14842ee3ae19119476b8945ecae17 Reviewed-on: https://chromium-review.googlesource.com/923397 Reviewed-by:Chris Harrelson <chrishtr@chromium.org> Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Cr-Commit-Position: refs/heads/master@{#540226}
Loading
Please register or sign in to comment