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

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

Issue 11471034: Merge 136878 (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') | Source/WebKit2/ChangeLog » ('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 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) 197 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev el styleLevel)
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
202 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document .get()); 201 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document .get());
203 parsedSheet->setIsUserStyleSheet(true); 202 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel);
204 parsedSheet->parseString(sourceCode); 203 parsedSheet->parseString(sourceCode);
205 document->styleSheetCollection()->addUserSheet(parsedSheet.release()); 204 if (parsedSheet->isUserStyleSheet())
205 document->styleSheetCollection()->addUserSheet(parsedSheet);
206 else
207 document->styleSheetCollection()->addAuthorSheet(parsedSheet);
206 } 208 }
207 209
208 void WebDocument::cancelFullScreen() 210 void WebDocument::cancelFullScreen()
209 { 211 {
210 #if ENABLE(FULLSCREEN_API) 212 #if ENABLE(FULLSCREEN_API)
211 unwrap<Document>()->webkitCancelFullScreen(); 213 unwrap<Document>()->webkitCancelFullScreen();
212 #endif 214 #endif
213 } 215 }
214 216
215 WebElement WebDocument::fullScreenElement() const 217 WebElement WebDocument::fullScreenElement() const
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 m_private = elem; 288 m_private = elem;
287 return *this; 289 return *this;
288 } 290 }
289 291
290 WebDocument::operator PassRefPtr<Document>() const 292 WebDocument::operator PassRefPtr<Document>() const
291 { 293 {
292 return static_cast<Document*>(m_private.get()); 294 return static_cast<Document*>(m_private.get());
293 } 295 }
294 296
295 } // namespace WebKit 297 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/ChangeLog ('k') | Source/WebKit2/ChangeLog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698