RESOLVED INVALID 91329
Enable using ScrollingCoordinator in a multi-process environment
https://bugs.webkit.org/show_bug.cgi?id=91329
Summary Enable using ScrollingCoordinator in a multi-process environment
Noam Rosenthal
Reported 2012-07-14 17:18:32 PDT
Enable using ScrollingCoordinator in a multi-process environment
Attachments
Patch (58.15 KB, patch)
2012-07-14 17:44 PDT, Noam Rosenthal
no flags
Patch (58.12 KB, patch)
2012-07-14 17:57 PDT, Noam Rosenthal
no flags
Patch (57.98 KB, patch)
2012-07-14 18:40 PDT, Noam Rosenthal
no flags
Trying to account for the different #ifdef blends (58.19 KB, patch)
2012-07-14 19:26 PDT, Noam Rosenthal
no flags
Patch (93.87 KB, patch)
2012-07-17 15:53 PDT, Noam Rosenthal
no flags
Patch 1 - only the WebCore parts (20.57 KB, patch)
2012-07-17 16:14 PDT, Noam Rosenthal
buildbot: commit-queue-
Patch (60.27 KB, patch)
2012-07-17 17:24 PDT, Noam Rosenthal
no flags
Noam Rosenthal
Comment 1 2012-07-14 17:44:39 PDT
Noam Rosenthal
Comment 2 2012-07-14 17:48:03 PDT
This patch comes following a discussion on IRC with andersca, trying to find a way to separate the threaded aspects of ScrollingTree from the transaction-based ScrollingTreeState which can also be used in WebKit2 or in other multi-process environments. It's not yet enabled so I'm not foreseeing any changes in behavior, but hopefully the refactor would allow us to reuse ScrollingCoordinator in WebKit2 in the future.
Noam Rosenthal
Comment 3 2012-07-14 17:57:44 PDT
Gyuyoung Kim
Comment 4 2012-07-14 18:09:21 PDT
WebKit Review Bot
Comment 5 2012-07-14 18:27:32 PDT
Comment on attachment 152441 [details] Patch Attachment 152441 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13248136
Build Bot
Comment 6 2012-07-14 18:28:43 PDT
Early Warning System Bot
Comment 7 2012-07-14 18:30:37 PDT
Noam Rosenthal
Comment 8 2012-07-14 18:34:30 PDT
Comment on attachment 152441 [details] Patch Seems to be missing some stuff on some (most) platforms. Will check what it is and resubmit.
Noam Rosenthal
Comment 9 2012-07-14 18:40:22 PDT
Gyuyoung Kim
Comment 10 2012-07-14 19:04:35 PDT
Early Warning System Bot
Comment 11 2012-07-14 19:11:47 PDT
Build Bot
Comment 12 2012-07-14 19:12:02 PDT
Noam Rosenthal
Comment 13 2012-07-14 19:26:50 PDT
Created attachment 152443 [details] Trying to account for the different #ifdef blends
Kenneth Rohde Christiansen
Comment 14 2012-07-16 21:19:36 PDT
Comment on attachment 152443 [details] Trying to account for the different #ifdef blends View in context: https://bugs.webkit.org/attachment.cgi?id=152443&action=review > Source/WebKit2/ChangeLog:8 > + Added WebKit2-support for ScrollingCoordinator. So Mac is not using this with WebKit 2 yet? > Source/WebKit2/ChangeLog:17 > + Since this code path is still under development, t's guarded in runtime by an enviroment it's* > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:102 > +#if ENABLE(THREADED_SCROLLING) > + return m_scrollingTree.get(); > +#else > + return m_client; > +#endif Would it make sense to turn the scrolling tree into a proper client in the future? > Source/WebCore/page/scrolling/ScrollingCoordinatorClient.h:42 > + virtual IntPoint mainFrameScrollPosition() = 0; Won't we use this for subframes in the future? > Source/WebCore/page/scrolling/ScrollingTree.h:110 > + > + double newline > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:671 > + for (size_t i = 0; i < rects.size(); ++i) > + region.unite(Region(rects[i])); You encode multiple regions but we when decoding you unite them? comment? > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:676 > + > + double new line > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:824 > + if (changedProperties & ScrollingTreeState::WheelEventHandlerCount) > + encoder->encode(state.wheelEventHandlerCount()); I guess a next step would be adding TouchEventHandlerCount :-) or can that be handled by NonFastScrollableRegion? > Source/WebKit2/UIProcess/WebScrollingCoordinatorProxy.cpp:8 > + This library is free software; you can redistribute it and/or > + modify it under the terms of the GNU Library General Public > + License as published by the Free Software Foundation; either > + version 2 of the License, or (at your option) any later version. > + Any reason to not use BSD license here? > Source/WebKit2/UIProcess/WebScrollingCoordinatorProxy.cpp:42 > + // FIXME: Implement. notImplemented() ? > Source/WebKit2/WebProcess/WebPage/WebScrollingCoordinator.cpp:44 > +static bool canUseCoordinator() shouldUseCoordinator>?
Noam Rosenthal
Comment 15 2012-07-16 21:23:11 PDT
(In reply to comment #14) > So Mac is not using this with WebKit 2 yet? Not for this... > > Source/WebKit2/ChangeLog:17 > > + Since this code path is still under development, t's guarded in runtime by an enviroment > > it's* > > > Source/WebCore/page/scrolling/ScrollingCoordinator.cpp:102 > > +#if ENABLE(THREADED_SCROLLING) > > + return m_scrollingTree.get(); > > +#else > > + return m_client; > > +#endif > > Would it make sense to turn the scrolling tree into a proper client in the future? It is a proper client. It just isn't saved as an additional member. Couldn't find a cleaner way to do that, suggestions? > > Source/WebCore/page/scrolling/ScrollingCoordinatorClient.h:42 > > + virtual IntPoint mainFrameScrollPosition() = 0; > > Won't we use this for subframes in the future? Probably :) Right now I'm just exposing what scrollingCoordinator needs. > You encode multiple regions but we when decoding you unite them? comment? I encode multiple rects and then unite them to a new region. > Any reason to not use BSD license here? Copy paste :)
Kenneth Rohde Christiansen
Comment 16 2012-07-16 21:30:31 PDT
> > Would it make sense to turn the scrolling tree into a proper client in the future? > > It is a proper client. It just isn't saved as an additional member. Couldn't find a cleaner way to do that, suggestions? Then I would have to look better at the code, but I think it is fine. > > > Source/WebCore/page/scrolling/ScrollingCoordinatorClient.h:42 > > > + virtual IntPoint mainFrameScrollPosition() = 0; > > > > Won't we use this for subframes in the future? > Probably :) Right now I'm just exposing what scrollingCoordinator needs. Yeah, I saw the comment later down in the original code that it doesnt support sub frames yet. > > You encode multiple regions but we when decoding you unite them? comment? > I encode multiple rects and then unite them to a new region. > > > Any reason to not use BSD license here? > Copy paste :) If that is the standard license for WebKit2 UI side code then I am fine with it. I just wondered. So this current patch compiles (I cannot see the EWs status due to being in China without working VPN)
Noam Rosenthal
Comment 17 2012-07-16 22:30:18 PDT
> So this current patch compiles (I cannot see the EWs status due to being in China without working VPN) Yes, EWS passes.
Kenneth Rohde Christiansen
Comment 18 2012-07-16 23:09:40 PDT
Comment on attachment 152443 [details] Trying to account for the different #ifdef blends View in context: https://bugs.webkit.org/attachment.cgi?id=152443&action=review > Source/WebCore/ChangeLog:8 > + Moved the threaded behavior out of ScrollingCoordinator and into ScrollingTree. Should it be called ThreadedScrollingTree? > Source/WebCore/ChangeLog:13 > + A new ENABLE(PARALLEL_SCROLLING) guard has been added to include both the existing > + THREADED_SCROLLING path and the new cross-process scrolling. so PARALLEL_SCROLLING turned on means that THREADED_SCROLLING is also turned on, that is not what you wanted to say is it? > Source/WebCore/page/scrolling/ScrollingCoordinatorClient.h:41 > +class ScrollingCoordinatorClient { > +public: > + virtual void commitScrollingTreeState(const ScrollingTreeState&) = 0; It is a bit confusing that we are not using the actual ScrollingTree but a client, but we still use things related to ScrollingTree. I think we need to rename ScrollingTree to ScrollingTreeThreaded or so to avoid confusion.
Noam Rosenthal
Comment 19 2012-07-17 06:15:40 PDT
(In reply to comment #18) > (From update of attachment 152443 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=152443&action=review > > > Source/WebCore/ChangeLog:8 > > + Moved the threaded behavior out of ScrollingCoordinator and into ScrollingTree. > > Should it be called ThreadedScrollingTree? Sounds good to me. > > > Source/WebCore/ChangeLog:13 > > + A new ENABLE(PARALLEL_SCROLLING) guard has been added to include both the existing > > + THREADED_SCROLLING path and the new cross-process scrolling. > > so PARALLEL_SCROLLING turned on means that THREADED_SCROLLING is also turned on, that is not what you wanted to say is it? No. I mean to say that the code included in PARALLEL_SCROLLING includes all the code previously included in THREADED_SCROLLING. > It is a bit confusing that we are not using the actual ScrollingTree but a client, but we still use things related to ScrollingTree. I think we need to rename ScrollingTree to ScrollingTreeThreaded or so to avoid confusion. I agree.
Noam Rosenthal
Comment 20 2012-07-17 15:53:38 PDT
Anders Carlsson
Comment 21 2012-07-17 16:09:45 PDT
I hope to be able to take a look at this tomorrow. However, (without looking at the patch) I think you should try to split it up into smaller pieces. It's over 90K.
Noam Rosenthal
Comment 22 2012-07-17 16:14:05 PDT
Created attachment 152864 [details] Patch 1 - only the WebCore parts Uploading a patch with only the WebCore parts. The other patch can serve as a reference to how this is going to be used.
Build Bot
Comment 23 2012-07-17 17:03:43 PDT
Comment on attachment 152864 [details] Patch 1 - only the WebCore parts Attachment 152864 [details] did not pass mac-ews (mac): Output: http://queues.webkit.org/results/13274295
Build Bot
Comment 24 2012-07-17 17:17:11 PDT
Comment on attachment 152864 [details] Patch 1 - only the WebCore parts Attachment 152864 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/13272298
WebKit Review Bot
Comment 25 2012-07-17 17:18:40 PDT
Comment on attachment 152864 [details] Patch 1 - only the WebCore parts Attachment 152864 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13282293
Gyuyoung Kim
Comment 26 2012-07-17 17:19:42 PDT
Comment on attachment 152864 [details] Patch 1 - only the WebCore parts Attachment 152864 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/13280301
Noam Rosenthal
Comment 27 2012-07-17 17:24:10 PDT
Kenneth Rohde Christiansen
Comment 28 2012-07-17 20:25:56 PDT
Comment on attachment 152881 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152881&action=review Can you get Anders to look at this? > Source/WebCore/WebCore.xcodeproj/project.pbxproj:14421 > - 1AAADDA114DB409F00AF64B3 /* ScrollingTree.cpp */, > - 1AAADDA214DB409F00AF64B3 /* ScrollingTree.h */, > + 1AAADDA114DB409F00AF64B3 /* ThreadedScrollingTree.cpp */, > + 1AAADDA214DB409F00AF64B3 /* ThreadedScrollingTree.h */, something went wrong with identation? > Source/WebCore/page/scrolling/ScrollingTreeNode.h:60 > +#if ENABLE(THREADED_SCROLLING) > + ScrollingTree* scrollingTree() const { return static_cast<ThreadedScrollingTree*>(m_client); } > +#endif maybe a toScrollingTree() would be nicer? So you call toScrollingTree(client())-> instead?
Noam Rosenthal
Comment 29 2012-07-31 15:48:56 PDT
(In reply to comment #28) > (From update of attachment 152881 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=152881&action=review > > Can you get Anders to look at this? andersca: ping :)
Noam Rosenthal
Comment 30 2012-12-15 16:48:57 PST
ScrollingCoordinator has evolved since this patch to where it's not the right way to go.
Note You need to log in before you can comment on or make changes to this bug.