WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user styleshe...
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Sep 2009 21:12:10 +0000 (21:12 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Sep 2009 21:12:10 +0000 (21:12 +0000)
commite3d8f007a8e23868281b3641755f4849bad4f762
tree22b1fa244991dbb01cb90ed346b97dfd028eeb9c
parent719c7ec791e20e312082d37fe787067ba7d53018
WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
to all Frames in the PageGroup.

Reviewed by Adam Roben.

Added userscripts/simple-stylesheet.html test case.

* WebCore.base.exp:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* css/CSSStyleSelector.cpp:
(WebCore::CSSStyleSelector::CSSStyleSelector):
* css/CSSStyleSelector.h:
* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::attach):
(WebCore::Document::pageGroupUserSheets):
(WebCore::Document::clearPageGroupUserSheets):
(WebCore::Document::recalcStyleSelector):
* dom/Document.h:
* loader/PlaceholderDocument.cpp:
(WebCore::PlaceholderDocument::attach):
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserStyleSheet):
(WebCore::PageGroup::removeUserContentForWorld):
(WebCore::PageGroup::removeAllUserContent):
* page/PageGroup.h:
(WebCore::PageGroup::userStyleSheets):
* page/UserStyleSheet.h: Added.
(WebCore::UserStyleSheet::UserStyleSheet):
(WebCore::UserStyleSheet::source):
(WebCore::UserStyleSheet::url):
(WebCore::UserStyleSheet::patterns):
(WebCore::UserStyleSheet::worldID):
* page/UserStyleSheetTypes.h: Added.

WebKit/mac: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
to all Frames in the PageGroup.

Reviewed by Adam Roben.

Added userscripts/simple-stylesheet.html test case.

* WebView/WebView.mm:
(+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
* WebView/WebViewPrivate.h:

LayoutTests: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
to all Frames in the PageGroup.

Reviewed by Adam Roben.

Added userscripts/simple-stylesheet.html test case.

* platform/mac/userscripts/simple-stylesheet-expected.checksum: Added.
* platform/mac/userscripts/simple-stylesheet-expected.png: Added.
* platform/mac/userscripts/simple-stylesheet-expected.txt: Added.
* userscripts/simple-stylesheet.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@48222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
27 files changed:
LayoutTests/ChangeLog
LayoutTests/userscripts/simple-stylesheet-expected.txt [new file with mode: 0644]
LayoutTests/userscripts/simple-stylesheet.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/WebCore.base.exp
WebCore/WebCore.gypi
WebCore/WebCore.vcproj/WebCore.vcproj
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/css/CSSStyleSelector.cpp
WebCore/css/CSSStyleSelector.h
WebCore/dom/Document.cpp
WebCore/dom/Document.h
WebCore/loader/PlaceholderDocument.cpp
WebCore/page/PageGroup.cpp
WebCore/page/PageGroup.h
WebCore/page/UserScriptTypes.h
WebCore/page/UserStyleSheet.h [new file with mode: 0644]
WebCore/page/UserStyleSheetTypes.h [new file with mode: 0644]
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewPrivate.h
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp