Fix IntersectionObserver when using ForceZeroLayoutHeight
ForceZeroLayoutHeight is a Blink setting that's an Android WebView quirk. When set, Blink will set the height on the initial containing block (i.e. LayoutView) in the main frame to be 0. In the linked bug, we never see the video frame because the iframe it's hosted in is rendering throttled so it never paints. The reason it's throttled is because the IntersectionObserver that determines its visibility on screen uses the LayoutView's size. Because of the ForceZeroLayoutHeight setting, the LayoutView size is empty so the intersection is also always empty so we conclude the iframe is always off screen. The fix here is to carve out an exception in IntersectionObserver when this setting is enabled. In that case, for the root element, we use the FrameView's geometry instead. Bug: 824730 Change-Id: Ief24437135d19120a4e9bba8a2f1777ac448eea7 Reviewed-on: https://chromium-review.googlesource.com/978624Reviewed-by:Stefan Zager <szager@chromium.org> Commit-Queue: David Bokan <bokan@chromium.org> Cr-Commit-Position: refs/heads/master@{#545812}
Showing
Please register or sign in to comment