Skip to content
  • hyatt@apple.com's avatar
    WebCore: https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user... · 63e0ac2f
    hyatt@apple.com authored
    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: http://svn.webkit.org/repository/webkit/trunk@48222 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    63e0ac2f