New issue
Advanced search Search tips

Issue 768029 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 1
Type: Bug

Blocking:
issue 618474



Sign in to add a comment

element.scrollIntoView not working inside OOPIFs

Project Member Reported by ekaramad@chromium.org, Sep 22 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1) Enable strict site isolation from chrome://flags.
(2) Open http://csreis.github.io/tests/cross-site-iframes.html in a new tab.
(3) Add a couple of frames (Say 2 more) until the last one scrolls out of view.
(4) Open devtools and type:
  window.frames[2].location = "http://jsbin.com/gebejez/edit?html,output"
(5) Click on "Click Me" and immediately scroll the last frame out of view.

What is the expected result?
The button should scroll back into view in 2 seconds.

What happens instead?
No scrolling happens.

(If the page above does not load try a page such as:
<body>
  <button>Click Me</button>
  <script>
    document.querySelector('button').onclick = function() {
      window.setTimeout(function() {
        this.scrollIntoView();
      }.bind(this), 2000);
    };
    </script>
</body>
in an OOPIF).
 
Blocking: 618474
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 23 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f152db88197739be6094b050d1e59ffc724dd828

commit f152db88197739be6094b050d1e59ffc724dd828
Author: Ehsan Karamad <ekaramad@chromium.org>
Date: Mon Oct 23 17:41:25 2017

Implement recursive scrolling of rect into view for OOPIFs

Functionalities such as element.scrollIntoView() API rely on recursively
scrolling LayoutBoxes until a given rectangle in view. When the LayoutObject
is that of a LocalFrameView, the scrolling is handed over to the owner
element in the parent frame. This step is currently not implemented for
OOPIFs which consequently breaks different features such as
find-in-page and element.scrollIntoView() API.

This CL adds support for recursive scroll across OOPIFs through adding
a public struct WebRemoteScrollPropteries in blink which will be passed
from a renderer process to the browser to be then forwarded to the
parent frame. The new struct along with the rectangle to be scrolled are
the missing information needed to join the scroll chain between a child
process and its parent.

The CL adds an interactive test to catch element.scrollIntoView()
regressions in OOPIFs.

Bug:  618474 ,  676037 , 734209,  768029 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_site_isolation
Change-Id: Iff5a5b470721f1a6e3c5db5f8f1c427a52ddb31c
Reviewed-on: https://chromium-review.googlesource.com/679319
Commit-Queue: Ehsan Karamad <ekaramad@chromium.org>
Reviewed-by: Dimitri Glazkov <dglazkov@chromium.org>
Reviewed-by: Alex Moshchuk <alexmos@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510838}
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/browser/DEPS
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/browser/frame_host/render_frame_host_impl.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/browser/frame_host/render_frame_proxy_host.cc
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/browser/frame_host/render_frame_proxy_host.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/browser/site_per_process_browsertest.cc
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/common/DEPS
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/common/frame_messages.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/renderer/render_frame_impl.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/renderer/render_frame_proxy.cc
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/renderer/render_frame_proxy.h
[add] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/content/test/data/bounding_rect_for_frame.html
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.cpp
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/exported/LocalFrameClientImpl.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.cpp
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/exported/WebRemoteFrameImpl.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/frame/LocalFrameClient.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/frame/LocalFrameView.cpp
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/frame/LocalFrameView.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/layout/LayoutBox.cpp
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/core/layout/ScrollAlignment.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/platform/BUILD.gn
[add] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/Source/platform/exported/WebRemoteScrollProperties.cpp
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/public/BUILD.gn
[add] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/public/platform/WebRemoteScrollProperties.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/public/web/WebFrameClient.h
[modify] https://crrev.com/f152db88197739be6094b050d1e59ffc724dd828/third_party/WebKit/public/web/WebRemoteFrame.h

Cc: creis@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment