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

Side by Side Diff: third_party/WebKit/Source/web/WebDocument.cpp

Issue 1839643009: RELEASE_ASSERT -> CHECK and ASSERT -> DCHECK in web. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Return DCHECK_IS_ON checks. Created 4 years, 8 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 } 205 }
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 RawPtr<Document> document = unwrap<Document>(); 214 RawPtr<Document> document = unwrap<Document>();
215 ASSERT(document); 215 DCHECK(document);
216 RawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse rContext(*document, 0)); 216 RawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse rContext(*document, 0));
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 RawPtr<Document> document = unwrap<Document>(); 223 RawPtr<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())
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 m_private = elem; 340 m_private = elem;
341 return *this; 341 return *this;
342 } 342 }
343 343
344 WebDocument::operator RawPtr<Document>() const 344 WebDocument::operator RawPtr<Document>() const
345 { 345 {
346 return toDocument(m_private.get()); 346 return toDocument(m_private.get());
347 } 347 }
348 348
349 } // namespace blink 349 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebDevToolsFrontendImpl.cpp ('k') | third_party/WebKit/Source/web/WebElementTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698