Diff
Modified: branches/safari-602.1.32.5-branch/LayoutTests/ChangeLog (201351 => 201352)
--- branches/safari-602.1.32.5-branch/LayoutTests/ChangeLog 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/LayoutTests/ChangeLog 2016-05-24 21:30:11 UTC (rev 201352)
@@ -1,3 +1,24 @@
+2016-05-24 Babak Shafiei <[email protected]>
+
+ Merge r200799. rdar://problem/25931513
+
+ 2016-05-12 Jiewen Tan <[email protected]>
+
+ REGRESSION (r199313): ICBC app: text field In the webview is not tappable
+ https://bugs.webkit.org/show_bug.cgi?id=157396
+ <rdar://problem/25931513>
+
+ Reviewed by David Kilzer.
+
+ The previous test is actually bogus, and therefore modify it to do the
+ real task.
+
+ * fast/loader/iframe-src-invalid-url-expected.txt:
+ * fast/loader/iframe-src-invalid-url.html:
+ * platform/ios-simulator-wk1/TestExpectations:
+ * platform/mac-wk1/TestExpectations:
+ * platform/win/TestExpectations:
+
2016-05-20 Babak Shafiei <[email protected]>
Merge r201227. rdar://problem/24577706
Modified: branches/safari-602.1.32.5-branch/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt (201351 => 201352)
--- branches/safari-602.1.32.5-branch/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt 2016-05-24 21:30:11 UTC (rev 201352)
@@ -1,13 +1,7 @@
-Test passes if the first child frame prints about:blank.
+ - decidePolicyForNavigationAction
+<NSURLRequest URL data:text/html, <iframe id='iframe' src=''></iframe>, main document URL iframe-src-invalid-url.html, http method GET> is main frame - no should open URLs externally - no
+ - decidePolicyForNavigationAction
+<NSURLRequest URL about:blank, main document URL iframe-src-invalid-url.html, http method GET> is main frame - no should open URLs externally - no
+Test passes if the second iframe navigates to about:blank.
-
---------
-Frame: '<!--framePath //<!--frame0-->-->'
---------
-about:blank
-
---------
-Frame: 'iframe'
---------
-
Modified: branches/safari-602.1.32.5-branch/LayoutTests/fast/loader/iframe-src-invalid-url.html (201351 => 201352)
--- branches/safari-602.1.32.5-branch/LayoutTests/fast/loader/iframe-src-invalid-url.html 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/LayoutTests/fast/loader/iframe-src-invalid-url.html 2016-05-24 21:30:11 UTC (rev 201352)
@@ -4,14 +4,13 @@
<script>
if (window.testRunner) {
testRunner.dumpAsText();
- testRunner.dumpChildFramesAsText();
+ testRunner.dumpPolicyDelegateCallbacks();
}
</script>
</head>
<body>
- <p>Test passes if the first child frame prints about:blank.</p>
+ <p>Test passes if the second iframe navigates to about:blank.</p>
<iframe src=""
- <iframe id='iframe' src=''></iframe>
- <script>document.write(document.getElementById('iframe').contentWindow.location.href);</script>"></iframe>
+ <iframe id='iframe' src=''></iframe>"></iframe>
</body>
</html>
\ No newline at end of file
Modified: branches/safari-602.1.32.5-branch/LayoutTests/platform/ios-simulator-wk1/TestExpectations (201351 => 201352)
--- branches/safari-602.1.32.5-branch/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/LayoutTests/platform/ios-simulator-wk1/TestExpectations 2016-05-24 21:30:11 UTC (rev 201352)
@@ -1366,3 +1366,6 @@
# This test relies on a settings option that we can only set with WKRT.
js/dom/regress-157246.html
+
+# dumpPolicyDelegateCallbacks is not supported in DumpRenderTree
+fast/loader/iframe-src-invalid-url.html [ Skip ]
\ No newline at end of file
Modified: branches/safari-602.1.32.5-branch/LayoutTests/platform/mac-wk1/TestExpectations (201351 => 201352)
--- branches/safari-602.1.32.5-branch/LayoutTests/platform/mac-wk1/TestExpectations 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/LayoutTests/platform/mac-wk1/TestExpectations 2016-05-24 21:30:11 UTC (rev 201352)
@@ -216,3 +216,6 @@
# This test relies on a settings option that we can only set with WKRT.
js/dom/regress-157246.html
+
+# dumpPolicyDelegateCallbacks is not supported in DumpRenderTree
+fast/loader/iframe-src-invalid-url.html [ Skip ]
Modified: branches/safari-602.1.32.5-branch/LayoutTests/platform/win/TestExpectations (201351 => 201352)
--- branches/safari-602.1.32.5-branch/LayoutTests/platform/win/TestExpectations 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/LayoutTests/platform/win/TestExpectations 2016-05-24 21:30:11 UTC (rev 201352)
@@ -3387,3 +3387,6 @@
# This test relies on iOS-specific font fallback.
fast/text/arabic-blacklisted-expected.html [ Pass ImageOnlyFailure ]
+
+# dumpPolicyDelegateCallbacks is not supported in DumpRenderTree
+fast/loader/iframe-src-invalid-url.html [ Skip ]
Modified: branches/safari-602.1.32.5-branch/Source/WebCore/ChangeLog (201351 => 201352)
--- branches/safari-602.1.32.5-branch/Source/WebCore/ChangeLog 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/Source/WebCore/ChangeLog 2016-05-24 21:30:11 UTC (rev 201352)
@@ -1,3 +1,28 @@
+2016-05-24 Babak Shafiei <[email protected]>
+
+ Merge r200799. rdar://problem/25931513
+
+ 2016-05-12 Jiewen Tan <[email protected]>
+
+ REGRESSION (r199313): ICBC app: text field In the webview is not tappable
+ https://bugs.webkit.org/show_bug.cgi?id=157396
+ <rdar://problem/25931513>
+
+ Reviewed by David Kilzer.
+
+ Add a quirk for WebKit1 apps.
+
+ * loader/SubframeLoader.cpp:
+ (WebCore::SubframeLoader::requestFrame):
+ Even though the HTML spec suggests that we should navigate to about:blank
+ for subframes/iframes, of which the src cannot be resolved to an valid URL,
+ many existing WebKit1 apps are relying on invalid URLs to bridge their WebView
+ codes and their native Objective-C codes. Therefore, a quirk is added to
+ escape the URL validation for existing WebKit1 apps.
+ (WebCore::SubframeLoader::shouldConvertInvalidURLsToBlank):
+ * loader/SubframeLoader.h:
+ * page/Settings.in:
+
2016-05-22 Babak Shafiei <[email protected]>
Merge r201241. rdar://problem/26396532
Modified: branches/safari-602.1.32.5-branch/Source/WebCore/loader/SubframeLoader.cpp (201351 => 201352)
--- branches/safari-602.1.32.5-branch/Source/WebCore/loader/SubframeLoader.cpp 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/Source/WebCore/loader/SubframeLoader.cpp 2016-05-24 21:30:11 UTC (rev 201352)
@@ -84,7 +84,7 @@
} else
url = ""
- if (!url.isValid())
+ if (shouldConvertInvalidURLsToBlank() && !url.isValid())
url = ""
Frame* frame = loadOrRedirectSubframe(ownerElement, url, frameName, lockHistory, lockBackForwardList);
@@ -450,4 +450,11 @@
return m_frame.document()->completeURL(url);
}
+bool SubframeLoader::shouldConvertInvalidURLsToBlank() const
+{
+ if (Settings* settings = document() ? document()->settings() : nullptr)
+ return settings->shouldConvertInvalidURLsToBlank();
+ return true;
+}
+
} // namespace WebCore
Modified: branches/safari-602.1.32.5-branch/Source/WebCore/loader/SubframeLoader.h (201351 => 201352)
--- branches/safari-602.1.32.5-branch/Source/WebCore/loader/SubframeLoader.h 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/Source/WebCore/loader/SubframeLoader.h 2016-05-24 21:30:11 UTC (rev 201352)
@@ -84,6 +84,8 @@
Document* document() const;
+ bool shouldConvertInvalidURLsToBlank() const;
+
bool m_containsPlugins;
Frame& m_frame;
Modified: branches/safari-602.1.32.5-branch/Source/WebCore/page/Settings.in (201351 => 201352)
--- branches/safari-602.1.32.5-branch/Source/WebCore/page/Settings.in 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/Source/WebCore/page/Settings.in 2016-05-24 21:30:11 UTC (rev 201352)
@@ -266,3 +266,4 @@
selectionPaintingWithoutSelectionGapsEnabled initial=false
+shouldConvertInvalidURLsToBlank initial=true
Modified: branches/safari-602.1.32.5-branch/Source/WebKit/mac/ChangeLog (201351 => 201352)
--- branches/safari-602.1.32.5-branch/Source/WebKit/mac/ChangeLog 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/Source/WebKit/mac/ChangeLog 2016-05-24 21:30:11 UTC (rev 201352)
@@ -1,3 +1,21 @@
+2016-05-24 Babak Shafiei <[email protected]>
+
+ Merge r200799. rdar://problem/25931513
+
+ 2016-05-12 Jiewen Tan <[email protected]>
+
+ REGRESSION (r199313): ICBC app: text field In the webview is not tappable
+ https://bugs.webkit.org/show_bug.cgi?id=157396
+ <rdar://problem/25931513>
+
+ Reviewed by David Kilzer.
+
+ Add a quirk for WebKit1 apps.
+
+ * WebView/WebView.mm:
+ (shouldConvertInvalidURLsToBlank):
+ (-[WebView _preferencesChanged:]):
+
2016-05-20 Babak Shafiei <[email protected]>
Merge r201227. rdar://problem/24577706
Modified: branches/safari-602.1.32.5-branch/Source/WebKit/mac/WebView/WebView.mm (201351 => 201352)
--- branches/safari-602.1.32.5-branch/Source/WebKit/mac/WebView/WebView.mm 2016-05-24 21:12:33 UTC (rev 201351)
+++ branches/safari-602.1.32.5-branch/Source/WebKit/mac/WebView/WebView.mm 2016-05-24 21:30:11 UTC (rev 201352)
@@ -877,6 +877,19 @@
#endif
}
+static bool shouldConvertInvalidURLsToBlank()
+{
+#if PLATFORM(IOS)
+ static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= 0x000A0000;
+#elif PLATFORM(MAC)
+ static bool shouldConvertInvalidURLsToBlank = dyld_get_program_sdk_version() >= 0x000A0C00;
+#else
+ static bool shouldConvertInvalidURLsToBlank = true;
+#endif
+
+ return shouldConvertInvalidURLsToBlank;
+}
+
#if ENABLE(GAMEPAD)
static void WebKitInitializeGamepadProviderIfNecessary()
{
@@ -2528,6 +2541,8 @@
#endif
settings.setAllowContentSecurityPolicySourceStarToMatchAnyProtocol(shouldAllowContentSecurityPolicySourceStarToMatchAnyProtocol());
+
+ settings.setShouldConvertInvalidURLsToBlank(shouldConvertInvalidURLsToBlank());
}
static inline IMP getMethod(id o, SEL s)