Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Issue 1970763002: Fixed up root scroller API to be more webby (Closed)

Created:
4 years, 7 months ago by bokan
Modified:
4 years, 6 months ago
Reviewers:
esprehn
CC:
blink-reviews, blink-reviews-dom_chromium.org, chromium-reviews, dglazkov+blink, dtapuska+blinkwatch_chromium.org, eae+blinkwatch, kenneth.christiansen, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fixed up root scroller API to be more webby -Removed document.setRootScroller and replaced it by making the document.rootScroller attribute writable. -Moved the RootScroller object from FrameHost into Document. Now each Document has its own RootScroller object which manages the rootScroller for that Document. This means each iframe on the page will have its own rootScroller. I've allowed setting it from iframes now too, making the API more composable; setting a rootScroller on an iframe's Document simply doesn't change any behavior. -Made the rootScroller "sticky". Previously, if the current rootScroller becomes invalid (for example, the rootScroller Element becomes display:none) it would reset to the default element. With this CL, we'll use the default while the rootScroller is invalid, but we keep the rootScroller set. When it becomes valid again, we'll use it again. This is done by making RootScroller::m_rootScroller the Element the page has set as the root scroller. RootScroller::m_effectiveRootScroller is the Element we're using internally to handle viewport actions. -Changed the criteria for a valid rootScroller. Elements in an iframe can now be used. Only elements that exactly fill the viewport are considered valid. BUG=505516 Committed: https://crrev.com/16c5f9e182d412046291088ab782579f315bf100 Cr-Commit-Position: refs/heads/master@{#397778}

Patch Set 1 : #

Total comments: 14

Patch Set 2 : Rebase #

Patch Set 3 : Fixed tests to match new expectations #

Patch Set 4 : Missed One Test #

Patch Set 5 : Rebase #

Patch Set 6 : Sigh...fix test expectation again, fix crash when there's no renderer #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -313 lines) Patch
M third_party/WebKit/LayoutTests/fast/scrolling/set-root-scroller.html View 1 2 3 chunks +35 lines, -26 lines 0 comments Download
M third_party/WebKit/LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Document.h View 1 2 3 4 4 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 chunks +17 lines, -47 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.idl View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameHost.h View 1 2 3 4 3 chunks +0 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/frame/FrameHost.cpp View 1 2 3 4 4 chunks +0 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/core/frame/LocalFrame.h View 1 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/input/ScrollManager.cpp View 1 2 3 4 2 chunks +5 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/RootScroller.h View 1 chunk +62 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/RootScroller.cpp View 1 2 3 4 5 2 chunks +91 lines, -85 lines 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/RootScrollerTest.cpp View 1 2 3 8 chunks +93 lines, -82 lines 0 comments Download
M third_party/WebKit/Source/web/tests/data/root-scroller-child.html View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/data/root-scroller-iframe.html View 1 2 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 29 (16 generated)
bokan
Hi Elliott, ptal, I made the changes you mentioned in https://codereview.chromium.org/1913843004/ Some caveats: -I made ...
4 years, 7 months ago (2016-05-11 15:28:25 UTC) #4
bokan
Oh, and I still need to update/add tests but I'll do that if you think ...
4 years, 7 months ago (2016-05-11 15:41:48 UTC) #5
esprehn
lgtm w/ nits about refs fixed. I added some other comments about the design, but ...
4 years, 7 months ago (2016-05-11 17:37:05 UTC) #6
bokan
Back from vacation and ready to land. I've also updated tests to match the new ...
4 years, 6 months ago (2016-06-02 15:49:55 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970763002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970763002/60001
4 years, 6 months ago (2016-06-02 15:50:37 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/193929)
4 years, 6 months ago (2016-06-02 15:58:22 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970763002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970763002/80001
4 years, 6 months ago (2016-06-02 19:02:04 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/200188) win_clang on tryserver.chromium.win (JOB_FAILED, ...
4 years, 6 months ago (2016-06-02 19:39:51 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970763002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1970763002/100001
4 years, 6 months ago (2016-06-03 14:37:23 UTC) #20
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/238670)
4 years, 6 months ago (2016-06-03 16:32:34 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1970763002/120001
4 years, 6 months ago (2016-06-03 17:27:43 UTC) #25
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years, 6 months ago (2016-06-03 19:26:56 UTC) #27
commit-bot: I haz the power
4 years, 6 months ago (2016-06-03 19:29:09 UTC) #29
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/16c5f9e182d412046291088ab782579f315bf100
Cr-Commit-Position: refs/heads/master@{#397778}

Powered by Google App Engine
This is Rietveld 408576698