Split RootScrollerController into top-document and child-document classes
Work on making RootScrollerController work across iframes revealed that there's two responsibilities that need management. All frames need a RootScrollerController to manage the Element currently set as root scroller and determine which Element should eventually become the effective root scroller. In addition, we need the RootScrollerController to manage the ViewportApplyScroll and set it on the appropriate element. Since only one Element on the whole page needs this callback set, it makes sense that only the top document should have this responsibility. Experience with classes like FrameView and EventHandler shows that this may be better served by subclassing the top level object rather than having isMainFrame() checks intermingled with the other code. BUG=505516 Review-Url: https://codereview.chromium.org/2280453002 Cr-Commit-Position: refs/heads/master@{#414796}
Showing
Please register or sign in to comment