2010-07-08 Aaron Boodman <aa@chromium.org>
authoraa@chromium.org <aa@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jul 2010 01:15:07 +0000 (01:15 +0000)
committeraa@chromium.org <aa@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 9 Jul 2010 01:15:07 +0000 (01:15 +0000)
commitbcf04b70d5602ec7a3cc29e45e9f862975013429
tree20bdfeb1973ccaffd16baa4a87514257114c573b
parent5beb510b0d2435a0f4ef7828fc63aec906143f51
2010-07-08  Aaron Boodman  <aa@chromium.org>

        Reviewed by Timothy Hatcher.

        Add the ability for user scripts and user styles to affect just the top frame.

        https://bugs.webkit.org/show_bug.cgi?id=41529

        * platform/win/Skipped: Skipped test because WebKit API needs updating.
        * userscripts/mixed-case-stylesheet.html: Added new allFrames param.
        * userscripts/resources/frame1.html: Added.
        * userscripts/resources/frame2.html: Added.
        * userscripts/script-not-run-for-fragments.html: Added new allFrames param.
        * userscripts/script-run-at-end.html: Ditto.
        * userscripts/script-run-at-start.html: Ditto.
        * userscripts/simple-stylesheet.html: Ditto.
        * userscripts/user-script-all-frames-expected.txt: Added.
        * userscripts/user-script-all-frames.html: Added.
        * userscripts/user-script-top-frame-only-expected.txt: Added.
        * userscripts/user-script-top-frame-only.html: Added.
        * userscripts/user-style-all-frames-expected.txt: Added.
        * userscripts/user-style-all-frames.html: Added.
        * userscripts/user-style-top-frame-only-expected.txt: Added.
        * userscripts/user-style-top-frame-only.html: Added.
2010-07-08  Aaron Boodman  <aa@chromium.org>

        Reviewed by Timothy Hatcher.

        Add the ability for user scripts and user styles to affect just the top frame.

        https://bugs.webkit.org/show_bug.cgi?id=41529

        Tests: userscripts/user-script-all-frames.html
               userscripts/user-script-top-frame-only.html
               userscripts/user-style-all-frames.html
               userscripts/user-style-top-frame-only.html

        * WebCore.base.exp: Update PageGroup method signatures.
        * dom/Document.cpp:
        (WebCore::Document::pageGroupUserSheets): Check allFrames before injecting.
        * page/Frame.cpp:
        (WebCore::Frame::injectUserScriptsForWorld): Ditto.
        * page/PageGroup.cpp:
        (WebCore::PageGroup::addUserScriptToWorld):
        (WebCore::PageGroup::addUserStyleSheetToWorld):
        * page/PageGroup.h:
        * page/UserScript.h:
        (WebCore::UserScript::UserScript):
        (WebCore::UserScript::injectedFrames):
        * page/UserScriptTypes.h:
        (WebCore::):
        * page/UserStyleSheet.h:
        (WebCore::UserStyleSheet::UserStyleSheet):
        (WebCore::UserStyleSheet::injectedFrames):
2010-07-08  Aaron Boodman  <aa@chromium.org>

        Reviewed by Timothy Hatcher.

        Add the ability for user scripts and user styles to affect just the top frame.

        https://bugs.webkit.org/show_bug.cgi?id=41529

        * public/WebView.h:
        (WebKit::WebView::):
        (WebKit::WebView::addUserScript):
        (WebKit::WebView::addUserStyleSheet):
        * src/AssertMatchingEnums.cpp:
        * src/WebViewImpl.cpp:
        (WebKit::WebView::addUserScript):
        (WebKit::WebView::addUserStyleSheet):
2010-07-08  Aaron Boodman  <aa@chromium.org>

        Reviewed by Timothy Hatcher.

        Add the ability for user scripts and user styles to affect just the top frame.

        https://bugs.webkit.org/show_bug.cgi?id=41529

        * WebView/WebView.mm:
        (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
        (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
        (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
        (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
        * WebView/WebViewPrivate.h:
2010-07-08  Aaron Boodman  <aa@chromium.org>

        Reviewed by Timothy Hatcher.

        Add the ability for user scripts and user styles to affect just the top frame.

        https://bugs.webkit.org/show_bug.cgi?id=41529

        * WebView.cpp:
        (WebView::addUserScriptToGroup):
        (WebView::addUserStyleSheetToGroup):
2010-07-08  Aaron Boodman  <aa@chromium.org>

        Reviewed by Timothy Hatcher.

        Add the ability for user scripts and user styles to affect just the top frame.

        https://bugs.webkit.org/show_bug.cgi?id=41529

        * DumpRenderTree/LayoutTestController.h: Added new allFrames param.
        * DumpRenderTree/LayoutTestController.cpp: Ditto.
        (addUserScriptCallback):
        (addUserStyleSheetCallback):
        * DumpRenderTree/chromium/LayoutTestController.cpp: Ditto.
        (LayoutTestController::addUserScript):
        (LayoutTestController::addUserStyleSheet):
        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp: Ditto.
        (LayoutTestController::addUserScript):
        (LayoutTestController::addUserStyleSheet):
        * DumpRenderTree/mac/LayoutTestControllerMac.mm: Ditto.
        (LayoutTestController::addUserScript):
        (LayoutTestController::addUserStyleSheet):
        * DumpRenderTree/win/LayoutTestControllerWin.cpp: Ditto.
        (LayoutTestController::addUserScript):
        (LayoutTestController::addUserStyleSheet):
        * DumpRenderTree/wx/LayoutTestControllerWx.cpp: Ditto.
        (LayoutTestController::addUserScript):
        (LayoutTestController::addUserStyleSheet):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@62876 268f45cc-cd09-0410-ab3c-d52691b4dbfc
46 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/win/Skipped
LayoutTests/userscripts/mixed-case-stylesheet.html
LayoutTests/userscripts/resources/frame1.html [new file with mode: 0644]
LayoutTests/userscripts/resources/frame2.html [new file with mode: 0644]
LayoutTests/userscripts/script-not-run-for-fragments.html
LayoutTests/userscripts/script-run-at-end.html
LayoutTests/userscripts/script-run-at-start.html
LayoutTests/userscripts/simple-stylesheet.html
LayoutTests/userscripts/user-script-all-frames-expected.txt [new file with mode: 0644]
LayoutTests/userscripts/user-script-all-frames.html [new file with mode: 0644]
LayoutTests/userscripts/user-script-top-frame-only-expected.txt [new file with mode: 0644]
LayoutTests/userscripts/user-script-top-frame-only.html [new file with mode: 0644]
LayoutTests/userscripts/user-style-all-frames-expected.txt [new file with mode: 0644]
LayoutTests/userscripts/user-style-all-frames.html [new file with mode: 0644]
LayoutTests/userscripts/user-style-top-frame-only-expected.txt [new file with mode: 0644]
LayoutTests/userscripts/user-style-top-frame-only.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/GNUmakefile.am
WebCore/WebCore.exp.in
WebCore/WebCore.gypi
WebCore/WebCore.xcodeproj/project.pbxproj
WebCore/dom/Document.cpp
WebCore/page/Frame.cpp
WebCore/page/PageGroup.cpp
WebCore/page/PageGroup.h
WebCore/page/UserContentTypes.h [new file with mode: 0644]
WebCore/page/UserScript.h
WebCore/page/UserStyleSheet.h
WebKit/chromium/ChangeLog
WebKit/chromium/public/WebView.h
WebKit/chromium/src/AssertMatchingEnums.cpp
WebKit/chromium/src/WebViewImpl.cpp
WebKit/mac/ChangeLog
WebKit/mac/WebView/WebView.mm
WebKit/mac/WebView/WebViewPrivate.h
WebKit/win/ChangeLog
WebKit/win/WebView.cpp
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/LayoutTestController.cpp
WebKitTools/DumpRenderTree/LayoutTestController.h
WebKitTools/DumpRenderTree/chromium/LayoutTestController.cpp
WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
WebKitTools/DumpRenderTree/mac/LayoutTestControllerMac.mm
WebKitTools/DumpRenderTree/win/LayoutTestControllerWin.cpp
WebKitTools/DumpRenderTree/wx/LayoutTestControllerWx.cpp