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

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

Issue 23516012: Rename StyleSheetCollections to StyleEngine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/testing/Internals.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 #include "bindings/v8/ScriptState.h" 44 #include "bindings/v8/ScriptState.h"
45 #include "bindings/v8/ScriptValue.h" 45 #include "bindings/v8/ScriptValue.h"
46 #include "core/accessibility/AXObjectCache.h" 46 #include "core/accessibility/AXObjectCache.h"
47 #include "core/css/CSSParserMode.h" 47 #include "core/css/CSSParserMode.h"
48 #include "core/css/StyleSheetContents.h" 48 #include "core/css/StyleSheetContents.h"
49 #include "core/dom/Document.h" 49 #include "core/dom/Document.h"
50 #include "core/dom/DocumentType.h" 50 #include "core/dom/DocumentType.h"
51 #include "core/dom/Element.h" 51 #include "core/dom/Element.h"
52 #include "core/dom/FullscreenElementStack.h" 52 #include "core/dom/FullscreenElementStack.h"
53 #include "core/dom/NodeList.h" 53 #include "core/dom/NodeList.h"
54 #include "core/dom/StyleSheetCollections.h" 54 #include "core/dom/StyleEngine.h"
55 #include "core/html/HTMLAllCollection.h" 55 #include "core/html/HTMLAllCollection.h"
56 #include "core/html/HTMLBodyElement.h" 56 #include "core/html/HTMLBodyElement.h"
57 #include "core/html/HTMLCollection.h" 57 #include "core/html/HTMLCollection.h"
58 #include "core/html/HTMLElement.h" 58 #include "core/html/HTMLElement.h"
59 #include "core/html/HTMLFormElement.h" 59 #include "core/html/HTMLFormElement.h"
60 #include "core/html/HTMLHeadElement.h" 60 #include "core/html/HTMLHeadElement.h"
61 #include "core/loader/DocumentLoader.h" 61 #include "core/loader/DocumentLoader.h"
62 #include "core/rendering/RenderObject.h" 62 #include "core/rendering/RenderObject.h"
63 #include "public/platform/WebURL.h" 63 #include "public/platform/WebURL.h"
64 #include "weborigin/SecurityOrigin.h" 64 #include "weborigin/SecurityOrigin.h"
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 } 201 }
202 202
203 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev el styleLevel) 203 void WebDocument::insertUserStyleSheet(const WebString& sourceCode, UserStyleLev el styleLevel)
204 { 204 {
205 RefPtr<Document> document = unwrap<Document>(); 205 RefPtr<Document> document = unwrap<Document>();
206 ASSERT(document); 206 ASSERT(document);
207 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*documen t.get()); 207 RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(*documen t.get());
208 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel); 208 parsedSheet->setIsUserStyleSheet(styleLevel == UserStyleUserLevel);
209 parsedSheet->parseString(sourceCode); 209 parsedSheet->parseString(sourceCode);
210 if (parsedSheet->isUserStyleSheet()) 210 if (parsedSheet->isUserStyleSheet())
211 document->styleSheetCollections()->addUserSheet(parsedSheet); 211 document->styleEngine()->addUserSheet(parsedSheet);
212 else 212 else
213 document->styleSheetCollections()->addAuthorSheet(parsedSheet); 213 document->styleEngine()->addAuthorSheet(parsedSheet);
214 } 214 }
215 215
216 void WebDocument::cancelFullScreen() 216 void WebDocument::cancelFullScreen()
217 { 217 {
218 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(unwrap<Document>())) 218 if (FullscreenElementStack* fullscreen = FullscreenElementStack::fromIfExist s(unwrap<Document>()))
219 fullscreen->webkitCancelFullScreen(); 219 fullscreen->webkitCancelFullScreen();
220 } 220 }
221 221
222 WebElement WebDocument::fullScreenElement() const 222 WebElement WebDocument::fullScreenElement() const
223 { 223 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 m_private = elem; 300 m_private = elem;
301 return *this; 301 return *this;
302 } 302 }
303 303
304 WebDocument::operator PassRefPtr<Document>() const 304 WebDocument::operator PassRefPtr<Document>() const
305 { 305 {
306 return toDocument(m_private.get()); 306 return toDocument(m_private.get());
307 } 307 }
308 308
309 } // namespace WebKit 309 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698