Title: [199313] trunk
Revision
199313
Author
[email protected]
Date
2016-04-11 14:35:39 -0700 (Mon, 11 Apr 2016)

Log Message

fast/loader/opaque-base-url.html crashing during mac and ios debug tests
https://bugs.webkit.org/show_bug.cgi?id=156179
<rdar://problem/25507719>

Reviewed by Ryosuke Niwa.

Source/WebCore:

Navigate to about:blank if the provided src of an iframe/frame cannot be
resolved to a valid URL.

Test: fast/loader/iframe-src-invalid-url.html

* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestFrame):

LayoutTests:

* fast/loader/iframe-src-invalid-url-expected.txt: Added.
* fast/loader/iframe-src-invalid-url.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (199312 => 199313)


--- trunk/LayoutTests/ChangeLog	2016-04-11 21:33:16 UTC (rev 199312)
+++ trunk/LayoutTests/ChangeLog	2016-04-11 21:35:39 UTC (rev 199313)
@@ -1,3 +1,14 @@
+2016-04-11  Jiewen Tan  <[email protected]>
+
+        fast/loader/opaque-base-url.html crashing during mac and ios debug tests
+        https://bugs.webkit.org/show_bug.cgi?id=156179
+        <rdar://problem/25507719>
+
+        Reviewed by Ryosuke Niwa.
+
+        * fast/loader/iframe-src-invalid-url-expected.txt: Added.
+        * fast/loader/iframe-src-invalid-url.html: Added.
+
 2016-04-11  Said Abou-Hallawa  <sabouhallawa@apple,com>
 
         Merge CG ImageSource and non CG ImageSource implementation in one file

Modified: trunk/LayoutTests/TestExpectations (199312 => 199313)


--- trunk/LayoutTests/TestExpectations	2016-04-11 21:33:16 UTC (rev 199312)
+++ trunk/LayoutTests/TestExpectations	2016-04-11 21:35:39 UTC (rev 199313)
@@ -894,8 +894,6 @@
 imported/blink/fast/multicol/outlines-at-column-boundaries.html [ ImageOnlyFailure ]
 fast/multicol/multicol-with-child-renderLayer-for-input.html [ ImageOnlyFailure ]
 
-webkit.org/b/156179 [ Debug ] fast/loader/opaque-base-url.html [ Skip ]
-
 # Assertion failure in MessagePort::contextDestroyed, usually attributed to later tests
 webkit.org/b/94458 http/tests/security/MessagePort/event-listener-context.html [ Skip ]
 

Added: trunk/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt (0 => 199313)


--- trunk/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/loader/iframe-src-invalid-url-expected.txt	2016-04-11 21:35:39 UTC (rev 199313)
@@ -0,0 +1,13 @@
+Test passes if the first child frame prints about:blank.
+
+
+
+--------
+Frame: '<!--framePath //<!--frame0-->-->'
+--------
+about:blank
+
+--------
+Frame: 'iframe'
+--------
+

Added: trunk/LayoutTests/fast/loader/iframe-src-invalid-url.html (0 => 199313)


--- trunk/LayoutTests/fast/loader/iframe-src-invalid-url.html	                        (rev 0)
+++ trunk/LayoutTests/fast/loader/iframe-src-invalid-url.html	2016-04-11 21:35:39 UTC (rev 199313)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script>
+    if (window.testRunner) {
+        testRunner.dumpAsText();
+        testRunner.dumpChildFramesAsText();
+    }
+</script>
+</head>
+<body>
+    <p>Test passes if the first child frame prints about:blank.</p>
+    <iframe src=""
+    <iframe id='iframe' src=''></iframe>
+    <script>document.write(document.getElementById('iframe').contentWindow.location.href);</script>"></iframe>
+</body>
+</html>
\ No newline at end of file

Modified: trunk/Source/WebCore/ChangeLog (199312 => 199313)


--- trunk/Source/WebCore/ChangeLog	2016-04-11 21:33:16 UTC (rev 199312)
+++ trunk/Source/WebCore/ChangeLog	2016-04-11 21:35:39 UTC (rev 199313)
@@ -1,3 +1,19 @@
+2016-04-11  Jiewen Tan  <[email protected]>
+
+        fast/loader/opaque-base-url.html crashing during mac and ios debug tests
+        https://bugs.webkit.org/show_bug.cgi?id=156179
+        <rdar://problem/25507719>
+
+        Reviewed by Ryosuke Niwa.
+
+        Navigate to about:blank if the provided src of an iframe/frame cannot be
+        resolved to a valid URL.
+
+        Test: fast/loader/iframe-src-invalid-url.html
+
+        * loader/SubframeLoader.cpp:
+        (WebCore::SubframeLoader::requestFrame):
+
 2016-04-11  Said Abou-Hallawa  <sabouhallawa@apple,com>
 
         Merge CG ImageSource and non CG ImageSource implementation in one file

Modified: trunk/Source/WebCore/loader/SubframeLoader.cpp (199312 => 199313)


--- trunk/Source/WebCore/loader/SubframeLoader.cpp	2016-04-11 21:33:16 UTC (rev 199312)
+++ trunk/Source/WebCore/loader/SubframeLoader.cpp	2016-04-11 21:35:39 UTC (rev 199313)
@@ -84,6 +84,9 @@
     } else
         url = ""
 
+    if (!url.isValid())
+        url = ""
+
     Frame* frame = loadOrRedirectSubframe(ownerElement, url, frameName, lockHistory, lockBackForwardList);
     if (!frame)
         return false;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to