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

Side by Side Diff: third_party/WebKit/Source/web/WebDocument.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) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 WebElement WebDocument::focusedElement() const 207 WebElement WebDocument::focusedElement() const
208 { 208 {
209 return WebElement(constUnwrap<Document>()->focusedElement()); 209 return WebElement(constUnwrap<Document>()->focusedElement());
210 } 210 }
211 211
212 void WebDocument::insertStyleSheet(const WebString& sourceCode) 212 void WebDocument::insertStyleSheet(const WebString& sourceCode)
213 { 213 {
214 Document* document = unwrap<Document>(); 214 Document* document = unwrap<Document>();
215 DCHECK(document); 215 DCHECK(document);
216 StyleSheetContents* parsedSheet = StyleSheetContents::create(CSSParserContex t(*document, 0)); 216 StyleSheetContents* parsedSheet = StyleSheetContents::create(CSSParserContex t(*document, nullptr));
217 parsedSheet->parseString(sourceCode); 217 parsedSheet->parseString(sourceCode);
218 document->styleEngine().injectAuthorSheet(parsedSheet); 218 document->styleEngine().injectAuthorSheet(parsedSheet);
219 } 219 }
220 220
221 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) 221 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
222 { 222 {
223 Document* document = unwrap<Document>(); 223 Document* document = unwrap<Document>();
224 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document); 224 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document);
225 if (!watch && webSelectors.isEmpty()) 225 if (!watch && webSelectors.isEmpty())
226 return; 226 return;
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 m_private = elem; 327 m_private = elem;
328 return *this; 328 return *this;
329 } 329 }
330 330
331 WebDocument::operator Document*() const 331 WebDocument::operator Document*() const
332 { 332 {
333 return toDocument(m_private.get()); 333 return toDocument(m_private.get());
334 } 334 }
335 335
336 } // namespace blink 336 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698