| 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)
|
|
|