Changeset 167852 in webkit


Ignore:
Timestamp:
Apr 27, 2014 1:15:13 AM (10 years ago)
Author:
ddkilzer@apple.com
Message:

Roll out changes not part of the patch reviewed for Bug 132089
<http://webkit.org/b/132089>

  • loader/SubframeLoader.cpp:

(WebCore::SubframeLoader::loadOrRedirectSubframe):

  • page/DOMWindow.cpp:

(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r167851 r167852  
     12014-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
    1132014-04-26  Darin Adler  <darin@apple.com>
    214
  • trunk/Source/WebCore/loader/SubframeLoader.cpp

    r167851 r167852  
    323323Frame* SubframeLoader::loadOrRedirectSubframe(HTMLFrameOwnerElement& ownerElement, const URL& url, const AtomicString& frameName, LockHistory lockHistory, LockBackForwardList lockBackForwardList)
    324324{
    325     if (!url.isValid())
    326         return nullptr;
    327 
    328325    Frame* frame = ownerElement.contentFrame();
    329326    if (frame)
  • trunk/Source/WebCore/page/DOMWindow.cpp

    r167851 r167852  
    18921892
    18931893    URL completedURL = firstFrame->document()->completeURL(urlString);
    1894     if (!completedURL.isValid())
     1894    if (completedURL.isNull())
    18951895        return;
    18961896
    18971897    if (isInsecureScriptAccess(activeWindow, completedURL))
    1898         return;
    1899 
    1900     Frame* referrerFrame = activeDocument->frame();
    1901     if (!referrerFrame)
    19021898        return;
    19031899
     
    19051901    LockHistory lockHistory = (locking != LockHistoryBasedOnGestureState || !ScriptController::processingUserGesture()) ? LockHistory::Yes : LockHistory::No;
    19061902    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);
    19081907}
    19091908
     
    19901989        // Don't expose client code to invalid URLs.
    19911990        activeWindow.printErrorMessage("Unable to open a window with invalid URL '" + completedURL.string() + "'.\n");
    1992         return nullptr;
     1991        return 0;
    19931992    }
    19941993
     
    20052004    RefPtr<Frame> newFrame = WebCore::createWindow(activeFrame, openerFrame, frameRequest, windowFeatures, created);
    20062005    if (!newFrame)
    2007         return nullptr;
     2006        return 0;
    20082007
    20092008    newFrame->loader().setOpener(openerFrame);
     
    20342033{
    20352034    if (!isCurrentlyDisplayedInFrame())
    2036         return nullptr;
     2035        return 0;
    20372036    Document* activeDocument = activeWindow.document();
    20382037    if (!activeDocument)
    2039         return nullptr;
     2038        return 0;
    20402039    Frame* firstFrame = firstWindow.frame();
    20412040    if (!firstFrame)
    2042         return nullptr;
     2041        return 0;
    20432042
    20442043    if (!firstWindow.allowPopUp()) {
     
    20462045        // Otherwise, illegitimate window.open() calls with no name will pass right through the popup blocker.
    20472046        if (frameName.isEmpty() || !m_frame->tree().find(frameName))
    2048             return nullptr;
     2047            return 0;
    20492048    }
    20502049
    20512050    // Get the target frame for the special cases of _top and _parent.
    20522051    // In those cases, we schedule a location change right now and return early.
    2053     Frame* targetFrame = nullptr;
     2052    Frame* targetFrame = 0;
    20542053    if (frameName == "_top")
    20552054        targetFrame = &m_frame->tree().top();
     
    20622061    if (targetFrame) {
    20632062        if (!activeDocument->canNavigate(targetFrame))
    2064             return nullptr;
     2063            return 0;
    20652064
    20662065        URL completedURL = firstFrame->document()->completeURL(urlString);
    2067         if (!completedURL.isValid())
    2068             return nullptr;
    20692066
    20702067        if (targetFrame->document()->domWindow()->isInsecureScriptAccess(activeWindow, completedURL))
     
    20842081    WindowFeatures windowFeatures(windowFeaturesString);
    20852082    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;
    20872084}
    20882085
Note: See TracChangeset for help on using the changeset viewer.