Diff
Modified: tags/Safari-600.1.3.3/LayoutTests/ChangeLog (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/ChangeLog 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/ChangeLog 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,3 +1,7 @@
+2014-07-31 Babak Shafiei <[email protected]>
+
+ Roll out r171661.
+
2014-07-29 Babak Shafiei <[email protected]>
Merge r171661.
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-after-window-close-expected.txt (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-after-window-close-expected.txt 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-after-window-close-expected.txt 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,2 +0,0 @@
-Test that WebKit does not crash when accessing localStorage after calling window.close().
-
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-after-window-close.html (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-after-window-close.html 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-after-window-close.html 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,14 +0,0 @@
-<html>
-<head>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.setCanOpenWindows();
- testRunner.waitUntilDone();
-}
-</script>
-</head>
-<body _onload_="window.open('resources/close-window-and-access-storage.html');">
-Test that WebKit does not crash when accessing localStorage after calling window.close().<br>
-</body>
-</html>
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close-expected.txt (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close-expected.txt 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close-expected.txt 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,11 +0,0 @@
-Tests that we can't store a value in local storage after calling window.close() even if we created the local storage before the call to window.close().
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.localStorage is defined.
-PASS window.localStorage["test"] is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/access-storage-then-set-value-in-storage-after-window-close.html 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,31 +0,0 @@
-<html>
-<head>
-<script src=""
-<script>
-window.jsTestIsAsync = true;
-
-if (window.testRunner) {
- testRunner.setCanOpenWindows();
-
- // We explicitly call testRunner.waitUntilDone() because we call window.open() before
- // js-test-post.js is processed.
- testRunner.waitUntilDone();
-}
-
-function checkResultAndNotifyDone()
-{
- shouldBeDefined('window.localStorage');
- shouldBeUndefined('window.localStorage["test"]');
- window.localStorage.clear();
- finishJSTest();
-}
-</script>
-</head>
-<body>
-<script>
-description("Tests that we can't store a value in local storage after calling window.close() even if we created the local storage before the call to window.close().");
-window.open("resources/access-storage-close-window-and-set-value-in-storage.html");
-</script>
-<script src=""
-</body>
-</html>
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/access-storage-close-window-and-set-value-in-storage.html (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/access-storage-close-window-and-set-value-in-storage.html 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/access-storage-close-window-and-set-value-in-storage.html 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,12 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script>
-window.localStorage; // Creates local storage
-window.close();
-if (window.localStorage)
- localStorage["test"] = "DidSetValueAfterCallingWindowClose";
-window.opener.checkResultAndNotifyDone();
-</script>
-</head>
-</html>
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/close-window-and-access-storage.html (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/close-window-and-access-storage.html 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/close-window-and-access-storage.html 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,10 +0,0 @@
-<html>
-<head>
-<script>
-window.close();
-window.localStorage;
-if (window.testRunner)
- testRunner.notifyDone();
-</script>
-</head>
-</html>
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/close-window-and-set-value-in-storage.html (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/close-window-and-set-value-in-storage.html 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/resources/close-window-and-set-value-in-storage.html 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,11 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<script>
-window.close();
-if (window.localStorage)
- localStorage["test"] = "DidSetValueAfterCallingWindowClose";
-window.opener.checkResultAndNotifyDone();
-</script>
-</head>
-</html>
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/set-value-in-storage-after-window-close-expected.txt (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/set-value-in-storage-after-window-close-expected.txt 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/set-value-in-storage-after-window-close-expected.txt 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,11 +0,0 @@
-Tests that we can't store a value in local storage after calling window.close().
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS window.localStorage is defined.
-PASS window.localStorage["test"] is undefined.
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/set-value-in-storage-after-window-close.html (171862 => 171863)
--- tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/set-value-in-storage-after-window-close.html 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/LayoutTests/storage/domstorage/localstorage/set-value-in-storage-after-window-close.html 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,31 +0,0 @@
-<html>
-<head>
-<script src=""
-<script>
-window.jsTestIsAsync = true;
-
-if (window.testRunner) {
- testRunner.setCanOpenWindows();
-
- // We explicitly call testRunner.waitUntilDone() because we call window.open() before
- // js-test-post.js is processed.
- testRunner.waitUntilDone();
-}
-
-function checkResultAndNotifyDone()
-{
- shouldBeDefined('window.localStorage');
- shouldBeUndefined('window.localStorage["test"]');
- window.localStorage.clear();
- finishJSTest();
-}
-</script>
-</head>
-<body>
-<script>
-description("Tests that we can't store a value in local storage after calling window.close().");
-window.open("resources/close-window-and-set-value-in-storage.html");
-</script>
-<script src=""
-</body>
-</html>
Modified: tags/Safari-600.1.3.3/Source/WebCore/ChangeLog (171862 => 171863)
--- tags/Safari-600.1.3.3/Source/WebCore/ChangeLog 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/Source/WebCore/ChangeLog 2014-07-31 17:18:02 UTC (rev 171863)
@@ -1,3 +1,7 @@
+2014-07-31 Babak Shafiei <[email protected]>
+
+ Roll out r171661.
+
2014-07-29 Babak Shafiei <[email protected]>
Merge r171661.
Modified: tags/Safari-600.1.3.3/Source/WebCore/page/DOMWindow.cpp (171862 => 171863)
--- tags/Safari-600.1.3.3/Source/WebCore/page/DOMWindow.cpp 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/Source/WebCore/page/DOMWindow.cpp 2014-07-31 17:18:02 UTC (rev 171863)
@@ -821,38 +821,31 @@
Storage* DOMWindow::localStorage(ExceptionCode& ec) const
{
if (!isCurrentlyDisplayedInFrame())
- return nullptr;
+ return 0;
Document* document = this->document();
if (!document)
- return nullptr;
+ return 0;
if (!document->securityOrigin()->canAccessLocalStorage(0)) {
ec = SECURITY_ERR;
- return nullptr;
+ return 0;
}
- Page* page = document->page();
- // FIXME: We should consider supporting access/modification to local storage
- // after calling window.close(). See <https://bugs.webkit.org/show_bug.cgi?id=135330>.
- if (!page || !page->isClosing()) {
- if (m_localStorage) {
- if (!m_localStorage->area().canAccessStorage(m_frame)) {
- ec = SECURITY_ERR;
- return nullptr;
- }
- return m_localStorage.get();
+ if (m_localStorage) {
+ if (!m_localStorage->area().canAccessStorage(m_frame)) {
+ ec = SECURITY_ERR;
+ return 0;
}
+ return m_localStorage.get();
}
+ Page* page = document->page();
if (!page)
- return nullptr;
+ return 0;
- if (page->isClosing())
- return nullptr;
-
if (!page->settings().localStorageEnabled())
- return nullptr;
+ return 0;
RefPtr<StorageArea> storageArea;
if (!document->securityOrigin()->canAccessLocalStorage(document->topOrigin()))
@@ -862,7 +855,7 @@
if (!storageArea->canAccessStorage(m_frame)) {
ec = SECURITY_ERR;
- return nullptr;
+ return 0;
}
m_localStorage = Storage::create(m_frame, storageArea.release());
@@ -1042,7 +1035,6 @@
if (!m_frame->loader().shouldClose())
return;
- page->setIsClosing();
page->chrome().closeWindowSoon();
}
Modified: tags/Safari-600.1.3.3/Source/WebCore/page/Page.cpp (171862 => 171863)
--- tags/Safari-600.1.3.3/Source/WebCore/page/Page.cpp 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/Source/WebCore/page/Page.cpp 2014-07-31 17:18:02 UTC (rev 171863)
@@ -201,7 +201,6 @@
, m_userContentController(WTF::move(pageClients.userContentController))
, m_visitedLinkStore(WTF::move(pageClients.visitedLinkStore))
, m_sessionID(SessionID::defaultSessionID())
- , m_isClosing(false)
{
ASSERT(m_editorClient);
Modified: tags/Safari-600.1.3.3/Source/WebCore/page/Page.h (171862 => 171863)
--- tags/Safari-600.1.3.3/Source/WebCore/page/Page.h 2014-07-31 17:16:08 UTC (rev 171862)
+++ tags/Safari-600.1.3.3/Source/WebCore/page/Page.h 2014-07-31 17:18:02 UTC (rev 171863)
@@ -320,9 +320,6 @@
void setIsInWindow(bool);
bool isInWindow() const { return m_viewState & ViewState::IsInWindow; }
- void setIsClosing() { m_isClosing = true; }
- bool isClosing() const { return m_isClosing; }
-
void addViewStateChangeObserver(ViewStateChangeObserver&);
void removeViewStateChangeObserver(ViewStateChangeObserver&);
@@ -588,8 +585,6 @@
HashSet<ViewStateChangeObserver*> m_viewStateChangeObservers;
SessionID m_sessionID;
-
- bool m_isClosing;
};
inline PageGroup& Page::group()