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

Side by Side Diff: Source/core/frame/DOMWindow.cpp

Issue 32793003: Have Frame::navigationScheduler() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/frame/Frame.h » ('j') | 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 1550 matching lines...) Expand 10 before | Expand all | Expand 10 after
1561 return; 1561 return;
1562 1562
1563 KURL completedURL = firstFrame->document()->completeURL(urlString); 1563 KURL completedURL = firstFrame->document()->completeURL(urlString);
1564 if (completedURL.isNull()) 1564 if (completedURL.isNull())
1565 return; 1565 return;
1566 1566
1567 if (isInsecureScriptAccess(activeWindow, completedURL)) 1567 if (isInsecureScriptAccess(activeWindow, completedURL))
1568 return; 1568 return;
1569 1569
1570 // We want a new history item if we are processing a user gesture. 1570 // We want a new history item if we are processing a user gesture.
1571 m_frame->navigationScheduler()->scheduleLocationChange(activeDocument->secur ityOrigin(), 1571 m_frame->navigationScheduler().scheduleLocationChange(activeDocument->securi tyOrigin(),
1572 // FIXME: What if activeDocument()->frame() is 0? 1572 // FIXME: What if activeDocument()->frame() is 0?
1573 completedURL, activeDocument->frame()->loader()->outgoingReferrer(), 1573 completedURL, activeDocument->frame()->loader()->outgoingReferrer(),
1574 locking != LockHistoryBasedOnGestureState); 1574 locking != LockHistoryBasedOnGestureState);
1575 } 1575 }
1576 1576
1577 void DOMWindow::printErrorMessage(const String& message) 1577 void DOMWindow::printErrorMessage(const String& message)
1578 { 1578 {
1579 if (message.isEmpty()) 1579 if (message.isEmpty())
1580 return; 1580 return;
1581 1581
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 KURL completedURL = firstFrame->document()->completeURL(urlString); 1705 KURL completedURL = firstFrame->document()->completeURL(urlString);
1706 1706
1707 if (targetFrame->domWindow()->isInsecureScriptAccess(activeWindow, compl etedURL)) 1707 if (targetFrame->domWindow()->isInsecureScriptAccess(activeWindow, compl etedURL))
1708 return targetFrame->domWindow(); 1708 return targetFrame->domWindow();
1709 1709
1710 if (urlString.isEmpty()) 1710 if (urlString.isEmpty())
1711 return targetFrame->domWindow(); 1711 return targetFrame->domWindow();
1712 1712
1713 // For whatever reason, Firefox uses the first window rather than the ac tive window to 1713 // For whatever reason, Firefox uses the first window rather than the ac tive window to
1714 // determine the outgoing referrer. We replicate that behavior here. 1714 // determine the outgoing referrer. We replicate that behavior here.
1715 targetFrame->navigationScheduler()->scheduleLocationChange( 1715 targetFrame->navigationScheduler().scheduleLocationChange(
1716 activeDocument->securityOrigin(), 1716 activeDocument->securityOrigin(),
1717 completedURL, 1717 completedURL,
1718 firstFrame->loader()->outgoingReferrer(), 1718 firstFrame->loader()->outgoingReferrer(),
1719 false); 1719 false);
1720 return targetFrame->domWindow(); 1720 return targetFrame->domWindow();
1721 } 1721 }
1722 1722
1723 WindowFeatures windowFeatures(windowFeaturesString); 1723 WindowFeatures windowFeatures(windowFeaturesString);
1724 Frame* result = createWindow(urlString, frameName, windowFeatures, activeWin dow, firstFrame, m_frame); 1724 Frame* result = createWindow(urlString, frameName, windowFeatures, activeWin dow, firstFrame, m_frame);
1725 return result ? result->domWindow() : 0; 1725 return result ? result->domWindow() : 0;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN otifier()); 1767 return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN otifier());
1768 } 1768 }
1769 1769
1770 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier() 1770 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier()
1771 { 1771 {
1772 return DOMWindowLifecycleNotifier::create(this); 1772 return DOMWindowLifecycleNotifier::create(this);
1773 } 1773 }
1774 1774
1775 1775
1776 } // namespace WebCore 1776 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/frame/Frame.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698