Changeset 240450 in webkit
- Timestamp:
- Jan 24, 2019 2:58:09 PM (5 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240446 r240450 1 2019-01-24 Zalan Bujtas <zalan@apple.com> 2 3 DidFirstVisuallyNonEmptyLayout milestone should always fire at some point. 4 https://bugs.webkit.org/show_bug.cgi?id=193741 5 <rdar://problem/47135030> 6 7 Reviewed by Antti Koivisto and Simon Fraser. 8 9 fireLayoutRelatedMilestonesIfNeeded() is part of the post-layout tasks. In certain cases when 10 1. the received data is not "contentful" yet 11 2. and we are expecting some more (loading is not complete yet) 12 3. but no layout is initiated anymore 13 nothing triggers the milestone firing. 14 15 This patch ensures that we fire the DidFirstVisuallyNonEmptyLayout when the frame load is complete unless we already did. 16 17 * page/FrameView.cpp: 18 (WebCore::FrameView::FrameView): 19 (WebCore::FrameView::loadProgressingStatusChanged): 20 1 21 2019-01-24 Brent Fulgham <bfulgham@apple.com> 2 22 -
trunk/Source/WebCore/page/FrameView.cpp
r240237 r240450 2852 2852 void FrameView::loadProgressingStatusChanged() 2853 2853 { 2854 auto hasPendingVisuallyNonEmptyCallback = m_firstVisuallyNonEmptyLayoutCallbackPending && !m_isVisuallyNonEmpty; 2855 if (hasPendingVisuallyNonEmptyCallback && frame().loader().isComplete()) 2856 fireLayoutRelatedMilestonesIfNeeded(); 2854 2857 updateLayerFlushThrottling(); 2855 2858 adjustTiledBackingCoverage(); … … 5167 5170 } 5168 5171 5169 if (milestonesAchieved && frame().isMainFrame()) 5172 if (milestonesAchieved && frame().isMainFrame()) { 5173 if (milestonesAchieved.contains(DidFirstVisuallyNonEmptyLayout)) 5174 RELEASE_LOG_IF_ALLOWED("fireLayoutRelatedMilestonesIfNeeded() - firing first visually non-empty layout milestone on the main frame"); 5170 5175 frame().loader().didReachLayoutMilestone(milestonesAchieved); 5176 } 5171 5177 } 5172 5178 -
trunk/Tools/ChangeLog
r240446 r240450 1 2019-01-24 Zalan Bujtas <zalan@apple.com> 2 3 DidFirstVisuallyNonEmptyLayout milestone should always fire at some point. 4 https://bugs.webkit.org/show_bug.cgi?id=193741 5 <rdar://problem/47135030> 6 7 Reviewed by Antti Koivisto and Simon Fraser. 8 9 * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: 10 * TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp: 11 (TestWebKitAPI::TEST): 12 1 13 2019-01-24 Brent Fulgham <bfulgham@apple.com> 2 14 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r240437 r240450 52 52 1171B24F219F49CD00CB897D /* FirstMeaningfulPaintMilestone_Bundle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */; }; 53 53 11B7FD28219F47110069B27F /* FirstMeaningfulPaintMilestone.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */; }; 54 11C2598D21FA6324004C9E23 /* async-script-load.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 11C2598C21FA618D004C9E23 /* async-script-load.html */; }; 54 55 143DDE9820C9018B007F76FA /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 574F55D0204D471C002948C6 /* Security.framework */; }; 55 56 1A02C870125D4CFD00E3F4BD /* find.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 1A02C84B125D4A5E00E3F4BD /* find.html */; }; … … 1004 1005 5C9E59431D3EB5AC00E3C62E /* ApplicationCache.db-wal in Copy Resources */, 1005 1006 F6B7BE9717469B96008A3445 /* associate-form-controls.html in Copy Resources */, 1007 11C2598D21FA6324004C9E23 /* async-script-load.html in Copy Resources */, 1006 1008 F4856CA31E649EA8009D7EE7 /* attachment-element.html in Copy Resources */, 1007 1009 B55F11B71517D03300915916 /* attributedStringCustomFont.html in Copy Resources */, … … 1328 1330 11B7FD21219F46DD0069B27F /* FirstMeaningfulPaintMilestone_Bundle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FirstMeaningfulPaintMilestone_Bundle.cpp; sourceTree = "<group>"; }; 1329 1331 11B7FD22219F46DD0069B27F /* FirstMeaningfulPaintMilestone.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FirstMeaningfulPaintMilestone.cpp; sourceTree = "<group>"; }; 1332 11C2598C21FA618D004C9E23 /* async-script-load.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "async-script-load.html"; sourceTree = "<group>"; }; 1330 1333 14464012167A8305000BD218 /* LayoutUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LayoutUnit.cpp; sourceTree = "<group>"; }; 1331 1334 14F3B11215E45EAB00210069 /* SaturatedArithmeticOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SaturatedArithmeticOperations.cpp; sourceTree = "<group>"; }; … … 3273 3276 93D3D19B17B1A7B000C7C415 /* all-content-in-one-iframe.html */, 3274 3277 F6B7BE9617469B7E008A3445 /* associate-form-controls.html */, 3278 11C2598C21FA618D004C9E23 /* async-script-load.html */, 3275 3279 C9C9A91A21DED24D00FDE96E /* audio-with-play-button.html */, 3276 3280 76E182DE15475A8300F1FADD /* auto-submitting-form.html */, -
trunk/Tools/TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp
r239631 r240450 118 118 } 119 119 120 TEST(WebKit, FirstVisuallyNonEmptyMilestoneWithLoadComplete) 121 { 122 WKRetainPtr<WKContextRef> context(AdoptWK, WKContextCreateWithConfiguration(nullptr)); 123 PlatformWebView webView(context.get()); 124 125 WKPageNavigationClientV3 loaderClient; 126 memset(&loaderClient, 0, sizeof(loaderClient)); 127 128 loaderClient.base.version = 3; 129 loaderClient.base.clientInfo = &webView; 130 loaderClient.renderingProgressDidChange = renderingProgressDidChange; 131 132 WKPageSetPageNavigationClient(webView.page(), &loaderClient.base); 133 didFirstVisuallyNonEmptyLayout = false; 134 135 WKPageListenForLayoutMilestones(webView.page(), WKPageRenderingProgressEventFirstVisuallyNonEmptyLayout); 136 WKPageLoadURL(webView.page(), adoptWK(Util::createURLForResource("async-script-load", "html")).get()); 137 138 Util::run(&didFirstVisuallyNonEmptyLayout); 139 EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); 140 } 141 120 142 } // namespace TestWebKitAPI 121 143
Note: See TracChangeset
for help on using the changeset viewer.