• hyatt@apple.com's avatar
    https://bugs.webkit.org/show_bug.cgi?id=29892 · 5d1c0e78
    hyatt@apple.com authored
    Add support for whitelist patterns to control conditional injection of user scripts and
    user stylesheets.
    
    Reviewed by Jon Honeycutt.
    
    No new tests. Not testable until WebKit portion is added in followup patch.
    
    * GNUmakefile.am:
    * WebCore.gypi:
    * WebCore.pro:
    * WebCore.vcproj/WebCore.vcproj:
    * WebCore.xcodeproj/project.pbxproj:
    * dom/Document.cpp:
    (WebCore::Document::pageGroupUserSheets):
    * page/Frame.cpp:
    (WebCore::Frame::injectUserScriptsForWorld):
    * page/UserContentURLPattern.cpp: Added.
    (WebCore::UserContentURLPattern::matchesPatterns):
    (WebCore::UserContentURLPattern::parse):
    (WebCore::UserContentURLPattern::matches):
    (WebCore::UserContentURLPattern::matchesHost):
    (WebCore::MatchTester::MatchTester):
    (WebCore::MatchTester::testStringFinished):
    (WebCore::MatchTester::patternStringFinished):
    (WebCore::MatchTester::eatWildcard):
    (WebCore::MatchTester::eatSameChars):
    (WebCore::MatchTester::test):
    (WebCore::UserContentURLPattern::matchesPath):
    * page/UserContentURLPattern.h: Added.
    (WebCore::UserContentURLPattern::UserContentURLPattern):
    (WebCore::UserContentURLPattern::scheme):
    (WebCore::UserContentURLPattern::host):
    (WebCore::UserContentURLPattern::path):
    (WebCore::UserContentURLPattern::matchSubdomains):
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    5d1c0e78
Document.cpp 145 KB