Diff
Modified: branches/safari-611.1.4-branch/Source/WebCore/ChangeLog (269198 => 269199)
--- branches/safari-611.1.4-branch/Source/WebCore/ChangeLog 2020-10-30 17:42:40 UTC (rev 269198)
+++ branches/safari-611.1.4-branch/Source/WebCore/ChangeLog 2020-10-30 17:42:43 UTC (rev 269199)
@@ -1,5 +1,37 @@
2020-10-29 Alan Coon <[email protected]>
+ Cherry-pick r269160. rdar://problem/70831130
+
+ Unreviewed, reverting r268192.
+
+ PLT regression - rdar://problem/70141350
+
+ Reverted changeset:
+
+ "Adjust heuristic for checking whether view reaches visually
+ non-empty state"
+ https://bugs.webkit.org/show_bug.cgi?id=217400
+ https://trac.webkit.org/changeset/268192
+
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-10-29 Sihui Liu <[email protected]>
+
+ Unreviewed, reverting r268192.
+
+ PLT regression - rdar://problem/70141350
+
+ Reverted changeset:
+
+ "Adjust heuristic for checking whether view reaches visually
+ non-empty state"
+ https://bugs.webkit.org/show_bug.cgi?id=217400
+ https://trac.webkit.org/changeset/268192
+
+2020-10-29 Alan Coon <[email protected]>
+
Cherry-pick r269136. rdar://problem/70831153
REGRESSION(r267329): Crash in VisibleSelection::toNormalizedRange()
Modified: branches/safari-611.1.4-branch/Source/WebCore/page/FrameView.cpp (269198 => 269199)
--- branches/safari-611.1.4-branch/Source/WebCore/page/FrameView.cpp 2020-10-30 17:42:40 UTC (rev 269198)
+++ branches/safari-611.1.4-branch/Source/WebCore/page/FrameView.cpp 2020-10-30 17:42:43 UTC (rev 269199)
@@ -4566,24 +4566,12 @@
return false;
auto& resources = resourceLoader.allCachedResources();
- bool shouldWaitForScriptIfEmpty = false;
-#if ENABLE(INTERSECTION_OBSERVER)
- shouldWaitForScriptIfEmpty = !document.numberOfIntersectionObservers();
-#endif
- bool isLoadingScript = false;
for (auto& resource : resources) {
if (resource.value->isLoaded())
continue;
- auto type = resource.value->type();
- if (type == CachedResource::Type::CSSStyleSheet || type == CachedResource::Type::FontResource)
+ if (resource.value->type() == CachedResource::Type::CSSStyleSheet || resource.value->type() == CachedResource::Type::FontResource)
return true;
- if (type == CachedResource::Type::Script)
- isLoadingScript = true;
}
-
- if (shouldWaitForScriptIfEmpty && !m_visuallyNonEmptyPixelCount && isLoadingScript)
- return true;
-
return false;
};
Modified: branches/safari-611.1.4-branch/Tools/ChangeLog (269198 => 269199)
--- branches/safari-611.1.4-branch/Tools/ChangeLog 2020-10-30 17:42:40 UTC (rev 269198)
+++ branches/safari-611.1.4-branch/Tools/ChangeLog 2020-10-30 17:42:43 UTC (rev 269199)
@@ -1,5 +1,37 @@
2020-10-29 Alan Coon <[email protected]>
+ Cherry-pick r269160. rdar://problem/70831130
+
+ Unreviewed, reverting r268192.
+
+ PLT regression - rdar://problem/70141350
+
+ Reverted changeset:
+
+ "Adjust heuristic for checking whether view reaches visually
+ non-empty state"
+ https://bugs.webkit.org/show_bug.cgi?id=217400
+ https://trac.webkit.org/changeset/268192
+
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@269160 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2020-10-29 Sihui Liu <[email protected]>
+
+ Unreviewed, reverting r268192.
+
+ PLT regression - rdar://problem/70141350
+
+ Reverted changeset:
+
+ "Adjust heuristic for checking whether view reaches visually
+ non-empty state"
+ https://bugs.webkit.org/show_bug.cgi?id=217400
+ https://trac.webkit.org/changeset/268192
+
+2020-10-29 Alan Coon <[email protected]>
+
Cherry-pick r268904. rdar://problem/70831149
Null check platformStrategies when making blob read stream for an NSURLRequest
Modified: branches/safari-611.1.4-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (269198 => 269199)
--- branches/safari-611.1.4-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2020-10-30 17:42:40 UTC (rev 269198)
+++ branches/safari-611.1.4-branch/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2020-10-30 17:42:43 UTC (rev 269199)
@@ -796,7 +796,6 @@
9329AA291DE3F81E003ABD07 /* TextBreakIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9329AA281DE3F81E003ABD07 /* TextBreakIterator.cpp */; };
932AE53D1D371047005DFFAF /* focus-inputs.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93575C551D30366E000D604D /* focus-inputs.html */; };
933D631D1FCB76200032ECD6 /* Hasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933D631B1FCB76180032ECD6 /* Hasher.cpp */; };
- 93494FFE252E66BA0099F171 /* deferred-script-load-in-empty-document.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */; };
935786CC20F6A2700000CDFC /* IndexedDB.sqlite3-wal in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C520F69FED0040DC1B /* IndexedDB.sqlite3-wal */; };
935786CD20F6A2910000CDFC /* IndexedDB.sqlite3 in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C720F69FEE0040DC1B /* IndexedDB.sqlite3 */; };
935786CE20F6A2A10000CDFC /* IndexedDB.sqlite3-shm in Copy Resources */ = {isa = PBXBuildFile; fileRef = 934FA5C620F69FED0040DC1B /* IndexedDB.sqlite3-shm */; };
@@ -1362,7 +1361,6 @@
F486B1D01F67952300F34BDD /* DataTransfer-setDragImage.html in Copy Resources */,
F457A9D6202D68AF00F7E9D5 /* DataTransfer.html in Copy Resources */,
F4512E131F60C44600BB369E /* DataTransferItem-getAsEntry.html in Copy Resources */,
- 93494FFE252E66BA0099F171 /* deferred-script-load-in-empty-document.html in Copy Resources */,
118153442208B7AC00B2CCD2 /* deferred-script-load.html in Copy Resources */,
118153462208B7E500B2CCD2 /* deferred-script.js in Copy Resources */,
C07E6CB213FD73930038B22B /* devicePixelRatio.html in Copy Resources */,
@@ -2391,7 +2389,6 @@
9329AA281DE3F81E003ABD07 /* TextBreakIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TextBreakIterator.cpp; sourceTree = "<group>"; };
9331407B17B4419000F083B1 /* DidNotHandleKeyDown.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DidNotHandleKeyDown.cpp; sourceTree = "<group>"; };
933D631B1FCB76180032ECD6 /* Hasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Hasher.cpp; sourceTree = "<group>"; };
- 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>"; };
934FA5C520F69FED0040DC1B /* IndexedDB.sqlite3-wal */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDB.sqlite3-wal"; sourceTree = "<group>"; };
934FA5C620F69FED0040DC1B /* IndexedDB.sqlite3-shm */ = {isa = PBXFileReference; lastKnownFileType = file; path = "IndexedDB.sqlite3-shm"; sourceTree = "<group>"; };
934FA5C720F69FEE0040DC1B /* IndexedDB.sqlite3 */ = {isa = PBXFileReference; lastKnownFileType = file; path = IndexedDB.sqlite3; sourceTree = "<group>"; };
@@ -4288,7 +4285,6 @@
9B270FED1DDC25FD002D53F3 /* closed-shadow-tree-test.html */,
5C9E56861DF9148E00C9EE33 /* contentBlockerCheck.html */,
290F4274172A1FDE00939FF0 /* custom-protocol-sync-xhr.html */,
- 93494FFD252E65440099F171 /* deferred-script-load-in-empty-document.html */,
118153432208B7AC00B2CCD2 /* deferred-script-load.html */,
118153452208B7E500B2CCD2 /* deferred-script.js */,
A14AAB641E78DC3F00C1ADC2 /* encrypted.pdf */,
Deleted: branches/safari-611.1.4-branch/Tools/TestWebKitAPI/Tests/WebKit/deferred-script-load-in-empty-document.html (269198 => 269199)
--- branches/safari-611.1.4-branch/Tools/TestWebKitAPI/Tests/WebKit/deferred-script-load-in-empty-document.html 2020-10-30 17:42:40 UTC (rev 269198)
+++ branches/safari-611.1.4-branch/Tools/TestWebKitAPI/Tests/WebKit/deferred-script-load-in-empty-document.html 2020-10-30 17:42:43 UTC (rev 269199)
@@ -1 +0,0 @@
-<script defer src=""
Modified: branches/safari-611.1.4-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm (269198 => 269199)
--- branches/safari-611.1.4-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm 2020-10-30 17:42:40 UTC (rev 269198)
+++ branches/safari-611.1.4-branch/Tools/TestWebKitAPI/Tests/WebKitCocoa/FirstVisuallyNonEmptyMilestone.mm 2020-10-30 17:42:43 UTC (rev 269199)
@@ -37,7 +37,6 @@
static bool didFirstVisuallyNonEmptyLayout;
static bool receivedMessage;
-static bool receivedMessageBeforeFirstVisuallyNonEmptyLayout;
@interface FirstPaintMessageHandler : NSObject <WKScriptMessageHandler>
@end
@@ -55,10 +54,8 @@
@implementation RenderingProgressNavigationDelegate
- (void)_webView:(WKWebView *)webView renderingProgressDidChange:(_WKRenderingProgressEvents)progressEvents
{
- if (progressEvents & _WKRenderingProgressEventFirstVisuallyNonEmptyLayout) {
- receivedMessageBeforeFirstVisuallyNonEmptyLayout = receivedMessage;
+ if (progressEvents & _WKRenderingProgressEventFirstVisuallyNonEmptyLayout)
didFirstVisuallyNonEmptyLayout = true;
- }
}
@end
@@ -74,7 +71,6 @@
[webView setNavigationDelegate:delegate.get()];
receivedMessage = false;
- receivedMessageBeforeFirstVisuallyNonEmptyLayout = false;
didFirstVisuallyNonEmptyLayout = false;
[webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"deferred-script-load" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
@@ -81,31 +77,8 @@
TestWebKitAPI::Util::run(&receivedMessage);
EXPECT_TRUE(didFirstVisuallyNonEmptyLayout);
- EXPECT_FALSE(receivedMessageBeforeFirstVisuallyNonEmptyLayout);
}
-TEST(WebKit, FirstVisuallyNonEmptyMilestoneWithDeferredScriptInEmptyDocument)
-{
- auto webViewConfiguration = adoptNS([[WKWebViewConfiguration alloc] init]);
- auto messageHandler = adoptNS([[FirstPaintMessageHandler alloc] init]);
- [[webViewConfiguration userContentController] addScriptMessageHandler:messageHandler.get() name:@"firstpaint"];
-
- auto webView = adoptNS([[WKWebView alloc] initWithFrame:NSMakeRect(0, 0, 800, 600) configuration:webViewConfiguration.get()]);
-
- RetainPtr<RenderingProgressNavigationDelegate> delegate = adoptNS([[RenderingProgressNavigationDelegate alloc] init]);
- [webView setNavigationDelegate:delegate.get()];
-
- receivedMessage = false;
- receivedMessageBeforeFirstVisuallyNonEmptyLayout = false;
- didFirstVisuallyNonEmptyLayout = false;
-
- [webView loadRequest:[NSURLRequest requestWithURL:[[NSBundle mainBundle] URLForResource:@"deferred-script-load-in-empty-document" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]]];
-
- TestWebKitAPI::Util::run(&didFirstVisuallyNonEmptyLayout);
- EXPECT_TRUE(receivedMessage);
- EXPECT_TRUE(receivedMessageBeforeFirstVisuallyNonEmptyLayout);
-}
-
@interface NeverFinishLoadingSchemeHandler : NSObject <WKURLSchemeHandler>
@property (nonatomic, readonly, class) NSString *URLScheme;
@end