Changeset 269160 in webkit
- Timestamp:
- Oct 29, 2020, 12:15:49 PM (6 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 5 edited
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (1 diff)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (modified) (4 diffs)
-
Tools/TestWebKitAPI/Tests/WebKit/deferred-script-load-in-empty-document.html (deleted)
-
Tools/TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r269159 r269160 1 2020-10-29 Sihui Liu <sihui_liu@apple.com> 2 3 Unreviewed, reverting r268192. 4 5 PLT regression - rdar://problem/70141350 6 7 Reverted changeset: 8 9 "Adjust heuristic for checking whether view reaches visually 10 non-empty state" 11 https://bugs.webkit.org/show_bug.cgi?id=217400 12 https://trac.webkit.org/changeset/268192 13 1 14 2020-10-29 Said Abou-Hallawa <said@apple.com> 2 15 -
trunk/Source/WebCore/page/FrameView.cpp
r269144 r269160 4567 4567 4568 4568 auto& resources = resourceLoader.allCachedResources(); 4569 bool shouldWaitForScriptIfEmpty = false;4570 #if ENABLE(INTERSECTION_OBSERVER)4571 shouldWaitForScriptIfEmpty = !document.numberOfIntersectionObservers();4572 #endif4573 bool isLoadingScript = false;4574 4569 for (auto& resource : resources) { 4575 4570 if (resource.value->isLoaded()) 4576 4571 continue; 4577 auto type = resource.value->type(); 4578 if (type == CachedResource::Type::CSSStyleSheet || type == CachedResource::Type::FontResource) 4572 if (resource.value->type() == CachedResource::Type::CSSStyleSheet || resource.value->type() == CachedResource::Type::FontResource) 4579 4573 return true; 4580 if (type == CachedResource::Type::Script)4581 isLoadingScript = true;4582 4574 } 4583 4584 if (shouldWaitForScriptIfEmpty && !m_visuallyNonEmptyPixelCount && isLoadingScript)4585 return true;4586 4587 4575 return false; 4588 4576 }; -
trunk/Tools/ChangeLog
r269157 r269160 1 2020-10-29 Sihui Liu <sihui_liu@apple.com> 2 3 Unreviewed, reverting r268192. 4 5 PLT regression - rdar://problem/70141350 6 7 Reverted changeset: 8 9 "Adjust heuristic for checking whether view reaches visually 10 non-empty state" 11 https://bugs.webkit.org/show_bug.cgi?id=217400 12 https://trac.webkit.org/changeset/268192 13 1 14 2020-10-29 Sam Weinig <weinig@apple.com> 2 15 -
trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
r268878 r269160 797 797 932AE53D1D371047005DFFAF /* focus-inputs.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93575C551D30366E000D604D /* focus-inputs.html */; }; 798 798 933D631D1FCB76200032ECD6 /* Hasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933D631B1FCB76180032ECD6 /* Hasher.cpp */; }; 799 93494FFE252E66BA0099F171 /* deferred-script-load-in-empty-document.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */; };800 799 935786CC20F6A2700000CDFC /* IndexedDB.sqlite3-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C520F69FED0040DC1B /* IndexedDB.sqlite3-wal */; }; 801 800 935786CD20F6A2910000CDFC /* IndexedDB.sqlite3 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C720F69FEE0040DC1B /* IndexedDB.sqlite3 */; }; … … 1363 1362 F457A9D6202D68AF00F7E9D5 /* DataTransfer.html in Copy Resources */, 1364 1363 F4512E131F60C44600BB369E /* DataTransferItem-getAsEntry.html in Copy Resources */, 1365 93494FFE252E66BA0099F171 /* deferred-script-load-in-empty-document.html in Copy Resources */,1366 1364 118153442208B7AC00B2CCD2 /* deferred-script-load.html in Copy Resources */, 1367 1365 118153462208B7E500B2CCD2 /* deferred-script.js in Copy Resources */, … … 2392 2390 9331407B17B4419000F083B1 /* DidNotHandleKeyDown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidNotHandleKeyDown.cpp; sourceTree = "<group>"; }; 2393 2391 933D631B1FCB76180032ECD6 /* Hasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Hasher.cpp; sourceTree = "<group>"; }; 2394 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = "deferred-script-load-in-empty-document.html"; sourceTree = "<group>"; };2395 2392 934FA5C520F69FED0040DC1B /* IndexedDB.sqlite3-wal */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDB.sqlite3-wal"; sourceTree = "<group>"; }; 2396 2393 934FA5C620F69FED0040DC1B /* IndexedDB.sqlite3-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDB.sqlite3-shm"; sourceTree = "<group>"; }; … … 4289 4286 5C9E56861DF9148E00C9EE33 /* contentBlockerCheck.html */, 4290 4287 290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */, 4291 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */,4292 4288 118153432208B7AC00B2CCD2 /* deferred-script-load.html */, 4293 4289 118153452208B7E500B2CCD2 /* deferred-script.js */, -
trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm
r268192 r269160 38 38 static bool didFirstVisuallyNonEmptyLayout; 39 39 static bool receivedMessage; 40 static bool receivedMessageBeforeFirstVisuallyNonEmptyLayout;41 40 42 41 @interface FirstPaintMessageHandler : NSObject <WKScriptMessageHandler> … … 56 55 - (void)_webView:(WKWebView *)webView renderingProgressDidChange:(_WKRenderingProgressEvents)progressEvents 57 56 { 58 if (progressEvents & _WKRenderingProgressEventFirstVisuallyNonEmptyLayout) { 59 receivedMessageBeforeFirstVisuallyNonEmptyLayout = receivedMessage; 57 if (progressEvents & _WKRenderingProgressEventFirstVisuallyNonEmptyLayout) 60 58 didFirstVisuallyNonEmptyLayout = true; 61 }62 59 } 63 60 @end … … 75 72 76 73 receivedMessage = false; 77 receivedMessageBeforeFirstVisuallyNonEmptyLayout = false;78 74 didFirstVisuallyNonEmptyLayout = false; 79 75 … … 82 78 TestWebKitAPI::Util::run(&receivedMessage); 83 79 EXPECT_TRUE(didFirstVisuallyNonEmptyLayout); 84 EXPECT_FALSE(receivedMessageBeforeFirstVisuallyNonEmptyLayout);85 }86 87 TEST(WebKit, FirstVisuallyNonEmptyMilestoneWithDeferredScriptInEmptyDocument)88 {89 auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);90 auto messageHandler = adoptNS([[FirstPaintMessageHandler alloc] init]);91 [[webViewConfiguration userContentController] addScriptMessageHandler:messageHandler.get() name:@"firstpaint"];92 93 auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]);94 95 RetainPtr<RenderingProgressNavigationDelegate> delegate = adoptNS([[RenderingProgressNavigationDelegate alloc] init]);96 [webView setNavigationDelegate:delegate.get()];97 98 receivedMessage = false;99 receivedMessageBeforeFirstVisuallyNonEmptyLayout = false;100 didFirstVisuallyNonEmptyLayout = false;101 102 [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"deferred-script-load-in-empty-document" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];103 104 TestWebKitAPI::Util::run(&didFirstVisuallyNonEmptyLayout);105 EXPECT_TRUE(receivedMessage);106 EXPECT_TRUE(receivedMessageBeforeFirstVisuallyNonEmptyLayout);107 80 } 108 81
Note:
See TracChangeset
for help on using the changeset viewer.