WebUI NTP: define rect for initial OneGoogleBar load
Initially the OneGoogleBar iframe is hidden. After the OneGoogleBar is loaded in the iframe, the iframe sends a 'loaded' message to ntp-app. ntp-app sets the clip-path style to the #oneGoogleBarClipPath with no rects defined (no part of the OGB is shown). It's possible to get into a broken state that stops processing changes to the OneGoogleBar. The changes seem to be paused until some part of the iframe is showing in the content area. The changes that pause I think are related to resize. From my testing, ResizeObserver and window 'resize' callbacks are not called until some part of the iframe is visible in the content area. This effect is not limited to clipPath and also includes when the iframe is scrolled out of view. This CL introduces an initial rect that will show the OneGoogleBar once loaded. It is immediately replaced with the rects sent by the iframe's 'overlaysUpdated' message. Bug: 1164733 Change-Id: I25f4bb4e448777216d78e29c1c7d645eac6f2985 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2621979 Commit-Queue: Esmael Elmoslimany <aee@chromium.org> Reviewed-by:Tibor Goldschwendt <tiborg@chromium.org> Auto-Submit: Esmael Elmoslimany <aee@chromium.org> Cr-Commit-Position: refs/heads/master@{#842265}
Showing
Please register or sign in to comment