Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: Source/WebCore/page/DOMWindow.cpp

Issue 7395022: Merge 91152 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/782/
Patch Set: Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/http/tests/security/xss-DENIED-window-open-parent-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1788 matching lines...) Expand 10 before | Expand all | Expand 10 after
1799 else if (frameName == "_parent") { 1799 else if (frameName == "_parent") {
1800 if (Frame* parent = m_frame->tree()->parent()) 1800 if (Frame* parent = m_frame->tree()->parent())
1801 targetFrame = parent; 1801 targetFrame = parent;
1802 else 1802 else
1803 targetFrame = m_frame; 1803 targetFrame = m_frame;
1804 } 1804 }
1805 if (targetFrame) { 1805 if (targetFrame) {
1806 if (!activeFrame->loader()->shouldAllowNavigation(targetFrame)) 1806 if (!activeFrame->loader()->shouldAllowNavigation(targetFrame))
1807 return 0; 1807 return 0;
1808 1808
1809 if (isInsecureScriptAccess(activeWindow, urlString)) 1809 if (targetFrame->domWindow()->isInsecureScriptAccess(activeWindow, urlSt ring))
1810 return targetFrame->domWindow(); 1810 return targetFrame->domWindow();
1811 1811
1812 if (urlString.isEmpty()) 1812 if (urlString.isEmpty())
1813 return targetFrame->domWindow(); 1813 return targetFrame->domWindow();
1814 1814
1815 // For whatever reason, Firefox uses the first window rather than the ac tive window to 1815 // For whatever reason, Firefox uses the first window rather than the ac tive window to
1816 // determine the outgoing referrer. We replicate that behavior here. 1816 // determine the outgoing referrer. We replicate that behavior here.
1817 targetFrame->navigationScheduler()->scheduleLocationChange(activeFrame-> document()->securityOrigin(), 1817 targetFrame->navigationScheduler()->scheduleLocationChange(activeFrame-> document()->securityOrigin(),
1818 firstFrame->document()->completeURL(urlString).string(), 1818 firstFrame->document()->completeURL(urlString).string(),
1819 firstFrame->loader()->outgoingReferrer(), 1819 firstFrame->loader()->outgoingReferrer(),
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
1874 #if ENABLE(QUOTA) 1874 #if ENABLE(QUOTA)
1875 StorageInfo* DOMWindow::webkitStorageInfo() const 1875 StorageInfo* DOMWindow::webkitStorageInfo() const
1876 { 1876 {
1877 if (!m_storageInfo) 1877 if (!m_storageInfo)
1878 m_storageInfo = StorageInfo::create(); 1878 m_storageInfo = StorageInfo::create();
1879 return m_storageInfo.get(); 1879 return m_storageInfo.get();
1880 } 1880 }
1881 #endif 1881 #endif
1882 1882
1883 } // namespace WebCore 1883 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/security/xss-DENIED-window-open-parent-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698