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 4846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4857 setSecurityOrigin(initializer.owner()->securityOrigin()); | 4857 setSecurityOrigin(initializer.owner()->securityOrigin()); |
4858 } | 4858 } |
4859 | 4859 |
4860 void Document::initContentSecurityPolicy(const ContentSecurityPolicyResponseHead
ers& headers) | 4860 void Document::initContentSecurityPolicy(const ContentSecurityPolicyResponseHead
ers& headers) |
4861 { | 4861 { |
4862 if (m_frame && m_frame->tree().parent() && m_frame->tree().parent()->isLocal
Frame() && (shouldInheritSecurityOriginFromOwner(m_url) || isPluginDocument())) | 4862 if (m_frame && m_frame->tree().parent() && m_frame->tree().parent()->isLocal
Frame() && (shouldInheritSecurityOriginFromOwner(m_url) || isPluginDocument())) |
4863 contentSecurityPolicy()->copyStateFrom(m_frame->tree().parent()->documen
t()->contentSecurityPolicy()); | 4863 contentSecurityPolicy()->copyStateFrom(m_frame->tree().parent()->documen
t()->contentSecurityPolicy()); |
4864 contentSecurityPolicy()->didReceiveHeaders(headers); | 4864 contentSecurityPolicy()->didReceiveHeaders(headers); |
4865 } | 4865 } |
4866 | 4866 |
| 4867 void Document::initScriptEnabled() |
| 4868 { |
| 4869 m_scriptEnabled = m_frame->loader().client()->allowScript(settings() && sett
ings()->scriptEnabled()); |
| 4870 } |
| 4871 |
4867 bool Document::allowInlineEventHandlers(Node* node, EventListener* listener, con
st String& contextURL, const WTF::OrdinalNumber& contextLine) | 4872 bool Document::allowInlineEventHandlers(Node* node, EventListener* listener, con
st String& contextURL, const WTF::OrdinalNumber& contextLine) |
4868 { | 4873 { |
4869 if (!contentSecurityPolicy()->allowInlineEventHandlers(contextURL, contextLi
ne)) | 4874 if (!contentSecurityPolicy()->allowInlineEventHandlers(contextURL, contextLi
ne)) |
4870 return false; | 4875 return false; |
4871 | 4876 |
4872 // HTML says that inline script needs browsing context to create its executi
on environment. | 4877 // HTML says that inline script needs browsing context to create its executi
on environment. |
4873 // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.ht
ml#event-handler-attributes | 4878 // http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.ht
ml#event-handler-attributes |
4874 // Also, if the listening node came from other document, which happens on co
ntext-less event dispatching, | 4879 // Also, if the listening node came from other document, which happens on co
ntext-less event dispatching, |
4875 // we also need to ask the owner document of the node. | 4880 // we also need to ask the owner document of the node. |
4876 LocalFrame* frame = executingFrame(); | 4881 LocalFrame* frame = executingFrame(); |
(...skipping 941 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5818 visitor->trace(m_compositorPendingAnimations); | 5823 visitor->trace(m_compositorPendingAnimations); |
5819 visitor->trace(m_contextDocument); | 5824 visitor->trace(m_contextDocument); |
5820 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); | 5825 visitor->registerWeakMembers<Document, &Document::clearWeakMembers>(this); |
5821 DocumentSupplementable::trace(visitor); | 5826 DocumentSupplementable::trace(visitor); |
5822 TreeScope::trace(visitor); | 5827 TreeScope::trace(visitor); |
5823 ContainerNode::trace(visitor); | 5828 ContainerNode::trace(visitor); |
5824 ExecutionContext::trace(visitor); | 5829 ExecutionContext::trace(visitor); |
5825 } | 5830 } |
5826 | 5831 |
5827 } // namespace WebCore | 5832 } // namespace WebCore |
OLD | NEW |