| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) | 2 * Copyright (C) 2000 Peter Kelly (pmk@post.com) |
| 3 * Copyright (C) 2006, 2008, 2009 Apple Inc. All rights reserved. | 3 * Copyright (C) 2006, 2008, 2009 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 13 matching lines...) Expand all Loading... |
| 24 #include "core/css/CSSStyleSheet.h" | 24 #include "core/css/CSSStyleSheet.h" |
| 25 #include "core/css/MediaList.h" | 25 #include "core/css/MediaList.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/DocumentStyleSheetCollection.h" | 28 #include "core/dom/DocumentStyleSheetCollection.h" |
| 29 #include "core/dom/ExceptionCode.h" | 29 #include "core/dom/ExceptionCode.h" |
| 30 #include "core/loader/FrameLoader.h" | 30 #include "core/loader/FrameLoader.h" |
| 31 #include "core/loader/cache/CachedCSSStyleSheet.h" | 31 #include "core/loader/cache/CachedCSSStyleSheet.h" |
| 32 #include "core/loader/cache/CachedResourceLoader.h" | 32 #include "core/loader/cache/CachedResourceLoader.h" |
| 33 #include "core/loader/cache/CachedResourceRequest.h" | 33 #include "core/loader/cache/CachedResourceRequest.h" |
| 34 #include "core/loader/cache/CachedResourceRequestInitiators.h" |
| 34 #include "core/loader/cache/CachedXSLStyleSheet.h" | 35 #include "core/loader/cache/CachedXSLStyleSheet.h" |
| 35 #include "core/page/Frame.h" | 36 #include "core/page/Frame.h" |
| 36 #include "core/xml/XSLStyleSheet.h" | 37 #include "core/xml/XSLStyleSheet.h" |
| 37 #include "core/xml/parser/XMLDocumentParser.h" // for parseAttributes() | 38 #include "core/xml/parser/XMLDocumentParser.h" // for parseAttributes() |
| 38 | 39 |
| 39 namespace WebCore { | 40 namespace WebCore { |
| 40 | 41 |
| 41 inline ProcessingInstruction::ProcessingInstruction(Document* document, const St
ring& target, const String& data) | 42 inline ProcessingInstruction::ProcessingInstruction(Document* document, const St
ring& target, const String& data) |
| 42 : Node(document, CreateOther) | 43 : Node(document, CreateOther) |
| 43 , m_target(target) | 44 , m_target(target) |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 m_cachedSheet = 0; | 150 m_cachedSheet = 0; |
| 150 } | 151 } |
| 151 | 152 |
| 152 String url = document()->completeURL(href).string(); | 153 String url = document()->completeURL(href).string(); |
| 153 if (!dispatchBeforeLoadEvent(url)) | 154 if (!dispatchBeforeLoadEvent(url)) |
| 154 return; | 155 return; |
| 155 | 156 |
| 156 m_loading = true; | 157 m_loading = true; |
| 157 document()->styleSheetCollection()->addPendingSheet(); | 158 document()->styleSheetCollection()->addPendingSheet(); |
| 158 | 159 |
| 159 CachedResourceRequest request(ResourceRequest(document()->completeUR
L(href))); | 160 CachedResourceRequest request(ResourceRequest(document()->completeUR
L(href)), cachedResourceRequestInitiators().processinginstruction); |
| 160 if (m_isXSL) | 161 if (m_isXSL) |
| 161 m_cachedSheet = document()->cachedResourceLoader()->requestXSLSt
yleSheet(request); | 162 m_cachedSheet = document()->cachedResourceLoader()->requestXSLSt
yleSheet(request); |
| 162 else | 163 else |
| 163 { | 164 { |
| 164 String charset = attrs.get("charset"); | 165 String charset = attrs.get("charset"); |
| 165 if (charset.isEmpty()) | 166 if (charset.isEmpty()) |
| 166 charset = document()->charset(); | 167 charset = document()->charset(); |
| 167 request.setCharset(charset); | 168 request.setCharset(charset); |
| 168 | 169 |
| 169 m_cachedSheet = document()->cachedResourceLoader()->requestCSSSt
yleSheet(request); | 170 m_cachedSheet = document()->cachedResourceLoader()->requestCSSSt
yleSheet(request); |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 document()->styleResolverChanged(DeferRecalcStyle); | 305 document()->styleResolverChanged(DeferRecalcStyle); |
| 305 } | 306 } |
| 306 | 307 |
| 307 void ProcessingInstruction::finishParsingChildren() | 308 void ProcessingInstruction::finishParsingChildren() |
| 308 { | 309 { |
| 309 m_createdByParser = false; | 310 m_createdByParser = false; |
| 310 Node::finishParsingChildren(); | 311 Node::finishParsingChildren(); |
| 311 } | 312 } |
| 312 | 313 |
| 313 } // namespace | 314 } // namespace |
| OLD | NEW |