RESOLVED FIXED Bug 127371
Explore new API that could be used to help build infinitely scrolling websites
https://bugs.webkit.org/show_bug.cgi?id=127371
Summary Explore new API that could be used to help build infinitely scrolling websites
Beth Dakin
Reported 2014-01-21 14:54:23 PST
We want to explore new API that could be used to help build infinitely scrolling websites. <rdar://problem/14935014>
Attachments
Patch (12.12 KB, patch)
2014-01-21 15:50 PST, Beth Dakin
no flags
Patch (12.14 KB, patch)
2014-01-21 16:00 PST, Beth Dakin
no flags
Patch (12.20 KB, patch)
2014-01-21 16:23 PST, Beth Dakin
no flags
Patch (12.34 KB, patch)
2014-01-22 13:57 PST, Beth Dakin
no flags
Patch (22.46 KB, patch)
2014-01-25 20:48 PST, Beth Dakin
no flags
Patch (28.18 KB, patch)
2014-01-27 23:23 PST, Beth Dakin
buildbot: commit-queue-
Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 (563.43 KB, application/zip)
2014-01-28 00:47 PST, Build Bot
no flags
Archive of layout-test-results from webkit-ews-02 for mac-mountainlion (483.51 KB, application/zip)
2014-01-28 01:15 PST, Build Bot
no flags
Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 (503.49 KB, application/zip)
2014-01-28 01:53 PST, Build Bot
no flags
Archive of layout-test-results from webkit-ews-03 for mac-mountainlion (557.96 KB, application/zip)
2014-01-28 03:43 PST, Build Bot
no flags
Patch (28.08 KB, patch)
2014-01-28 15:02 PST, Beth Dakin
sam: review+
Beth Dakin
Comment 1 2014-01-21 15:50:00 PST
Created attachment 221798 [details] Patch Here's a patch we can use as a jumping point for further discussion.
Beth Dakin
Comment 2 2014-01-21 16:00:01 PST
Beth Dakin
Comment 3 2014-01-21 16:23:33 PST
Sam Weinig
Comment 4 2014-01-21 21:41:07 PST
Comment on attachment 221804 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=221804&action=review > Source/WebCore/ChangeLog:11 > + This patch adds 4 new events that will fire when the user has scrolled close to > + corresponding edge of the document. This could use some fleshing out, perhaps listing the new event names. > Source/WebCore/html/HTMLAttributeNames.in:275 > +onwebkitwillrevealbottom > +onwebkitwillrevealleft > +onwebkitwillrevealright > +onwebkitwillrevealtop I'm not sure we need to support these as attributes, but Ted should weigh in. > Source/WebCore/page/FrameView.cpp:2949 > + // For each direction (top, bottom, left and right), send the will reveal edge event for that direction Nit: Top and bottom aren't really directions, maybe, "edge"? > Source/WebCore/page/FrameView.cpp:2964 > + frame().document()->dispatchWindowEvent(willRevealEvent.release(), frame().document()->domWindow()); We should probably fire these asynchronously, which can be done via frame().document()->enqueueWindowEvent(event.release()); We may also want null check document() here.
Beth Dakin
Comment 5 2014-01-22 13:57:33 PST
(In reply to comment #4) > (From update of attachment 221804 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=221804&action=review > > > Source/WebCore/ChangeLog:11 > > + This patch adds 4 new events that will fire when the user has scrolled close to > > + corresponding edge of the document. > > This could use some fleshing out, perhaps listing the new event names. > Sure. I added a little more information. > > Source/WebCore/html/HTMLAttributeNames.in:275 > > +onwebkitwillrevealbottom > > +onwebkitwillrevealleft > > +onwebkitwillrevealright > > +onwebkitwillrevealtop > > I'm not sure we need to support these as attributes, but Ted should weigh in. > Ted and I spoke in person. He thinks we should support them. He thinks that not including them would introduce a confusing inconsistency even though they are kind of silly. > > Source/WebCore/page/FrameView.cpp:2949 > > + // For each direction (top, bottom, left and right), send the will reveal edge event for that direction > > Nit: Top and bottom aren't really directions, maybe, "edge"? > Fixed. > > Source/WebCore/page/FrameView.cpp:2964 > > + frame().document()->dispatchWindowEvent(willRevealEvent.release(), frame().document()->domWindow()); > > We should probably fire these asynchronously, which can be done via frame().document()->enqueueWindowEvent(event.release()); We may also want null check document() here. Fixed. Thanks for the feedback! I will upload a new patch shortly. I was spreading a rumor earlier that this patch has a problem where it doesn't always fire the event if you scroll too fast. Turns out that was a bug in my test app NOT in this implementation.
Beth Dakin
Comment 6 2014-01-22 13:57:54 PST
Beth Dakin
Comment 7 2014-01-22 13:59:07 PST
Names that might be better: webkitwillrevealbottomedge, webkitwillreachbottomsoon, webkitwillreachbottonedgesoon
Beth Dakin
Comment 8 2014-01-25 20:48:31 PST
WebKit Commit Bot
Comment 9 2014-01-25 20:50:56 PST
Attachment 222248 [details] did not pass style-queue: ERROR: Source/WebCore/dom/EventNames.h:123: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/dom/EventNames.h:128: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 20 files If any of these errors are false positives, please file a bug against check-webkit-style.
Beth Dakin
Comment 10 2014-01-27 23:23:35 PST
Created attachment 222408 [details] Patch Here is a patch with a couple more tests, as Sam requested.
WebKit Commit Bot
Comment 11 2014-01-27 23:25:58 PST
Attachment 222408 [details] did not pass style-queue: ERROR: Source/WebCore/dom/EventNames.h:123: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/dom/EventNames.h:128: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 23 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 12 2014-01-28 00:47:43 PST
Comment on attachment 222408 [details] Patch Attachment 222408 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5055793170743296 New failing tests: fast/events/will-reveal-edges-window-attributes.html
Build Bot
Comment 13 2014-01-28 00:47:45 PST
Created attachment 222415 [details] Archive of layout-test-results from webkit-ews-13 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-13 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 14 2014-01-28 01:14:57 PST
Comment on attachment 222408 [details] Patch Attachment 222408 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/6034654066900992 New failing tests: fast/events/will-reveal-edges-window-attributes.html
Build Bot
Comment 15 2014-01-28 01:15:02 PST
Created attachment 222417 [details] Archive of layout-test-results from webkit-ews-02 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-02 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Build Bot
Comment 16 2014-01-28 01:53:16 PST
Comment on attachment 222408 [details] Patch Attachment 222408 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.appspot.com/results/5638829880901632 New failing tests: fast/events/will-reveal-edges-window-attributes.html
Build Bot
Comment 17 2014-01-28 01:53:21 PST
Created attachment 222422 [details] Archive of layout-test-results from webkit-ews-16 for mac-mountainlion-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: webkit-ews-16 Port: mac-mountainlion-wk2 Platform: Mac OS X 10.8.5
Build Bot
Comment 18 2014-01-28 03:43:55 PST
Comment on attachment 222408 [details] Patch Attachment 222408 [details] did not pass mac-ews (mac): Output: http://webkit-queues.appspot.com/results/5101886290001920 New failing tests: fast/events/will-reveal-edges-window-attributes.html
Build Bot
Comment 19 2014-01-28 03:43:59 PST
Created attachment 222428 [details] Archive of layout-test-results from webkit-ews-03 for mac-mountainlion The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: webkit-ews-03 Port: mac-mountainlion Platform: Mac OS X 10.8.5
Beth Dakin
Comment 20 2014-01-28 15:02:55 PST
WebKit Commit Bot
Comment 21 2014-01-28 15:04:39 PST
Attachment 222498 [details] did not pass style-queue: ERROR: Source/WebCore/dom/EventNames.h:123: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] ERROR: Source/WebCore/dom/EventNames.h:128: Weird number of spaces at line-start. Are you using a 4-space indent? [whitespace/indent] [3] Total errors found: 2 in 23 files If any of these errors are false positives, please file a bug against check-webkit-style.
Beth Dakin
Comment 22 2014-01-28 15:52:07 PST
Thanks Sam! I'll wait a day or two to land in case anyone has more feedback. And I filed https://bugs.webkit.org/show_bug.cgi?id=127810 to make this work for overflow:scroll.
Beth Dakin
Comment 23 2014-01-30 11:21:13 PST
Beth Dakin
Comment 24 2014-01-30 11:21:14 PST
Note You need to log in before you can comment on or make changes to this bug.