Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: Source/core/dom/ProcessingInstruction.cpp

Issue 14672042: Prepare to add more initiator info to CachedResource(Request) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/css/WebKitCSSShaderValue.cpp ('k') | Source/core/dom/ScriptElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « Source/core/css/WebKitCSSShaderValue.cpp ('k') | Source/core/dom/ScriptElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698