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

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

Issue 2101143005: 0 -> nullptr for UseCounter pointer in CSSParserContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Typo Created 4 years, 5 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
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 } 192 }
193 193
194 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas eURL, const String& charset, const CSSStyleSheetResource* sheet) 194 void ProcessingInstruction::setCSSStyleSheet(const String& href, const KURL& bas eURL, const String& charset, const CSSStyleSheetResource* sheet)
195 { 195 {
196 if (!inShadowIncludingDocument()) { 196 if (!inShadowIncludingDocument()) {
197 DCHECK(!m_sheet); 197 DCHECK(!m_sheet);
198 return; 198 return;
199 } 199 }
200 200
201 DCHECK(m_isCSS); 201 DCHECK(m_isCSS);
202 CSSParserContext parserContext(document(), 0, baseURL, charset); 202 CSSParserContext parserContext(document(), nullptr, baseURL, charset);
203 203
204 StyleSheetContents* newSheet = StyleSheetContents::create(href, parserContex t); 204 StyleSheetContents* newSheet = StyleSheetContents::create(href, parserContex t);
205 205
206 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, this); 206 CSSStyleSheet* cssSheet = CSSStyleSheet::create(newSheet, this);
207 cssSheet->setDisabled(m_alternate); 207 cssSheet->setDisabled(m_alternate);
208 cssSheet->setTitle(m_title); 208 cssSheet->setTitle(m_title);
209 cssSheet->setMediaQueries(MediaQuerySet::create(m_media)); 209 cssSheet->setMediaQueries(MediaQuerySet::create(m_media));
210 210
211 m_sheet = cssSheet; 211 m_sheet = cssSheet;
212 212
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
295 295
296 DEFINE_TRACE(ProcessingInstruction) 296 DEFINE_TRACE(ProcessingInstruction)
297 { 297 {
298 visitor->trace(m_sheet); 298 visitor->trace(m_sheet);
299 visitor->trace(m_listenerForXSLT); 299 visitor->trace(m_listenerForXSLT);
300 CharacterData::trace(visitor); 300 CharacterData::trace(visitor);
301 ResourceOwner<StyleSheetResource>::trace(visitor); 301 ResourceOwner<StyleSheetResource>::trace(visitor);
302 } 302 }
303 303
304 } // namespace blink 304 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/CSSSelectorWatch.cpp ('k') | third_party/WebKit/Source/core/html/HTMLContentElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698