| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |