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

Side by Side Diff: Source/WebKit/chromium/src/WebDocument.cpp

Issue 11412177: Merge 135316 - When calling DocumentStyleSheetCollection::addUserSheet, pass in a user sheet (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 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 | « Source/WebKit/chromium/ChangeLog ('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 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 WebNode WebDocument::focusedNode() const 187 WebNode WebDocument::focusedNode() const
188 { 188 {
189 return WebNode(constUnwrap<Document>()->focusedNode()); 189 return WebNode(constUnwrap<Document>()->focusedNode());
190 } 190 }
191 191
192 WebDocumentType WebDocument::doctype() const 192 WebDocumentType WebDocument::doctype() const
193 { 193 {
194 return WebDocumentType(constUnwrap<Document>()->doctype()); 194 return WebDocumentType(constUnwrap<Document>()->doctype());
195 } 195 }
196 196
197 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev el level) 197 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev el)
198 { 198 {
199 RefPtr<Document> document = unwrap<Document>(); 199 RefPtr<Document> document = unwrap<Document>();
200 200
201 // FIXME: We currently ignore the passed in UserStyleLevel. http://crbug.com /162096
201 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document .get()); 202 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document .get());
202 parsedSheet->setIsUserStyleSheet(level == UserStyleUserLevel); 203 parsedSheet->setIsUserStyleSheet(true);
203 parsedSheet->parseString(sourceCode); 204 parsedSheet->parseString(sourceCode);
204 document->styleSheetCollection()->addUserSheet(parsedSheet.release()); 205 document->styleSheetCollection()->addUserSheet(parsedSheet.release());
205 } 206 }
206 207
207 void WebDocument::cancelFullScreen() 208 void WebDocument::cancelFullScreen()
208 { 209 {
209 #if ENABLE(FULLSCREEN_API) 210 #if ENABLE(FULLSCREEN_API)
210 unwrap<Document>()->webkitCancelFullScreen(); 211 unwrap<Document>()->webkitCancelFullScreen();
211 #endif 212 #endif
212 } 213 }
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 m_private = elem; 286 m_private = elem;
286 return *this; 287 return *this;
287 } 288 }
288 289
289 WebDocument::operator PassRefPtr<Document>() const 290 WebDocument::operator PassRefPtr<Document>() const
290 { 291 {
291 return static_cast<Document*>(m_private.get()); 292 return static_cast<Document*>(m_private.get());
292 } 293 }
293 294
294 } // namespace WebKit 295 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698