Title: [202193] branches/safari-601-branch
- Revision
- 202193
- Author
- [email protected]
- Date
- 2016-06-17 18:09:09 -0700 (Fri, 17 Jun 2016)
Log Message
Merged r202174. rdar://problem/26701322
Modified Paths
Added Paths
Diff
Modified: branches/safari-601-branch/LayoutTests/ChangeLog (202192 => 202193)
--- branches/safari-601-branch/LayoutTests/ChangeLog 2016-06-18 01:06:45 UTC (rev 202192)
+++ branches/safari-601-branch/LayoutTests/ChangeLog 2016-06-18 01:09:09 UTC (rev 202193)
@@ -1,5 +1,19 @@
2016-06-17 Babak Shafiei <[email protected]>
+ Merge r202174.
+
+ 2016-06-17 John Wilander <[email protected]>
+
+ Ignore case in the check for security origin inheritance
+ https://bugs.webkit.org/show_bug.cgi?id=158878
+
+ Reviewed by Alex Christensen.
+
+ * http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt: Added.
+ * http/tests/dom/window-open-about-uppercase-blank-and-access-document.html: Added.
+
+2016-06-17 Babak Shafiei <[email protected]>
+
Merge r202151.
2016-06-16 John Wilander <[email protected]>
Copied: branches/safari-601-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt (from rev 202191, branches/safari-601.1.46-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt) (0 => 202193)
--- branches/safari-601-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document-expected.txt 2016-06-18 01:09:09 UTC (rev 202193)
@@ -0,0 +1,3 @@
+CONSOLE MESSAGE: line 1: Injected script running.
+PASS newWindow.document is defined.
+
Copied: branches/safari-601-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document.html (from rev 202191, branches/safari-601.1.46-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document.html) (0 => 202193)
--- branches/safari-601-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document.html (rev 0)
+++ branches/safari-601-branch/LayoutTests/http/tests/dom/window-open-about-uppercase-blank-and-access-document.html 2016-06-18 01:09:09 UTC (rev 202193)
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="UTF-8">
+ <title>Tests opening a new about:blank window and accessing its document</title>
+ <script src=""
+ <script>
+ var newWindow;
+
+ if (window.testRunner) {
+ testRunner.setCanOpenWindows();
+ testRunner.waitUntilDone();
+ testRunner.setPopupBlockingEnabled(false);
+ }
+
+ function checkNewWindowDocumentIsDefined () {
+ shouldBeDefined("newWindow.document");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+
+ function run() {
+ newWindow = window.open("about:BLANK");
+ try {
+ newWindow.document.write("<scri" + "pt>console.log('Injected script running.')</sc" + "ript>");
+ setTimeout(checkNewWindowDocumentIsDefined, 500);
+ } catch (e) {
+ testFailed("Was not able to write to the new window's document.");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ }
+ </script>
+</head>
+<body _onload_="run()">
+<div id="console"></div>
+</body>
+</html>
\ No newline at end of file
Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (202192 => 202193)
--- branches/safari-601-branch/Source/WebCore/ChangeLog 2016-06-18 01:06:45 UTC (rev 202192)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog 2016-06-18 01:09:09 UTC (rev 202193)
@@ -1,5 +1,28 @@
2016-06-17 Babak Shafiei <[email protected]>
+ Merge r202174.
+
+ 2016-06-17 John Wilander <[email protected]>
+
+ Ignore case in the check for security origin inheritance
+ https://bugs.webkit.org/show_bug.cgi?id=158878
+
+ Reviewed by Alex Christensen.
+
+ Darin Adler commented in https://bugs.webkit.org/show_bug.cgi?id=158855:
+ "Are these comparisons intentionally case sensitive? Shouldn’t they ignore ASCII
+ case? We could use equalIgnoringASCIICase and equalLettersIgnoringASCIICase for
+ those two lines instead of using ==. URL::parse normalizes letters in the scheme
+ and host by using toASCIILower, but does not normalize letters elsewhere in the
+ URL, such as in the "blank" or "srcdoc" in the above URLs."
+
+ Test: http/tests/dom/window-open-about-uppercase-blank-and-access-document.html
+
+ * platform/URL.cpp:
+ (WebCore::URL::shouldInheritSecurityOriginFromOwner):
+
+2016-06-17 Babak Shafiei <[email protected]>
+
Merge r202151.
2016-06-16 John Wilander <[email protected]>
Modified: branches/safari-601-branch/Source/WebCore/platform/URL.cpp (202192 => 202193)
--- branches/safari-601-branch/Source/WebCore/platform/URL.cpp 2016-06-18 01:06:45 UTC (rev 202192)
+++ branches/safari-601-branch/Source/WebCore/platform/URL.cpp 2016-06-18 01:09:09 UTC (rev 202193)
@@ -1983,8 +1983,8 @@
bool URL::shouldInheritSecurityOriginFromOwner() const
{
return isEmpty()
- || m_string == blankURL().string()
- || m_string == "about:srcdoc";
+ || equalIgnoringASCIICase(m_string, blankURL().string())
+ || equalIgnoringASCIICase(m_string, "about:srcdoc");
}
bool isDefaultPortForProtocol(unsigned short port, const String& protocol)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes