RESOLVED FIXED 95397
Need to merge didFirstVisuallyNonEmptyLayout and didNewFirstVisuallyNonEmptyLayout
https://bugs.webkit.org/show_bug.cgi?id=95397
Summary Need to merge didFirstVisuallyNonEmptyLayout and didNewFirstVisuallyNonEmptyL...
Beth Dakin
Reported 2012-08-29 16:24:56 PDT
The name didNewFirstVisuallyNonEmptyLayout is an abomination. We should merge didFirstLayout, didFirstVisuallyNonEmptyLayout, and didNewFirstVisuallyNonEmptyLayout. They will all be part of the same callback api, but there will be an enum representing the three stages of these states. The callback will fire three times -- once for each state. <rdar://problem/10791680>
Attachments
Patch (53.34 KB, patch)
2012-08-29 17:32 PDT, Beth Dakin
webkit-ews: commit-queue-
Patch, trying to fix QT build (53.96 KB, patch)
2012-08-29 18:07 PDT, Beth Dakin
gyuyoung.kim: commit-queue-
Patch, with more build fixing (54.97 KB, patch)
2012-08-30 12:08 PDT, Beth Dakin
gyuyoung.kim: commit-queue-
Patch for EFL (54.97 KB, patch)
2012-08-30 14:54 PDT, Beth Dakin
no flags
Patch with different design (119.92 KB, patch)
2012-09-04 22:31 PDT, Beth Dakin
webkit.review.bot: commit-queue-
Patch (118.90 KB, patch)
2012-09-05 12:47 PDT, Beth Dakin
buildbot: commit-queue-
Patch (118.90 KB, patch)
2012-09-05 13:34 PDT, Beth Dakin
sam: review+
Beth Dakin
Comment 1 2012-08-29 17:32:04 PDT
Created attachment 161368 [details] Patch The API that I added has a sort of silly name: didUnlockLayoutAchievement. I do have some less-silly ideas for alternatives, such as: didReachLayoutMilestone didCompleteLayoutPhase didAchieveLayoutState I thought we could have a discussion now during review about the best name. I plan to remove the old API in a follow-up patch.
Adam Barth
Comment 2 2012-08-29 17:52:05 PDT
didUnlockLayoutAchievement is cute. Perhaps didChangeLayoutState to be analogous with document.readyState ?
Early Warning System Bot
Comment 3 2012-08-29 18:01:52 PDT
Beth Dakin
Comment 4 2012-08-29 18:07:16 PDT
Created attachment 161375 [details] Patch, trying to fix QT build
Beth Dakin
Comment 5 2012-08-29 18:59:14 PDT
(In reply to comment #2) > didUnlockLayoutAchievement is cute. Perhaps didChangeLayoutState to be analogous with document.readyState ? That's a good option too!
Gyuyoung Kim
Comment 6 2012-08-29 19:46:14 PDT
Comment on attachment 161375 [details] Patch, trying to fix QT build Attachment 161375 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/13686470
Beth Dakin
Comment 7 2012-08-30 12:08:05 PDT
Created attachment 161527 [details] Patch, with more build fixing
Gyuyoung Kim
Comment 8 2012-08-30 13:19:11 PDT
Comment on attachment 161527 [details] Patch, with more build fixing Attachment 161527 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/13682834
Beth Dakin
Comment 9 2012-08-30 14:54:38 PDT
Created attachment 161565 [details] Patch for EFL
Beth Dakin
Comment 10 2012-09-04 22:31:01 PDT
Created attachment 162159 [details] Patch with different design I talked more with Dan and Sam, and we decided to go with an API with a slightly different design. In this design, didFirstLayout, didFirstVisuallyNonEmptyLayout, and didNewFirstVisuallyNonEmptyLayout are even more merged than before, and clients need to opt into which layout milestones they are interested in hearing about.
WebKit Review Bot
Comment 11 2012-09-04 22:33:41 PDT
Attachment 162159 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebKit2/WebProcess/WebPage/WebPage.cpp:411: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebKit/mac/WebView/WebViewInternal.h:69: The parameter name "options" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebKit/mac/WebView/WebViewInternal.h:70: The parameter name "options" adds no information, so it should be removed. [readability/parameter_name] [5] Source/WebKit2/UIProcess/WebPageProxy.cpp:296: Tests for true/false, null/non-null, and zero/non-zero should all be done without equality comparisons. [readability/comparison_to_zero] [5] Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:32: Alphabetical sorting problem. [build/include_order] [4] Source/WebCore/loader/FrameLoaderClient.h:33: Alphabetical sorting problem. [build/include_order] [4] Total errors found: 6 in 87 files If any of these errors are false positives, please file a bug against check-webkit-style.
WebKit Review Bot
Comment 12 2012-09-04 22:48:39 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/13757461
Early Warning System Bot
Comment 13 2012-09-04 22:48:59 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/13761396
Early Warning System Bot
Comment 14 2012-09-04 22:49:46 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/13753658
Build Bot
Comment 15 2012-09-04 22:58:34 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass win-ews (win): Output: http://queues.webkit.org/results/13761398
Peter Beverloo (cr-android ews)
Comment 16 2012-09-04 23:04:08 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass cr-android-ews (chromium-android): Output: http://queues.webkit.org/results/13743768
Sam Weinig
Comment 17 2012-09-04 23:30:05 PDT
Comment on attachment 162159 [details] Patch with different design View in context: https://bugs.webkit.org/attachment.cgi?id=162159&action=review Lovin' it! > Source/WebCore/page/LayoutMilestoneOptions.h:37 > +typedef unsigned LayoutMilestoneOptions; I am not sure the word Options adds anything here. > Source/WebKit2/UIProcess/API/C/WKPage.h:122 > WKPageDidNewFirstVisuallyNonEmptyLayoutCallback didNewFirstVisuallyNonEmptyLayout; > + WKPageDidLayoutCallback didLayout; This new function needs to be added at the bottom of the struct. > Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:259 > +void InjectedBundlePageLoaderClient::didLayout(WebPage* page, LayoutMilestoneOptions options, WTF::RefPtr<APIObject>& userData) The WTF:: should not be necessary here. > Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:86 > + void didLayout(WebPage*, WebCore::LayoutMilestoneOptions, WTF::RefPtr<APIObject>& userData); The WTF:: should not be needed here. > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h:143 > + WKBundlePageDidLayoutCallback didLayout; Function needs to be at the bottom of the struct. > Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:-62 > -// FIXME: This is temporary. Ultimately WebKit should choose the threshold itself. > -WK_EXPORT void WKBundlePageSetPaintedObjectsCounterThreshold(WKBundlePageRef page, uint64_t threshold); Were sure this has no callers?
Gyuyoung Kim
Comment 18 2012-09-04 23:35:24 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/13754680
Gyuyoung Kim
Comment 19 2012-09-04 23:52:39 PDT
Comment on attachment 162159 [details] Patch with different design Attachment 162159 [details] did not pass efl-ews (efl): Output: http://queues.webkit.org/results/13742785
Beth Dakin
Comment 20 2012-09-05 12:47:15 PDT
Created attachment 162307 [details] Patch Thanks, Sam! Here is a patch that addresses all of your comments and attempts to get the other ports building.
WebKit Review Bot
Comment 21 2012-09-05 12:52:35 PDT
Attachment 162307 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/page/Page.h:319: The parameter name "milestones" adds no information, so it should be removed. [readability/parameter_name] [5] Total errors found: 1 in 87 files If any of these errors are false positives, please file a bug against check-webkit-style.
Build Bot
Comment 22 2012-09-05 13:22:01 PDT
Beth Dakin
Comment 23 2012-09-05 13:34:15 PDT
Created attachment 162319 [details] Patch More build fixing.
Beth Dakin
Comment 24 2012-09-25 13:01:29 PDT
Beth Dakin
Comment 25 2012-09-25 16:08:44 PDT
This change caused a layout test to fail. I filed https://bugs.webkit.org/show_bug.cgi?id=97615 and committed a fix: http://trac.webkit.org/changeset/129569
Adam Roben (:aroben)
Comment 26 2012-11-21 12:34:06 PST
This seems to have caused bug 102970.
Note You need to log in before you can comment on or make changes to this bug.