Changeset 167852 in webkit
- Timestamp:
- Apr 27, 2014 1:15:13 AM (10 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167851 r167852 1 2014-04-27 David Kilzer <ddkilzer@apple.com> 2 3 Roll out changes not part of the patch reviewed for Bug 132089 4 <http://webkit.org/b/132089> 5 6 * loader/SubframeLoader.cpp: 7 (WebCore::SubframeLoader::loadOrRedirectSubframe): 8 * page/DOMWindow.cpp: 9 (WebCore::DOMWindow::setLocation): 10 (WebCore::DOMWindow::createWindow): 11 (WebCore::DOMWindow::open): 12 1 13 2014-04-26 Darin Adler <darin@apple.com> 2 14 -
trunk/Source/WebCore/loader/SubframeLoader.cpp
r167851 r167852 323 323 Frame* SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement& ownerElement, const URL& url, const AtomicString& frameName, LockHistory lockHistory, LockBackForwardList lockBackForwardList) 324 324 { 325 if (!url.isValid())326 return nullptr;327 328 325 Frame* frame = ownerElement.contentFrame(); 329 326 if (frame) -
trunk/Source/WebCore/page/DOMWindow.cpp
r167851 r167852 1892 1892 1893 1893 URL completedURL = firstFrame->document()->completeURL(urlString); 1894 if ( !completedURL.isValid())1894 if (completedURL.isNull()) 1895 1895 return; 1896 1896 1897 1897 if (isInsecureScriptAccess(activeWindow, completedURL)) 1898 return;1899 1900 Frame* referrerFrame = activeDocument->frame();1901 if (!referrerFrame)1902 1898 return; 1903 1899 … … 1905 1901 LockHistory lockHistory = (locking != LockHistoryBasedOnGestureState || !ScriptController::processingUserGesture()) ? LockHistory::Yes : LockHistory::No; 1906 1902 LockBackForwardList lockBackForwardList = (locking != LockHistoryBasedOnGestureState) ? LockBackForwardList::Yes : LockBackForwardList::No; 1907 m_frame->navigationScheduler().scheduleLocationChange(activeDocument->securityOrigin(), completedURL, referrerFrame->loader().outgoingReferrer(), lockHistory, lockBackForwardList); 1903 m_frame->navigationScheduler().scheduleLocationChange(activeDocument->securityOrigin(), 1904 // FIXME: What if activeDocument()->frame() is 0? 1905 completedURL, activeDocument->frame()->loader().outgoingReferrer(), 1906 lockHistory, lockBackForwardList); 1908 1907 } 1909 1908 … … 1990 1989 // Don't expose client code to invalid URLs. 1991 1990 activeWindow.printErrorMessage("Unable to open a window with invalid URL '" + completedURL.string() + "'.\n"); 1992 return nullptr;1991 return 0; 1993 1992 } 1994 1993 … … 2005 2004 RefPtr<Frame> newFrame = WebCore::createWindow(activeFrame, openerFrame, frameRequest, windowFeatures, created); 2006 2005 if (!newFrame) 2007 return nullptr;2006 return 0; 2008 2007 2009 2008 newFrame->loader().setOpener(openerFrame); … … 2034 2033 { 2035 2034 if (!isCurrentlyDisplayedInFrame()) 2036 return nullptr;2035 return 0; 2037 2036 Document* activeDocument = activeWindow.document(); 2038 2037 if (!activeDocument) 2039 return nullptr;2038 return 0; 2040 2039 Frame* firstFrame = firstWindow.frame(); 2041 2040 if (!firstFrame) 2042 return nullptr;2041 return 0; 2043 2042 2044 2043 if (!firstWindow.allowPopUp()) { … … 2046 2045 // Otherwise, illegitimate window.open() calls with no name will pass right through the popup blocker. 2047 2046 if (frameName.isEmpty() || !m_frame->tree().find(frameName)) 2048 return nullptr;2047 return 0; 2049 2048 } 2050 2049 2051 2050 // Get the target frame for the special cases of _top and _parent. 2052 2051 // In those cases, we schedule a location change right now and return early. 2053 Frame* targetFrame = nullptr;2052 Frame* targetFrame = 0; 2054 2053 if (frameName == "_top") 2055 2054 targetFrame = &m_frame->tree().top(); … … 2062 2061 if (targetFrame) { 2063 2062 if (!activeDocument->canNavigate(targetFrame)) 2064 return nullptr;2063 return 0; 2065 2064 2066 2065 URL completedURL = firstFrame->document()->completeURL(urlString); 2067 if (!completedURL.isValid())2068 return nullptr;2069 2066 2070 2067 if (targetFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL)) … … 2084 2081 WindowFeatures windowFeatures(windowFeaturesString); 2085 2082 RefPtr<Frame> result = createWindow(urlString, frameName, windowFeatures, activeWindow, firstFrame, m_frame); 2086 return result ? result->document()->domWindow() : nullptr;2083 return result ? result->document()->domWindow() : 0; 2087 2084 } 2088 2085
Note: See TracChangeset
for help on using the changeset viewer.