OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007 Rob Buis | 2 * Copyright (C) 2006, 2007 Rob Buis |
3 * Copyright (C) 2008 Apple, Inc. All rights reserved. | 3 * Copyright (C) 2008 Apple, Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 #include "core/css/MediaList.h" | 24 #include "core/css/MediaList.h" |
25 #include "core/css/MediaQueryEvaluator.h" | 25 #include "core/css/MediaQueryEvaluator.h" |
26 #include "core/css/StyleSheetContents.h" | 26 #include "core/css/StyleSheetContents.h" |
27 #include "core/dom/Document.h" | 27 #include "core/dom/Document.h" |
28 #include "core/dom/Element.h" | 28 #include "core/dom/Element.h" |
29 #include "core/dom/ScriptableDocumentParser.h" | 29 #include "core/dom/ScriptableDocumentParser.h" |
30 #include "core/dom/StyleEngine.h" | 30 #include "core/dom/StyleEngine.h" |
31 #include "core/frame/csp/ContentSecurityPolicy.h" | 31 #include "core/frame/csp/ContentSecurityPolicy.h" |
32 #include "core/html/HTMLStyleElement.h" | 32 #include "core/html/HTMLStyleElement.h" |
33 #include "platform/TraceEvent.h" | 33 #include "wtf/TraceEvent.h" |
34 #include "wtf/text/StringBuilder.h" | 34 #include "wtf/text/StringBuilder.h" |
35 | 35 |
36 namespace WebCore { | 36 namespace WebCore { |
37 | 37 |
38 static bool isCSS(Element* element, const AtomicString& type) | 38 static bool isCSS(Element* element, const AtomicString& type) |
39 { | 39 { |
40 return type.isEmpty() || (element->isHTMLElement() ? equalIgnoringCase(type,
"text/css") : (type == "text/css")); | 40 return type.isEmpty() || (element->isHTMLElement() ? equalIgnoringCase(type,
"text/css") : (type == "text/css")); |
41 } | 41 } |
42 | 42 |
43 StyleElement::StyleElement(Document* document, bool createdByParser) | 43 StyleElement::StyleElement(Document* document, bool createdByParser) |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 document.styleEngine()->removePendingSheet(m_sheet->ownerNode()); | 183 document.styleEngine()->removePendingSheet(m_sheet->ownerNode()); |
184 return true; | 184 return true; |
185 } | 185 } |
186 | 186 |
187 void StyleElement::startLoadingDynamicSheet(Document& document) | 187 void StyleElement::startLoadingDynamicSheet(Document& document) |
188 { | 188 { |
189 document.styleEngine()->addPendingSheet(); | 189 document.styleEngine()->addPendingSheet(); |
190 } | 190 } |
191 | 191 |
192 } | 192 } |
OLD | NEW |