Make UserScript and UserStyleSheet value objects that are copyable
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Oct 2012 21:55:53 +0000 (21:55 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 14 Oct 2012 21:55:53 +0000 (21:55 +0000)
commit2486ca8886b992df2b9ffadb36a47d43ab1314bd
treedab2dee2b6f0c7b9695448aec0e63dcac128254e
parente522a750b56f05cc95b2c024074c399d8933699b
Make UserScript and UserStyleSheet value objects that are copyable
https://bugs.webkit.org/show_bug.cgi?id=99275

Reviewed by Tim Horton.

Source/WebCore:

Simplify UserScript and UserStyleSheet and make them more easily usable
without sticking them in an OwnPtr.

* WebCore.exp.in:
Update exports.

* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
* page/PageGroup.h:
(PageGroup):
* page/UserContentURLPattern.cpp:
(WebCore::UserContentURLPattern::matchesPatterns):
* page/UserContentURLPattern.h:
(UserContentURLPattern):
Update to not assume whitelist and blacklist are in Vector<String>*.

* page/UserScript.h:
(UserScript):
(WebCore::UserScript::UserScript):
(WebCore::UserScript::whitelist):
(WebCore::UserScript::blacklist):
* page/UserStyleSheet.h:
(UserStyleSheet):
(WebCore::UserStyleSheet::UserStyleSheet):
(WebCore::UserStyleSheet::whitelist):
(WebCore::UserStyleSheet::blacklist):
Switch OwnPtr<Vector<String> > to Vector<String> and remove Noncopyable restriction.

Source/WebKit/chromium:

* src/WebViewImpl.cpp:
(WebKit::WebView::addUserScript):
(WebKit::WebView::addUserStyleSheet):
Update for new PageGroup function signatures.

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::addUserScript):
(DumpRenderTreeSupportEfl::addUserStyleSheet):
Update for new PageGroup function signatures.

Source/WebKit/mac:

* WebView/WebView.mm:
(-[WebView _injectMailQuirksScript]):
(-[WebView _injectOutlookQuirksScript]):
Update for new PageGroup function signatures.

Source/WebKit2:

* Shared/UserContentContainer.cpp:
(WebKit::toStringVector):
(WebKit::UserContentContainer::Item::Item):
(WebKit::UserContentContainer::Item::encode):
(WebKit::UserContentContainer::Item::decode):
* Shared/UserContentContainer.h:
(WebKit::UserContentContainer::Item::whitelist):
(WebKit::UserContentContainer::Item::blacklist):
Switch UserContentContainer::Item to store Vector<String> instead of ImmutableArray, easing
transition to new PageGroup function signatures.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::toStringVector):
* WebProcess/WebPage/qt/WebPageQt.cpp:
(WebKit::WebPage::setUserScripts):
Update for new PageGroup function signatures.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@131275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/page/PageGroup.cpp
Source/WebCore/page/PageGroup.h
Source/WebCore/page/UserContentURLPattern.cpp
Source/WebCore/page/UserContentURLPattern.h
Source/WebCore/page/UserScript.h
Source/WebCore/page/UserStyleSheet.h
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebViewImpl.cpp
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/UserContentContainer.cpp
Source/WebKit2/Shared/UserContentContainer.h
Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
Source/WebKit2/WebProcess/WebPage/qt/WebPageQt.cpp