Changeset 243453 in webkit
- Timestamp:
- Mar 25, 2019, 1:46:53 PM (7 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
Platform/Logging.h (modified) (1 diff)
-
WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r243449 r243453 1 2019-03-25 Keith Rollin <krollin@apple.com> 2 3 Add WebKit logging for first paint and other interesting layout milestones 4 https://bugs.webkit.org/show_bug.cgi?id=196159 5 <rdar://problem/49128952> 6 7 Reviewed by Simon Fraser. 8 9 Add some logging to indicate what layout milestones have been reached. 10 This should help us determine if there's a client, rendering, layout, 11 or some other issue when page content does not appear in the client 12 window. 13 14 The logging is being added to 15 WebFrameLoaderClient::dispatchDidReachLayoutMilestone. This seems like 16 a nice central place to capture layout milestones. However, it will 17 only log notifications that are being sent to clients. It does not 18 indicate all milestones that have occurred. That is, it does not 19 report milestones that are filtered out due to client disinterest. 20 There doesn't seem to be a good central place to capture all 21 milestones, regardless of client interest. 22 23 * Platform/Logging.h: 24 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: 25 (WebKit::WebFrameLoaderClient::dispatchDidReachLayoutMilestone): 26 1 27 2019-03-25 Patrick Griffis <pgriffis@igalia.com> 2 28 -
trunk/Source/WebKit/Platform/Logging.h
r243328 r243453 56 56 M(KeyHandling) \ 57 57 M(Layers) \ 58 M(Layout) \ 58 59 M(Loading) \ 59 60 M(LocalStorageDatabaseTracker) \ -
trunk/Source/WebKit/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp
r242920 r243453 647 647 648 648 if (milestones & DidFirstLayout) { 649 RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidFirstLayoutForFrame, page = %p", this, webPage); 650 649 651 // FIXME: We should consider removing the old didFirstLayout API since this is doing double duty with the 650 652 // new didLayout API. … … 655 657 // FIXME: Do this on DidFirstVisuallyNonEmptyLayout when Mac Safari is able to handle it (<rdar://problem/17580021>) 656 658 if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) { 659 RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = %p", this, webPage); 657 660 webPage->didCompletePageTransition(); 658 661 m_didCompletePageTransition = true; … … 666 669 } 667 670 671 #if !RELEASE_LOG_DISABLED 672 StringBuilder builder; 673 auto addIfSet = [&milestones, &builder] (WebCore::LayoutMilestone milestone, const String& toAdd) { 674 if (milestones.contains(milestone)) { 675 if (!builder.isEmpty()) 676 builder.append(", "); 677 builder.append(toAdd); 678 } 679 }; 680 681 addIfSet(DidFirstLayout, "DidFirstLayout"_s); 682 addIfSet(DidFirstVisuallyNonEmptyLayout, "DidFirstVisuallyNonEmptyLayout"_s); 683 addIfSet(DidHitRelevantRepaintedObjectsAreaThreshold, "DidHitRelevantRepaintedObjectsAreaThreshold"_s); 684 addIfSet(DidFirstFlushForHeaderLayer, "DidFirstFlushForHeaderLayer"_s); 685 addIfSet(DidFirstLayoutAfterSuppressedIncrementalRendering, "DidFirstLayoutAfterSuppressedIncrementalRendering"_s); 686 addIfSet(DidFirstPaintAfterSuppressedIncrementalRendering, "DidFirstPaintAfterSuppressedIncrementalRendering"_s); 687 addIfSet(ReachedSessionRestorationRenderTreeSizeThreshold, "ReachedSessionRestorationRenderTreeSizeThreshold"_s); 688 addIfSet(DidRenderSignificantAmountOfText, "DidRenderSignificantAmountOfText"_s); 689 addIfSet(DidFirstMeaningfulPaint, "DidFirstMeaningfulPaint"_s); 690 691 RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidReachLayoutMilestone, page = %p, milestones = %{public}s", this, webPage, builder.toString().utf8().data()); 692 #endif 693 668 694 // Send this after DidFirstLayout-specific calls since some clients expect to get those messages first. 669 695 webPage->dispatchDidReachLayoutMilestone(milestones); … … 671 697 if (milestones & DidFirstVisuallyNonEmptyLayout) { 672 698 if (m_frame->isMainFrame() && !m_didCompletePageTransition && !webPage->corePage()->settings().suppressesIncrementalRendering()) { 699 RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching didCompletePageTransition, page = %p", this, webPage); 673 700 webPage->didCompletePageTransition(); 674 701 m_didCompletePageTransition = true; … … 677 704 // FIXME: We should consider removing the old didFirstVisuallyNonEmptyLayoutForFrame API since this is doing 678 705 // double duty with the new didLayout API. 706 RELEASE_LOG(Layout, "%p - WebFrameLoaderClient::dispatchDidReachLayoutMilestone: dispatching DidFirstVisuallyNonEmptyLayoutForFrame, page = %p", this, webPage); 679 707 webPage->injectedBundleLoaderClient().didFirstVisuallyNonEmptyLayoutForFrame(*webPage, *m_frame, userData); 680 708 webPage->send(Messages::WebPageProxy::DidFirstVisuallyNonEmptyLayoutForFrame(m_frame->frameID(), UserData(WebProcess::singleton().transformObjectsToHandles(userData.get()).get())));
Note:
See TracChangeset
for help on using the changeset viewer.