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

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

Issue 23516004: Have CSSParserContext take a Document reference in argument (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/dom/Node.cpp ('k') | Source/core/dom/SelectorQuery.h » ('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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 } 176 }
177 177
178 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas eURL, const String& charset, const CSSStyleSheetResource* sheet) 178 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas eURL, const String& charset, const CSSStyleSheetResource* sheet)
179 { 179 {
180 if (!inDocument()) { 180 if (!inDocument()) {
181 ASSERT(!m_sheet); 181 ASSERT(!m_sheet);
182 return; 182 return;
183 } 183 }
184 184
185 ASSERT(m_isCSS); 185 ASSERT(m_isCSS);
186 CSSParserContext parserContext(&document(), baseURL, charset); 186 CSSParserContext parserContext(document(), baseURL, charset);
187 187
188 RefPtr<StyleSheetContents> newSheet = StyleSheetContents::create(href, parse rContext); 188 RefPtr<StyleSheetContents> newSheet = StyleSheetContents::create(href, parse rContext);
189 189
190 RefPtr<CSSStyleSheet> cssSheet = CSSStyleSheet::create(newSheet, this); 190 RefPtr<CSSStyleSheet> cssSheet = CSSStyleSheet::create(newSheet, this);
191 cssSheet->setDisabled(m_alternate); 191 cssSheet->setDisabled(m_alternate);
192 cssSheet->setTitle(m_title); 192 cssSheet->setTitle(m_title);
193 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); 193 cssSheet->setMediaQueries(MediaQuerySet::create(m_media));
194 194
195 m_sheet = cssSheet.release(); 195 m_sheet = cssSheet.release();
196 196
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 document().removedStyleSheet(removedSheet.get()); 274 document().removedStyleSheet(removedSheet.get());
275 } 275 }
276 276
277 void ProcessingInstruction::finishParsingChildren() 277 void ProcessingInstruction::finishParsingChildren()
278 { 278 {
279 m_createdByParser = false; 279 m_createdByParser = false;
280 CharacterData::finishParsingChildren(); 280 CharacterData::finishParsingChildren();
281 } 281 }
282 282
283 } // namespace 283 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/Node.cpp ('k') | Source/core/dom/SelectorQuery.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698