| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 #include "core/html/HTMLCanvasElement.h" | 124 #include "core/html/HTMLCanvasElement.h" |
| 125 #include "core/html/HTMLCollection.h" | 125 #include "core/html/HTMLCollection.h" |
| 126 #include "core/html/HTMLDialogElement.h" | 126 #include "core/html/HTMLDialogElement.h" |
| 127 #include "core/html/HTMLDocument.h" | 127 #include "core/html/HTMLDocument.h" |
| 128 #include "core/html/HTMLFrameOwnerElement.h" | 128 #include "core/html/HTMLFrameOwnerElement.h" |
| 129 #include "core/html/HTMLHeadElement.h" | 129 #include "core/html/HTMLHeadElement.h" |
| 130 #include "core/html/HTMLIFrameElement.h" | 130 #include "core/html/HTMLIFrameElement.h" |
| 131 #include "core/html/HTMLImport.h" | 131 #include "core/html/HTMLImport.h" |
| 132 #include "core/html/HTMLInputElement.h" | 132 #include "core/html/HTMLInputElement.h" |
| 133 #include "core/html/HTMLLinkElement.h" | 133 #include "core/html/HTMLLinkElement.h" |
| 134 #include "core/html/HTMLMetaElement.h" |
| 134 #include "core/html/HTMLNameCollection.h" | 135 #include "core/html/HTMLNameCollection.h" |
| 135 #include "core/html/HTMLScriptElement.h" | 136 #include "core/html/HTMLScriptElement.h" |
| 136 #include "core/html/HTMLStyleElement.h" | 137 #include "core/html/HTMLStyleElement.h" |
| 137 #include "core/html/HTMLTitleElement.h" | 138 #include "core/html/HTMLTitleElement.h" |
| 138 #include "core/html/PluginDocument.h" | 139 #include "core/html/PluginDocument.h" |
| 139 #include "core/html/forms/FormController.h" | 140 #include "core/html/forms/FormController.h" |
| 140 #include "core/html/parser/HTMLDocumentParser.h" | 141 #include "core/html/parser/HTMLDocumentParser.h" |
| 141 #include "core/html/parser/HTMLParserIdioms.h" | 142 #include "core/html/parser/HTMLParserIdioms.h" |
| 142 #include "core/html/parser/NestingLevelIncrementer.h" | 143 #include "core/html/parser/NestingLevelIncrementer.h" |
| 143 #include "core/html/parser/TextResourceDecoder.h" | 144 #include "core/html/parser/TextResourceDecoder.h" |
| (...skipping 2786 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2930 } | 2931 } |
| 2931 | 2932 |
| 2932 | 2933 |
| 2933 CSSStyleSheet* Document::elementSheet() | 2934 CSSStyleSheet* Document::elementSheet() |
| 2934 { | 2935 { |
| 2935 if (!m_elemSheet) | 2936 if (!m_elemSheet) |
| 2936 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); | 2937 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); |
| 2937 return m_elemSheet.get(); | 2938 return m_elemSheet.get(); |
| 2938 } | 2939 } |
| 2939 | 2940 |
| 2940 void Document::processHttpEquiv(const AtomicString& equiv, const AtomicString& c
ontent) | 2941 void Document::processHttpEquiv(const AtomicString& equiv, const AtomicString& c
ontent, bool inDocumentHeadElement) |
| 2941 { | 2942 { |
| 2942 ASSERT(!equiv.isNull() && !content.isNull()); | 2943 ASSERT(!equiv.isNull() && !content.isNull()); |
| 2943 | 2944 |
| 2944 if (equalIgnoringCase(equiv, "default-style")) | 2945 if (equalIgnoringCase(equiv, "default-style")) { |
| 2945 processHttpEquivDefaultStyle(content); | 2946 processHttpEquivDefaultStyle(content); |
| 2946 else if (equalIgnoringCase(equiv, "refresh")) | 2947 } else if (equalIgnoringCase(equiv, "refresh")) { |
| 2947 processHttpEquivRefresh(content); | 2948 processHttpEquivRefresh(content); |
| 2948 else if (equalIgnoringCase(equiv, "set-cookie")) | 2949 } else if (equalIgnoringCase(equiv, "set-cookie")) { |
| 2949 processHttpEquivSetCookie(content); | 2950 processHttpEquivSetCookie(content); |
| 2950 else if (equalIgnoringCase(equiv, "content-language")) | 2951 } else if (equalIgnoringCase(equiv, "content-language")) { |
| 2951 setContentLanguage(content); | 2952 setContentLanguage(content); |
| 2952 else if (equalIgnoringCase(equiv, "x-dns-prefetch-control")) | 2953 } else if (equalIgnoringCase(equiv, "x-dns-prefetch-control")) { |
| 2953 parseDNSPrefetchControlHeader(content); | 2954 parseDNSPrefetchControlHeader(content); |
| 2954 else if (equalIgnoringCase(equiv, "x-frame-options")) | 2955 } else if (equalIgnoringCase(equiv, "x-frame-options")) { |
| 2955 processHttpEquivXFrameOptions(content); | 2956 processHttpEquivXFrameOptions(content); |
| 2956 else if (equalIgnoringCase(equiv, "content-security-policy") || equalIgnorin
gCase(equiv, "content-security-policy-report-only")) | 2957 } else if (equalIgnoringCase(equiv, "content-security-policy") || equalIgnor
ingCase(equiv, "content-security-policy-report-only")) { |
| 2957 processHttpEquivContentSecurityPolicy(equiv, content); | 2958 if (inDocumentHeadElement) |
| 2959 processHttpEquivContentSecurityPolicy(equiv, content); |
| 2960 else |
| 2961 contentSecurityPolicy()->reportMetaOutsideHead(content); |
| 2962 } |
| 2958 } | 2963 } |
| 2959 | 2964 |
| 2960 void Document::processHttpEquivContentSecurityPolicy(const AtomicString& equiv,
const AtomicString& content) | 2965 void Document::processHttpEquivContentSecurityPolicy(const AtomicString& equiv,
const AtomicString& content) |
| 2961 { | 2966 { |
| 2962 if (equalIgnoringCase(equiv, "content-security-policy")) | 2967 if (equalIgnoringCase(equiv, "content-security-policy")) |
| 2963 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy
::Enforce, ContentSecurityPolicy::HeaderSourceMeta); | 2968 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy
::Enforce, ContentSecurityPolicy::HeaderSourceMeta); |
| 2964 else if (equalIgnoringCase(equiv, "content-security-policy-report-only")) | 2969 else if (equalIgnoringCase(equiv, "content-security-policy-report-only")) |
| 2965 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy
::Report, ContentSecurityPolicy::HeaderSourceMeta); | 2970 contentSecurityPolicy()->didReceiveHeader(content, ContentSecurityPolicy
::Report, ContentSecurityPolicy::HeaderSourceMeta); |
| 2966 else | 2971 else |
| 2967 ASSERT_NOT_REACHED(); | 2972 ASSERT_NOT_REACHED(); |
| (...skipping 2493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5461 void Document::defaultEventHandler(Event* event) | 5466 void Document::defaultEventHandler(Event* event) |
| 5462 { | 5467 { |
| 5463 if (frame() && frame()->remotePlatformLayer()) { | 5468 if (frame() && frame()->remotePlatformLayer()) { |
| 5464 frame()->chromeClient().forwardInputEvent(this, event); | 5469 frame()->chromeClient().forwardInputEvent(this, event); |
| 5465 return; | 5470 return; |
| 5466 } | 5471 } |
| 5467 Node::defaultEventHandler(event); | 5472 Node::defaultEventHandler(event); |
| 5468 } | 5473 } |
| 5469 | 5474 |
| 5470 } // namespace WebCore | 5475 } // namespace WebCore |
| OLD | NEW |