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

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

Issue 1493323002: Renamed authorStyleSheets to injectedAuthorStyleSheets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | no next file » | 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) 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 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 { 209 {
210 return WebElement(constUnwrap<Document>()->focusedElement()); 210 return WebElement(constUnwrap<Document>()->focusedElement());
211 } 211 }
212 212
213 void WebDocument::insertStyleSheet(const WebString& sourceCode) 213 void WebDocument::insertStyleSheet(const WebString& sourceCode)
214 { 214 {
215 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 215 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
216 ASSERT(document); 216 ASSERT(document);
217 RefPtrWillBeRawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::cre ate(CSSParserContext(*document, 0)); 217 RefPtrWillBeRawPtr<StyleSheetContents> parsedSheet = StyleSheetContents::cre ate(CSSParserContext(*document, 0));
218 parsedSheet->parseString(sourceCode); 218 parsedSheet->parseString(sourceCode);
219 document->styleEngine().addAuthorSheet(parsedSheet); 219 document->styleEngine().injectAuthorSheet(parsedSheet);
220 } 220 }
221 221
222 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) 222 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
223 { 223 {
224 RefPtrWillBeRawPtr<Document> document = unwrap<Document>(); 224 RefPtrWillBeRawPtr<Document> document = unwrap<Document>();
225 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document); 225 CSSSelectorWatch* watch = CSSSelectorWatch::fromIfExists(*document);
226 if (!watch && webSelectors.isEmpty()) 226 if (!watch && webSelectors.isEmpty())
227 return; 227 return;
228 Vector<String> selectors; 228 Vector<String> selectors;
229 selectors.append(webSelectors.data(), webSelectors.size()); 229 selectors.append(webSelectors.data(), webSelectors.size());
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 m_private = elem; 334 m_private = elem;
335 return *this; 335 return *this;
336 } 336 }
337 337
338 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const 338 WebDocument::operator PassRefPtrWillBeRawPtr<Document>() const
339 { 339 {
340 return toDocument(m_private.get()); 340 return toDocument(m_private.get());
341 } 341 }
342 342
343 } // namespace blink 343 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698