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

Unified Diff: Source/WebCore/testing/Internals.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/testing/Internals.cpp
===================================================================
--- Source/WebCore/testing/Internals.cpp (revision 136959)
+++ Source/WebCore/testing/Internals.cpp (working copy)
@@ -71,6 +71,7 @@
#include "Settings.h"
#include "ShadowRoot.h"
#include "SpellChecker.h"
+#include "StyleSheetContents.h"
#include "TextIterator.h"
#include "TreeScope.h"
#include "ViewportArguments.h"
@@ -1281,6 +1282,22 @@
settings()->allowRoundingHacks();
}
+void Internals::insertAuthorCSS(Document* document, const String& css) const
+{
+ RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document);
+ parsedSheet->setIsUserStyleSheet(false);
+ parsedSheet->parseString(css);
+ document->styleSheetCollection()->addAuthorSheet(parsedSheet);
+}
+
+void Internals::insertUserCSS(Document* document, const String& css) const
+{
+ RefPtr<StyleSheetContents> parsedSheet = StyleSheetContents::create(document);
+ parsedSheet->setIsUserStyleSheet(true);
+ parsedSheet->parseString(css);
+ document->styleSheetCollection()->addUserSheet(parsedSheet);
+}
+
String Internals::counterValue(Element* element)
{
if (!element)
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698