Changeset 48222 in webkit
- Timestamp:
- Sep 9, 2009 2:12:10 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r48220 r48222 1 2009-09-09 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Adam Roben. 4 5 https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar 6 to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately 7 to all Frames in the PageGroup. 8 9 Added userscripts/simple-stylesheet.html test case. 10 11 * platform/mac/userscripts/simple-stylesheet-expected.checksum: Added. 12 * platform/mac/userscripts/simple-stylesheet-expected.png: Added. 13 * platform/mac/userscripts/simple-stylesheet-expected.txt: Added. 14 * userscripts/simple-stylesheet.html: Added. 15 1 16 2009-09-09 Carol Szabo <carol.szabo@nokia.com> 2 17 -
trunk/WebCore/ChangeLog
r48220 r48222 1 2009-09-09 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Adam Roben. 4 5 https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar 6 to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately 7 to all Frames in the PageGroup. 8 9 Added userscripts/simple-stylesheet.html test case. 10 11 * WebCore.base.exp: 12 * WebCore.gypi: 13 * WebCore.vcproj/WebCore.vcproj: 14 * WebCore.xcodeproj/project.pbxproj: 15 * css/CSSStyleSelector.cpp: 16 (WebCore::CSSStyleSelector::CSSStyleSelector): 17 * css/CSSStyleSelector.h: 18 * dom/Document.cpp: 19 (WebCore::Document::Document): 20 (WebCore::Document::attach): 21 (WebCore::Document::pageGroupUserSheets): 22 (WebCore::Document::clearPageGroupUserSheets): 23 (WebCore::Document::recalcStyleSelector): 24 * dom/Document.h: 25 * loader/PlaceholderDocument.cpp: 26 (WebCore::PlaceholderDocument::attach): 27 * page/PageGroup.cpp: 28 (WebCore::PageGroup::addUserStyleSheet): 29 (WebCore::PageGroup::removeUserContentForWorld): 30 (WebCore::PageGroup::removeAllUserContent): 31 * page/PageGroup.h: 32 (WebCore::PageGroup::userStyleSheets): 33 * page/UserStyleSheet.h: Added. 34 (WebCore::UserStyleSheet::UserStyleSheet): 35 (WebCore::UserStyleSheet::source): 36 (WebCore::UserStyleSheet::url): 37 (WebCore::UserStyleSheet::patterns): 38 (WebCore::UserStyleSheet::worldID): 39 * page/UserStyleSheetTypes.h: Added. 40 1 41 2009-09-09 Carol Szabo <carol.szabo@nokia.com> 2 42 -
trunk/WebCore/WebCore.base.exp
r48144 r48222 745 745 __ZN7WebCore9PageCache27releaseAutoreleasedPagesNowEv 746 746 __ZN7WebCore9PageGroup13addUserScriptERKNS_6StringERKNS_4KURLERKN3WTF6VectorIS1_Lm0EEEjNS_23UserScriptInjectionTimeE 747 __ZN7WebCore9PageGroup17addUserStyleSheetERKNS_6StringERKNS_4KURLERKN3WTF6VectorIS1_Lm0EEEj 747 748 __ZN7WebCore9PageGroup14addVisitedLinkEPKtm 748 749 __ZN7WebCore9PageGroup20removeAllUserContentEv -
trunk/WebCore/WebCore.gypi
r48167 r48222 1702 1702 'page/UserScript.h', 1703 1703 'page/UserScriptTypes.h', 1704 'page/UserStyleSheet.h', 1705 'page/UserStyleSheetTypes.h', 1704 1706 'page/WebKitPoint.h', 1705 1707 'page/WindowFeatures.cpp', -
trunk/WebCore/WebCore.vcproj/WebCore.vcproj
r48171 r48222 17069 17069 > 17070 17070 </File> 17071 <File17071 <File 17072 17072 RelativePath="..\page\UserScript.h" 17073 17073 > 17074 17074 </File> 17075 <File17075 <File 17076 17076 RelativePath="..\page\UserScriptTypes.h" 17077 > 17078 </File> 17079 <File 17080 RelativePath="..\page\UserStyleSheet.h" 17081 > 17082 </File> 17083 <File 17084 RelativePath="..\page\UserStyleSheetTypes.h" 17077 17085 > 17078 17086 </File> -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r48181 r48222 4272 4272 BC8B853E0E7C7F1100AB6984 /* ScrollbarThemeMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8B853C0E7C7F1100AB6984 /* ScrollbarThemeMac.h */; }; 4273 4273 BC8B854B0E7C7F5600AB6984 /* ScrollbarTheme.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8B854A0E7C7F5600AB6984 /* ScrollbarTheme.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4274 BC8BF151105813BF00A40A07 /* UserStyleSheet.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8BF150105813BF00A40A07 /* UserStyleSheet.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4275 BC8BF15A1058141800A40A07 /* UserStyleSheetTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8BF1591058141800A40A07 /* UserStyleSheetTypes.h */; settings = {ATTRIBUTES = (Private, ); }; }; 4274 4276 BC8C8FAD0DDCD31B00B592F4 /* RenderStyle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC8C8FAB0DDCD31B00B592F4 /* RenderStyle.cpp */; }; 4275 4277 BC8C8FAE0DDCD31B00B592F4 /* RenderStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8C8FAC0DDCD31B00B592F4 /* RenderStyle.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 9337 9339 BC8B853C0E7C7F1100AB6984 /* ScrollbarThemeMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarThemeMac.h; sourceTree = "<group>"; }; 9338 9340 BC8B854A0E7C7F5600AB6984 /* ScrollbarTheme.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollbarTheme.h; sourceTree = "<group>"; }; 9341 BC8BF150105813BF00A40A07 /* UserStyleSheet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserStyleSheet.h; sourceTree = "<group>"; }; 9342 BC8BF1591058141800A40A07 /* UserStyleSheetTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserStyleSheetTypes.h; sourceTree = "<group>"; }; 9339 9343 BC8C8FAB0DDCD31B00B592F4 /* RenderStyle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RenderStyle.cpp; path = style/RenderStyle.cpp; sourceTree = "<group>"; }; 9340 9344 BC8C8FAC0DDCD31B00B592F4 /* RenderStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RenderStyle.h; path = style/RenderStyle.h; sourceTree = "<group>"; }; … … 11050 11054 BCA2B0601050475F0043BD1C /* UserScript.h */, 11051 11055 BCA2B08A10505BCD0043BD1C /* UserScriptTypes.h */, 11056 BC8BF150105813BF00A40A07 /* UserStyleSheet.h */, 11057 BC8BF1591058141800A40A07 /* UserStyleSheetTypes.h */, 11052 11058 494BD7930F55C8EE00747828 /* WebKitPoint.h */, 11053 11059 494BD7940F55C8EE00747828 /* WebKitPoint.idl */, … … 17789 17795 49EED1471051969400099FAB /* JSCanvasRenderingContext3D.h in Headers */, 17790 17796 59C77F2B10545B3B00506104 /* GeolocationServiceMock.h in Headers */, 17797 BC8BF151105813BF00A40A07 /* UserStyleSheet.h in Headers */, 17798 BC8BF15A1058141800A40A07 /* UserStyleSheetTypes.h in Headers */, 17791 17799 ); 17792 17800 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/css/CSSStyleSelector.cpp
r48181 r48222 409 409 } 410 410 411 CSSStyleSelector::CSSStyleSelector(Document* doc, CSSStyleSheet* userSheet, StyleSheetList* styleSheets, CSSStyleSheet* mappedElementSheet, bool strictParsing, bool matchAuthorAndUserStyles) 411 CSSStyleSelector::CSSStyleSelector(Document* doc, StyleSheetList* styleSheets, CSSStyleSheet* mappedElementSheet, 412 CSSStyleSheet* pageUserSheet, const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets, 413 bool strictParsing, bool matchAuthorAndUserStyles) 412 414 : m_backgroundData(BackgroundFillLayer) 413 415 , m_checker(doc, strictParsing) … … 450 452 451 453 // FIXME: This sucks! The user sheet is reparsed every time! 452 if ( userSheet) {454 if (pageUserSheet || pageGroupUserSheets) { 453 455 m_userStyle = new CSSRuleSet(); 454 m_userStyle->addRulesFromSheet(userSheet, *m_medium, this); 456 if (pageUserSheet) 457 m_userStyle->addRulesFromSheet(pageUserSheet, *m_medium, this); 458 if (pageGroupUserSheets) { 459 unsigned length = pageGroupUserSheets->size(); 460 for (unsigned i = 0; i < length; i++) 461 m_userStyle->addRulesFromSheet(pageGroupUserSheets->at(i).get(), *m_medium, this); 462 } 455 463 } 456 464 -
trunk/WebCore/css/CSSStyleSelector.h
r48181 r48222 81 81 class CSSStyleSelector : public Noncopyable { 82 82 public: 83 CSSStyleSelector(Document*, CSSStyleSheet* userStyleSheet, StyleSheetList* authorSheets, CSSStyleSheet* mappedElementSheet, 83 CSSStyleSelector(Document*, StyleSheetList* authorSheets, CSSStyleSheet* mappedElementSheet, 84 CSSStyleSheet* pageUserSheet, const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets, 84 85 bool strictParsing, bool matchAuthorAndUserStyles); 85 86 ~CSSStyleSelector(); -
trunk/WebCore/dom/Document.cpp
r48188 r48222 95 95 #include "OverflowEvent.h" 96 96 #include "Page.h" 97 #include "PageGroup.h" 97 98 #include "PageTransitionEvent.h" 98 99 #include "PlatformKeyboardEvent.h" … … 350 351 m_document = this; 351 352 353 m_pageGroupUserSheetCacheValid = false; 354 352 355 m_printing = false; 353 356 … … 1377 1380 if (Settings* docSettings = settings()) 1378 1381 matchAuthorAndUserStyles = docSettings->authorAndUserStylesEnabled(); 1379 m_styleSelector = new CSSStyleSelector(this, pageUserSheet(), m_styleSheets.get(), m_mappedElementSheet.get(), !inCompatMode(), matchAuthorAndUserStyles); 1382 m_styleSelector = new CSSStyleSelector(this, m_styleSheets.get(), m_mappedElementSheet.get(), pageUserSheet(), pageGroupUserSheets(), 1383 !inCompatMode(), matchAuthorAndUserStyles); 1380 1384 } 1381 1385 … … 1939 1943 { 1940 1944 m_pageUserSheet = 0; 1945 updateStyleSelector(); 1946 } 1947 1948 const Vector<RefPtr<CSSStyleSheet> >* Document::pageGroupUserSheets() const 1949 { 1950 if (m_pageGroupUserSheetCacheValid) 1951 return m_pageGroupUserSheets.get(); 1952 1953 m_pageGroupUserSheetCacheValid = true; 1954 1955 Page* owningPage = page(); 1956 if (!owningPage) 1957 return 0; 1958 1959 const PageGroup& pageGroup = owningPage->group(); 1960 const UserStyleSheetMap* sheetsMap = pageGroup.userStyleSheets(); 1961 if (!sheetsMap) 1962 return 0; 1963 1964 UserStyleSheetMap::const_iterator end = sheetsMap->end(); 1965 for (UserStyleSheetMap::const_iterator it = sheetsMap->begin(); it != end; ++it) { 1966 const UserStyleSheetVector* sheets = it->second; 1967 for (unsigned i = 0; i < sheets->size(); ++i) { 1968 const UserStyleSheet* sheet = sheets->at(i).get(); 1969 RefPtr<CSSStyleSheet> parsedSheet = CSSStyleSheet::create(const_cast<Document*>(this)); 1970 parsedSheet->parseString(sheet->source(), !inCompatMode()); 1971 if (!m_pageGroupUserSheets) 1972 m_pageGroupUserSheets.set(new Vector<RefPtr<CSSStyleSheet> >); 1973 m_pageGroupUserSheets->append(parsedSheet.release()); 1974 } 1975 } 1976 1977 return m_pageGroupUserSheets.get(); 1978 } 1979 1980 void Document::clearPageGroupUserSheets() 1981 { 1982 m_pageGroupUserSheets.clear(); 1983 m_pageGroupUserSheetCacheValid = false; 1941 1984 updateStyleSelector(); 1942 1985 } … … 2503 2546 // Create a new style selector 2504 2547 delete m_styleSelector; 2505 m_styleSelector = new CSSStyleSelector(this, pageUserSheet(), m_styleSheets.get(), m_mappedElementSheet.get(), !inCompatMode(), matchAuthorAndUserStyles); 2548 m_styleSelector = new CSSStyleSelector(this, m_styleSheets.get(), m_mappedElementSheet.get(), 2549 pageUserSheet(), pageGroupUserSheets(), !inCompatMode(), matchAuthorAndUserStyles); 2506 2550 m_didCalculateStyleSelector = true; 2507 2551 } -
trunk/WebCore/dom/Document.h
r48188 r48222 445 445 void clearPageUserSheet(); 446 446 447 const Vector<RefPtr<CSSStyleSheet> >* pageGroupUserSheets() const; 448 void clearPageGroupUserSheets(); 449 447 450 CSSStyleSheet* elementSheet(); 448 451 CSSStyleSheet* mappedElementSheet(); … … 935 938 RefPtr<CSSStyleSheet> m_mappedElementSheet; 936 939 RefPtr<CSSStyleSheet> m_pageUserSheet; 937 940 mutable OwnPtr<Vector<RefPtr<CSSStyleSheet> > > m_pageGroupUserSheets; 941 mutable bool m_pageGroupUserSheetCacheValid; 942 938 943 bool m_printing; 939 944 -
trunk/WebCore/loader/PlaceholderDocument.cpp
r48181 r48222 38 38 if (!styleSelector()) { 39 39 RefPtr<StyleSheetList> styleSheetList = StyleSheetList::create(this); 40 setStyleSelector(new CSSStyleSelector(this, pageUserSheet(), styleSheetList.get(), 0, true, false));40 setStyleSelector(new CSSStyleSelector(this, styleSheetList.get(), 0, pageUserSheet(), pageGroupUserSheets(), true, false)); 41 41 } 42 42 -
trunk/WebCore/page/PageGroup.cpp
r48057 r48222 29 29 #include "ChromeClient.h" 30 30 #include "Document.h" 31 #include "Frame.h" 31 32 #include "Page.h" 32 33 #include "Settings.h" … … 213 214 } 214 215 216 void PageGroup::addUserStyleSheet(const String& source, const KURL& url, const Vector<String>& patterns, unsigned worldID) 217 { 218 if (worldID == UINT_MAX) 219 return; 220 OwnPtr<UserStyleSheet> userStyleSheet(new UserStyleSheet(source, url, patterns, worldID)); 221 if (!m_userStyleSheets) 222 m_userStyleSheets.set(new UserStyleSheetMap); 223 UserStyleSheetVector*& styleSheetsInWorld = m_userStyleSheets->add(worldID, 0).first->second; 224 if (!styleSheetsInWorld) 225 styleSheetsInWorld = new UserStyleSheetVector; 226 styleSheetsInWorld->append(userStyleSheet.release()); 227 228 // Clear our cached sheets and have them just reparse. 229 HashSet<Page*>::const_iterator end = m_pages.end(); 230 for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) { 231 for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext()) 232 frame->document()->clearPageGroupUserSheets(); 233 } 234 } 235 215 236 void PageGroup::removeUserContentForWorld(unsigned worldID) 216 237 { 217 if (!m_userScripts) 218 return; 219 220 UserScriptMap::iterator it = m_userScripts->find(worldID); 221 if (it != m_userScripts->end()) { 222 m_userScripts->remove(it); 223 delete it->second; 238 if (m_userScripts) { 239 UserScriptMap::iterator it = m_userScripts->find(worldID); 240 if (it != m_userScripts->end()) { 241 m_userScripts->remove(it); 242 delete it->second; 243 } 244 } 245 246 if (m_userStyleSheets) { 247 UserStyleSheetMap::iterator it = m_userStyleSheets->find(worldID); 248 if (it != m_userStyleSheets->end()) { 249 m_userStyleSheets->remove(it); 250 delete it->second; 251 } 224 252 } 225 253 } … … 231 259 m_userScripts.clear(); 232 260 } 261 262 263 if (m_userStyleSheets) { 264 deleteAllValues(*m_userStyleSheets); 265 m_userStyleSheets.clear(); 266 } 233 267 } 234 268 -
trunk/WebCore/page/PageGroup.h
r48057 r48222 32 32 #include "StringHash.h" 33 33 #include "UserScript.h" 34 #include "UserStyleSheet.h" 34 35 35 36 namespace WebCore { … … 73 74 unsigned worldID, UserScriptInjectionTime); 74 75 const UserScriptMap* userScripts() const { return m_userScripts.get(); } 75 76 77 void addUserStyleSheet(const String& source, const KURL&, const Vector<String>& patterns, unsigned worldID); 78 const UserStyleSheetMap* userStyleSheets() const { return m_userStyleSheets.get(); } 79 76 80 void removeUserContentForWorld(unsigned); 77 81 void removeAllUserContent(); … … 93 97 94 98 OwnPtr<UserScriptMap> m_userScripts; 99 OwnPtr<UserStyleSheetMap> m_userStyleSheets; 95 100 }; 96 101 -
trunk/WebCore/page/UserScriptTypes.h
r48057 r48222 37 37 38 38 typedef Vector<OwnPtr<UserScript> > UserScriptVector; 39 typedef HashMap< int, UserScriptVector*> UserScriptMap;39 typedef HashMap<unsigned, UserScriptVector*> UserScriptMap; 40 40 41 41 } // namsepace WebCore -
trunk/WebKit/mac/ChangeLog
r48144 r48222 1 2009-09-09 Dave Hyatt <hyatt@apple.com> 2 3 Reviewed by Adam Roben. 4 5 https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection. This is similar 6 to user script injection but allows for user stylesheets to be added. The stylesheets are applied immediately 7 to all Frames in the PageGroup. 8 9 Added userscripts/simple-stylesheet.html test case. 10 11 * WebView/WebView.mm: 12 (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]): 13 * WebView/WebViewPrivate.h: 14 1 15 2009-09-07 Steve Block <steveblock@google.com> 2 16 -
trunk/WebKit/mac/WebView/WebView.mm
r48057 r48222 2134 2134 } 2135 2135 2136 + (void)_addUserStyleSheetToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID patterns:(NSArray *)patterns 2137 { 2138 String group(groupName); 2139 if (group.isEmpty() || worldID == UINT_MAX) 2140 return; 2141 2142 PageGroup* pageGroup = PageGroup::pageGroup(group); 2143 if (!pageGroup) 2144 return; 2145 2146 // Convert the patterns into a Vector. 2147 Vector<String> patternsVector; 2148 NSUInteger count = [patterns count]; 2149 for (NSUInteger i = 0; i < count; ++i) { 2150 id entry = [patterns objectAtIndex: i]; 2151 if ([entry isKindOfClass:[NSString class]]) 2152 patternsVector.append(String((NSString*)entry)); 2153 } 2154 2155 pageGroup->addUserStyleSheet(source, url, patternsVector, worldID); 2156 } 2157 2136 2158 + (void)_removeUserContentFromGroup:(NSString *)groupName worldID:(unsigned)worldID 2137 2159 { -
trunk/WebKit/mac/WebView/WebViewPrivate.h
r48057 r48222 459 459 460 460 + (void)_addUserScriptToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID patterns:(NSArray *)patterns injectionTime:(WebUserScriptInjectionTime)injectionTime; 461 + (void)_addUserStyleSheetToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID patterns:(NSArray *)patterns; 461 462 + (void)_removeUserContentFromGroup:(NSString *)groupName worldID:(unsigned)worldID; 462 463 + (void)_removeAllUserContentFromGroup:(NSString *)groupName; -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.cpp
r48156 r48222 969 969 } 970 970 971 static JSValueRef addUserStyleSheetCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) 972 { 973 if (argumentCount != 1) 974 return JSValueMakeUndefined(context); 975 976 JSRetainPtr<JSStringRef> source(Adopt, JSValueToStringCopy(context, arguments[0], exception)); 977 ASSERT(!*exception); 978 979 LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject)); 980 controller->addUserStyleSheet(source.get()); 981 return JSValueMakeUndefined(context); 982 } 983 971 984 // Static Values 972 985 … … 1046 1059 { "addDisallowedURL", addDisallowedURLCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1047 1060 { "addUserScript", addUserScriptCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1061 { "addUserStyleSheet", addUserStyleSheetCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1048 1062 { "clearAllDatabases", clearAllDatabasesCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 1049 1063 { "clearBackForwardList", clearBackForwardListCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, -
trunk/WebKitTools/DumpRenderTree/LayoutTestController.h
r48156 r48222 189 189 190 190 void addUserScript(JSStringRef source, bool runAtStart); 191 void addUserStyleSheet(JSStringRef source); 191 192 192 193 void setGeolocationPermission(bool allow); -
trunk/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
r48144 r48222 467 467 printf("LayoutTestController::addUserScript not implemented.\n"); 468 468 } 469 470 void LayoutTestController::addUserStyleSheet(JSStringRef source) 471 { 472 printf("LayoutTestController::addUserStyleSheet not implemented.\n"); 473 } -
trunk/WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
r48144 r48222 485 485 [WebView _addUserScriptToGroup:@"org.webkit.DumpRenderTree" source:sourceNS url:nil worldID:1 patterns:nil injectionTime:(runAtStart ? WebInjectAtDocumentStart : WebInjectAtDocumentEnd)]; 486 486 } 487 488 void LayoutTestController::addUserStyleSheet(JSStringRef source) 489 { 490 RetainPtr<CFStringRef> sourceCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, source)); 491 NSString *sourceNS = (NSString *)sourceCF.get(); 492 [WebView _addUserStyleSheetToGroup:@"org.webkit.DumpRenderTree" source:sourceNS url:nil worldID:1 patterns:nil]; 493 } 494 -
trunk/WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
r48144 r48222 849 849 printf("LayoutTestController::addUserScript not implemented.\n"); 850 850 } 851 852 853 void LayoutTestController::addUserStyleSheet(JSStringRef source) 854 { 855 printf("LayoutTestController::addUserStyleSheet not implemented.\n"); 856 } -
trunk/WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
r48144 r48222 294 294 printf("LayoutTestController::addUserScript not implemented.\n"); 295 295 } 296 297 void LayoutTestController::addUserStyleSheet(JSStringRef source) 298 { 299 printf("LayoutTestController::addUserStyleSheet not implemented.\n"); 300 }
Note: See TracChangeset
for help on using the changeset viewer.