| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
| 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
| 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
| (...skipping 2776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2787 return p->timerAlignmentInterval(); | 2787 return p->timerAlignmentInterval(); |
| 2788 } | 2788 } |
| 2789 | 2789 |
| 2790 EventTarget* Document::errorEventTarget() | 2790 EventTarget* Document::errorEventTarget() |
| 2791 { | 2791 { |
| 2792 return domWindow(); | 2792 return domWindow(); |
| 2793 } | 2793 } |
| 2794 | 2794 |
| 2795 void Document::logExceptionToConsole(const String& errorMessage, const String& s
ourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallSta
ck> callStack) | 2795 void Document::logExceptionToConsole(const String& errorMessage, const String& s
ourceURL, int lineNumber, int columnNumber, PassRefPtrWillBeRawPtr<ScriptCallSta
ck> callStack) |
| 2796 { | 2796 { |
| 2797 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(JSMessageSour
ce, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); | 2797 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(J
SMessageSource, ErrorMessageLevel, errorMessage, sourceURL, lineNumber); |
| 2798 consoleMessage->setCallStack(callStack); | 2798 consoleMessage->setCallStack(callStack); |
| 2799 addMessage(consoleMessage.release()); | 2799 addMessage(consoleMessage.release()); |
| 2800 } | 2800 } |
| 2801 | 2801 |
| 2802 void Document::setURL(const KURL& url) | 2802 void Document::setURL(const KURL& url) |
| 2803 { | 2803 { |
| 2804 const KURL& newURL = url.isEmpty() ? blankURL() : url; | 2804 const KURL& newURL = url.isEmpty() ? blankURL() : url; |
| 2805 if (newURL == m_url) | 2805 if (newURL == m_url) |
| 2806 return; | 2806 return; |
| 2807 | 2807 |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3121 | 3121 |
| 3122 FrameLoader& frameLoader = frame->loader(); | 3122 FrameLoader& frameLoader = frame->loader(); |
| 3123 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); | 3123 unsigned long requestIdentifier = loader()->mainResourceIdentifier(); |
| 3124 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { | 3124 if (frameLoader.shouldInterruptLoadForXFrameOptions(content, url(), requestI
dentifier)) { |
| 3125 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; | 3125 String message = "Refused to display '" + url().elidedString() + "' in a
frame because it set 'X-Frame-Options' to '" + content + "'."; |
| 3126 frameLoader.stopAllLoaders(); | 3126 frameLoader.stopAllLoaders(); |
| 3127 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's | 3127 // Stopping the loader isn't enough, as we're already parsing the docume
nt; to honor the header's |
| 3128 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that | 3128 // intent, we must navigate away from the possibly partially-rendered do
cument to a location that |
| 3129 // doesn't inherit the parent's SecurityOrigin. | 3129 // doesn't inherit the parent's SecurityOrigin. |
| 3130 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); | 3130 frame->navigationScheduler().scheduleLocationChange(this, SecurityOrigin
::urlWithUniqueSecurityOrigin(), Referrer()); |
| 3131 RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(SecurityM
essageSource, ErrorMessageLevel, message); | 3131 RefPtrWillBeRawPtr<ConsoleMessage> consoleMessage = ConsoleMessage::crea
te(SecurityMessageSource, ErrorMessageLevel, message); |
| 3132 consoleMessage->setRequestIdentifier(requestIdentifier); | 3132 consoleMessage->setRequestIdentifier(requestIdentifier); |
| 3133 addMessage(consoleMessage.release()); | 3133 addMessage(consoleMessage.release()); |
| 3134 } | 3134 } |
| 3135 } | 3135 } |
| 3136 | 3136 |
| 3137 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) | 3137 bool Document::shouldMergeWithLegacyDescription(ViewportDescription::Type origin
) |
| 3138 { | 3138 { |
| 3139 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; | 3139 return settings() && settings()->viewportMetaMergeContentQuirk() && m_legacy
ViewportDescription.isMetaViewportType() && m_legacyViewportDescription.type ==
origin; |
| 3140 } | 3140 } |
| 3141 | 3141 |
| (...skipping 1856 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4998 | 4998 |
| 4999 m_isDNSPrefetchEnabled = false; | 4999 m_isDNSPrefetchEnabled = false; |
| 5000 m_haveExplicitlyDisabledDNSPrefetch = true; | 5000 m_haveExplicitlyDisabledDNSPrefetch = true; |
| 5001 } | 5001 } |
| 5002 | 5002 |
| 5003 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) | 5003 void Document::reportBlockedScriptExecutionToInspector(const String& directiveTe
xt) |
| 5004 { | 5004 { |
| 5005 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); | 5005 InspectorInstrumentation::scriptExecutionBlockedByCSP(this, directiveText); |
| 5006 } | 5006 } |
| 5007 | 5007 |
| 5008 void Document::addMessage(PassRefPtr<ConsoleMessage> consoleMessage) | 5008 void Document::addMessage(PassRefPtrWillBeRawPtr<ConsoleMessage> consoleMessage) |
| 5009 { | 5009 { |
| 5010 if (!isContextThread()) { | 5010 if (!isContextThread()) { |
| 5011 m_taskRunner->postTask(AddConsoleMessageTask::create(consoleMessage->sou
rce(), consoleMessage->level(), consoleMessage->message())); | 5011 m_taskRunner->postTask(AddConsoleMessageTask::create(consoleMessage->sou
rce(), consoleMessage->level(), consoleMessage->message())); |
| 5012 return; | 5012 return; |
| 5013 } | 5013 } |
| 5014 | 5014 |
| 5015 if (!m_frame) | 5015 if (!m_frame) |
| 5016 return; | 5016 return; |
| 5017 | 5017 |
| 5018 if (!consoleMessage->scriptState() && consoleMessage->url().isNull() && !con
soleMessage->lineNumber()) { | 5018 if (!consoleMessage->scriptState() && consoleMessage->url().isNull() && !con
soleMessage->lineNumber()) { |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5883 using namespace blink; | 5883 using namespace blink; |
| 5884 void showLiveDocumentInstances() | 5884 void showLiveDocumentInstances() |
| 5885 { | 5885 { |
| 5886 WeakDocumentSet& set = liveDocumentSet(); | 5886 WeakDocumentSet& set = liveDocumentSet(); |
| 5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5887 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5888 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
| 5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5889 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
| 5890 } | 5890 } |
| 5891 } | 5891 } |
| 5892 #endif | 5892 #endif |
| OLD | NEW |