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

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

Issue 143203006: Remove insertUserStyleSheet function and enum UserStyleSheet. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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
« no previous file with comments | « no previous file | public/web/WebDocument.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) 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 WebNode WebDocument::focusedNode() const 199 WebNode WebDocument::focusedNode() const
200 { 200 {
201 return WebNode(constUnwrap<Document>()->focusedElement()); 201 return WebNode(constUnwrap<Document>()->focusedElement());
202 } 202 }
203 203
204 WebDocumentType WebDocument::doctype() const 204 WebDocumentType WebDocument::doctype() const
205 { 205 {
206 return WebDocumentType(constUnwrap<Document>()->doctype()); 206 return WebDocumentType(constUnwrap<Document>()->doctype());
207 } 207 }
208 208
209 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev el)
210 {
211 insertStyleSheet(sourceCode);
212 }
213
214 void WebDocument::insertStyleSheet(const WebString& sourceCode) 209 void WebDocument::insertStyleSheet(const WebString& sourceCode)
215 { 210 {
216 RefPtr<Document> document = unwrap<Document>(); 211 RefPtr<Document> document = unwrap<Document>();
217 ASSERT(document); 212 ASSERT(document);
218 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse rContext(*document.get(), 0)); 213 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(CSSParse rContext(*document.get(), 0));
219 parsedSheet->parseString(sourceCode); 214 parsedSheet->parseString(sourceCode);
220 document->styleEngine()->addAuthorSheet(parsedSheet); 215 document->styleEngine()->addAuthorSheet(parsedSheet);
221 } 216 }
222 217
223 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors) 218 void WebDocument::watchCSSSelectors(const WebVector<WebString>& webSelectors)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
315 m_private = elem; 310 m_private = elem;
316 return *this; 311 return *this;
317 } 312 }
318 313
319 WebDocument::operator PassRefPtr<Document>() const 314 WebDocument::operator PassRefPtr<Document>() const
320 { 315 {
321 return toDocument(m_private.get()); 316 return toDocument(m_private.get());
322 } 317 }
323 318
324 } // namespace blink 319 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | public/web/WebDocument.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698