[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
hyatt at apple.com
hyatt at apple.com
Thu Oct 29 20:44:09 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 844f6fef47df98ad94e2f2842e0e36c7fe7f5d09
Author: hyatt at apple.com <hyatt at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Wed Oct 14 01:37:13 2009 +0000
WebCore: Change the order of arguments on some of the user stylesheet/script functions. Split the removal functions
out into separate ones for scripts and stylesheets.
Reviewed by Adam Roben.
* WebCore.base.exp:
* page/PageGroup.cpp:
(WebCore::PageGroup::addUserScriptToWorld):
(WebCore::PageGroup::addUserStyleSheetToWorld):
(WebCore::PageGroup::removeUserScriptFromWorld):
(WebCore::PageGroup::removeUserStyleSheetFromWorld):
(WebCore::PageGroup::removeUserScriptsFromWorld):
(WebCore::PageGroup::removeUserStyleSheetsFromWorld):
* page/PageGroup.h:
(WebCore::PageGroup::userScripts):
(WebCore::PageGroup::userStyleSheets):
WebKit/mac: Change the order of arguments on some methods. Split removal for user stylesheets and script into
separate functions based off the type of object being removed.
Reviewed by Adam Roben.
* WebView/WebView.mm:
(+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
(+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
(+[WebView _removeUserScriptFromGroup:worldID:url:]):
(+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
(+[WebView _removeUserScriptsFromGroup:worldID:]):
(+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
* WebView/WebViewPrivate.h:
WebKit/win: Split removal functions for user scripts and stylehseets based on type.
Reviewed by Adam Roben..
* Interfaces/IWebViewPrivate.idl:
* WebView.cpp:
(WebView::removeUserScriptFromGroup):
(WebView::removeUserStyleSheetFromGroup):
* WebView.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49541 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c4254cf..08e0107 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,22 @@
+2009-10-13 Dave Hyatt <hyatt at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Change the order of arguments on some of the user stylesheet/script functions. Split the removal functions
+ out into separate ones for scripts and stylesheets.
+
+ * WebCore.base.exp:
+ * page/PageGroup.cpp:
+ (WebCore::PageGroup::addUserScriptToWorld):
+ (WebCore::PageGroup::addUserStyleSheetToWorld):
+ (WebCore::PageGroup::removeUserScriptFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetFromWorld):
+ (WebCore::PageGroup::removeUserScriptsFromWorld):
+ (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
+ * page/PageGroup.h:
+ (WebCore::PageGroup::userScripts):
+ (WebCore::PageGroup::userStyleSheets):
+
2009-10-13 Evan Martin <evan at chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebCore/WebCore.base.exp b/WebCore/WebCore.base.exp
index 5bf52cb..4020142 100644
--- a/WebCore/WebCore.base.exp
+++ b/WebCore/WebCore.base.exp
@@ -721,16 +721,18 @@ __ZN7WebCore9HTMLNames9iframeTagE
__ZN7WebCore9HTMLNames9scriptTagE
__ZN7WebCore9PageCache11setCapacityEi
__ZN7WebCore9PageCache27releaseAutoreleasedPagesNowEv
-__ZN7WebCore9PageGroup17addUserStyleSheetERKNS_6StringERKNS_4KURLEN3WTF10PassOwnPtrINS7_6VectorIS1_Lm0EEEEESB_j
-__ZN7WebCore9PageGroup13addUserScriptERKNS_6StringERKNS_4KURLEN3WTF10PassOwnPtrINS7_6VectorIS1_Lm0EEEEESB_jNS_23UserScriptInjectionTimeE
__ZN7WebCore9PageGroup14addVisitedLinkEPKtm
__ZN7WebCore9PageGroup17closeLocalStorageEv
__ZN7WebCore9PageGroup20removeAllUserContentEv
__ZN7WebCore9PageGroup21removeAllVisitedLinksEv
-__ZN7WebCore9PageGroup32removeUserContentWithURLForWorldERKNS_4KURLEj
-__ZN7WebCore9PageGroup25removeUserContentForWorldEj
__ZN7WebCore9PageGroup26setShouldTrackVisitedLinksEb
__ZN7WebCore9PageGroup9pageGroupERKNS_6StringE
+__ZN7WebCore9PageGroup25removeUserScriptFromWorldEjRKNS_4KURLE
+__ZN7WebCore9PageGroup29removeUserStyleSheetFromWorldEjRKNS_4KURLE
+__ZN7WebCore9PageGroup26removeUserScriptsFromWorldEj
+__ZN7WebCore9PageGroup24addUserStyleSheetToWorldEjRKNS_6StringERKNS_4KURLEN3WTF10PassOwnPtrINS7_6VectorIS1_Lm0EEEEESB_
+__ZN7WebCore9PageGroup20addUserScriptToWorldEjRKNS_6StringERKNS_4KURLEN3WTF10PassOwnPtrINS7_6VectorIS1_Lm0EEEEESB_NS_23UserScriptInjectionTimeE
+__ZN7WebCore9PageGroup30removeUserStyleSheetsFromWorldEj
__ZN7WebCore9TimerBase4stopEv
__ZN7WebCore9TimerBase5startEdd
__ZN7WebCore9TimerBaseC2Ev
diff --git a/WebCore/page/PageGroup.cpp b/WebCore/page/PageGroup.cpp
index cf6ba37..427c240 100644
--- a/WebCore/page/PageGroup.cpp
+++ b/WebCore/page/PageGroup.cpp
@@ -200,8 +200,8 @@ StorageNamespace* PageGroup::localStorage()
}
#endif
-void PageGroup::addUserScript(const String& source, const KURL& url, PassOwnPtr<Vector<String> > whitelist,
- PassOwnPtr<Vector<String> > blacklist, unsigned worldID, UserScriptInjectionTime injectionTime)
+void PageGroup::addUserScriptToWorld(unsigned worldID, const String& source, const KURL& url, PassOwnPtr<Vector<String> > whitelist,
+ PassOwnPtr<Vector<String> > blacklist, UserScriptInjectionTime injectionTime)
{
if (worldID == UINT_MAX)
return;
@@ -214,8 +214,8 @@ void PageGroup::addUserScript(const String& source, const KURL& url, PassOwnPtr
scriptsInWorld->append(userScript.release());
}
-void PageGroup::addUserStyleSheet(const String& source, const KURL& url, PassOwnPtr<Vector<String> > whitelist,
- PassOwnPtr<Vector<String> > blacklist, unsigned worldID)
+void PageGroup::addUserStyleSheetToWorld(unsigned worldID, const String& source, const KURL& url, PassOwnPtr<Vector<String> > whitelist,
+ PassOwnPtr<Vector<String> > blacklist)
{
if (worldID == UINT_MAX)
return;
@@ -235,80 +235,92 @@ void PageGroup::addUserStyleSheet(const String& source, const KURL& url, PassOwn
}
}
-void PageGroup::removeUserContentWithURLForWorld(const KURL& url, unsigned worldID)
+void PageGroup::removeUserScriptFromWorld(unsigned worldID, const KURL& url)
{
- if (m_userScripts) {
- UserScriptMap::iterator it = m_userScripts->find(worldID);
- if (it != m_userScripts->end()) {
- UserScriptVector* scripts = it->second;
- for (int i = scripts->size() - 1; i >= 0; --i) {
- if (scripts->at(i)->url() == url)
- scripts->remove(i);
- }
-
- if (scripts->isEmpty()) {
- delete it->second;
- m_userScripts->remove(it);
- }
- }
+ if (!m_userScripts)
+ return;
+
+ UserScriptMap::iterator it = m_userScripts->find(worldID);
+ if (it == m_userScripts->end())
+ return;
+
+ UserScriptVector* scripts = it->second;
+ for (int i = scripts->size() - 1; i >= 0; --i) {
+ if (scripts->at(i)->url() == url)
+ scripts->remove(i);
}
- if (m_userStyleSheets) {
- UserStyleSheetMap::iterator it = m_userStyleSheets->find(worldID);
- bool sheetsChanged = false;
- if (it != m_userStyleSheets->end()) {
- UserStyleSheetVector* stylesheets = it->second;
- for (int i = stylesheets->size() - 1; i >= 0; --i) {
- if (stylesheets->at(i)->url() == url) {
- stylesheets->remove(i);
- sheetsChanged = true;
- }
- }
-
- if (stylesheets->isEmpty()) {
- delete it->second;
- m_userStyleSheets->remove(it);
- }
+ if (!scripts->isEmpty())
+ return;
+
+ delete it->second;
+ m_userScripts->remove(it);
+}
+
+void PageGroup::removeUserStyleSheetFromWorld(unsigned worldID, const KURL& url)
+{
+ if (!m_userStyleSheets)
+ return;
+
+ UserStyleSheetMap::iterator it = m_userStyleSheets->find(worldID);
+ bool sheetsChanged = false;
+ if (it == m_userStyleSheets->end())
+ return;
+
+ UserStyleSheetVector* stylesheets = it->second;
+ for (int i = stylesheets->size() - 1; i >= 0; --i) {
+ if (stylesheets->at(i)->url() == url) {
+ stylesheets->remove(i);
+ sheetsChanged = true;
}
+ }
- // Clear our cached sheets and have them just reparse.
- if (sheetsChanged) {
- HashSet<Page*>::const_iterator end = m_pages.end();
- for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->document()->clearPageGroupUserSheets();
- }
- }
+ if (!sheetsChanged)
+ return;
+
+ if (!stylesheets->isEmpty()) {
+ delete it->second;
+ m_userStyleSheets->remove(it);
+ }
+
+ // Clear our cached sheets and have them just reparse.
+ HashSet<Page*>::const_iterator end = m_pages.end();
+ for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
+ frame->document()->clearPageGroupUserSheets();
}
}
-void PageGroup::removeUserContentForWorld(unsigned worldID)
+void PageGroup::removeUserScriptsFromWorld(unsigned worldID)
{
- if (m_userScripts) {
- UserScriptMap::iterator it = m_userScripts->find(worldID);
- if (it != m_userScripts->end()) {
- delete it->second;
- m_userScripts->remove(it);
- }
- }
+ if (!m_userScripts)
+ return;
+
+ UserScriptMap::iterator it = m_userScripts->find(worldID);
+ if (it == m_userScripts->end())
+ return;
+
+ delete it->second;
+ m_userScripts->remove(it);
+}
+
+void PageGroup::removeUserStyleSheetsFromWorld(unsigned worldID)
+{
+ if (!m_userStyleSheets)
+ return;
- if (m_userStyleSheets) {
- bool sheetsChanged = false;
- UserStyleSheetMap::iterator it = m_userStyleSheets->find(worldID);
- if (it != m_userStyleSheets->end()) {
- delete it->second;
- m_userStyleSheets->remove(it);
- sheetsChanged = true;
- }
+ UserStyleSheetMap::iterator it = m_userStyleSheets->find(worldID);
+ if (it == m_userStyleSheets->end())
+ return;
- if (sheetsChanged) {
- // Clear our cached sheets and have them just reparse.
- HashSet<Page*>::const_iterator end = m_pages.end();
- for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
- for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
- frame->document()->clearPageGroupUserSheets();
- }
- }
+ delete it->second;
+ m_userStyleSheets->remove(it);
+
+ // Clear our cached sheets and have them just reparse.
+ HashSet<Page*>::const_iterator end = m_pages.end();
+ for (HashSet<Page*>::const_iterator it = m_pages.begin(); it != end; ++it) {
+ for (Frame* frame = (*it)->mainFrame(); frame; frame = frame->tree()->traverseNext())
+ frame->document()->clearPageGroupUserSheets();
}
}
diff --git a/WebCore/page/PageGroup.h b/WebCore/page/PageGroup.h
index 7ea2967..c233cd1 100644
--- a/WebCore/page/PageGroup.h
+++ b/WebCore/page/PageGroup.h
@@ -70,20 +70,23 @@ namespace WebCore {
bool hasLocalStorage() { return m_localStorage; }
#endif
- void addUserScript(const String& source, const KURL&,
- PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
- unsigned worldID, UserScriptInjectionTime);
- const UserScriptMap* userScripts() const { return m_userScripts.get(); }
+ void addUserScriptToWorld(unsigned worldID, const String& source, const KURL&,
+ PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
+ UserScriptInjectionTime);
+ void addUserStyleSheetToWorld(unsigned worldID, const String& source, const KURL&,
+ PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist);
- void addUserStyleSheet(const String& source, const KURL&,
- PassOwnPtr<Vector<String> > whitelist, PassOwnPtr<Vector<String> > blacklist,
- unsigned worldID);
- const UserStyleSheetMap* userStyleSheets() const { return m_userStyleSheets.get(); }
+ void removeUserScriptFromWorld(unsigned, const KURL&);
+ void removeUserStyleSheetFromWorld(unsigned, const KURL&);
- void removeUserContentForWorld(unsigned);
- void removeUserContentWithURLForWorld(const KURL&, unsigned);
+ void removeUserScriptsFromWorld(unsigned);
+ void removeUserStyleSheetsFromWorld(unsigned);
+
void removeAllUserContent();
+ const UserScriptMap* userScripts() const { return m_userScripts.get(); }
+ const UserStyleSheetMap* userStyleSheets() const { return m_userStyleSheets.get(); }
+
private:
void addVisitedLink(LinkHash stringHash);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 9c42339..992de38 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-13 Dave Hyatt <hyatt at apple.com>
+
+ Reviewed by Adam Roben.
+
+ Change the order of arguments on some methods. Split removal for user stylesheets and script into
+ separate functions based off the type of object being removed.
+
+ * WebView/WebView.mm:
+ (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
+ (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
+ (+[WebView _removeUserScriptFromGroup:worldID:url:]):
+ (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
+ (+[WebView _removeUserScriptsFromGroup:worldID:]):
+ (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
+ * WebView/WebViewPrivate.h:
+
2009-10-13 Anders Carlsson <andersca at apple.com>
Reviewed by Sam Weinig.
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 9d1fe8c..40b6379 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -2150,7 +2150,7 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
return patternsVector;
}
-+ (void)_addUserScriptToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID
++ (void)_addUserScriptToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url
whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime
{
String group(groupName);
@@ -2161,11 +2161,11 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->addUserScript(source, url, toStringVector(whitelist), toStringVector(blacklist), worldID,
- injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
+ pageGroup->addUserScriptToWorld(worldID, source, url, toStringVector(whitelist), toStringVector(blacklist),
+ injectionTime == WebInjectAtDocumentStart ? InjectAtDocumentStart : InjectAtDocumentEnd);
}
-+ (void)_addUserStyleSheetToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID
++ (void)_addUserStyleSheetToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url
whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist
{
String group(groupName);
@@ -2176,10 +2176,10 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->addUserStyleSheet(source, url, toStringVector(whitelist), toStringVector(blacklist), worldID);
+ pageGroup->addUserStyleSheetToWorld(worldID, source, url, toStringVector(whitelist), toStringVector(blacklist));
}
-+ (void)_removeUserContentFromGroup:(NSString *)groupName url:(NSURL *)url worldID:(unsigned)worldID
++ (void)_removeUserScriptFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url
{
String group(groupName);
if (group.isEmpty())
@@ -2189,10 +2189,10 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->removeUserContentWithURLForWorld(url, worldID);
+ pageGroup->removeUserScriptFromWorld(worldID, url);
}
-+ (void)_removeUserContentFromGroup:(NSString *)groupName worldID:(unsigned)worldID
++ (void)_removeUserStyleSheetFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url
{
String group(groupName);
if (group.isEmpty())
@@ -2202,7 +2202,33 @@ static PassOwnPtr<Vector<String> > toStringVector(NSArray* patterns)
if (!pageGroup)
return;
- pageGroup->removeUserContentForWorld(worldID);
+ pageGroup->removeUserStyleSheetFromWorld(worldID, url);
+}
+
++ (void)_removeUserScriptsFromGroup:(NSString *)groupName worldID:(unsigned)worldID
+{
+ String group(groupName);
+ if (group.isEmpty())
+ return;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ if (!pageGroup)
+ return;
+
+ pageGroup->removeUserScriptsFromWorld(worldID);
+}
+
++ (void)_removeUserStyleSheetsFromGroup:(NSString *)groupName worldID:(unsigned)worldID
+{
+ String group(groupName);
+ if (group.isEmpty())
+ return;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ if (!pageGroup)
+ return;
+
+ pageGroup->removeUserStyleSheetsFromWorld(worldID);
}
+ (void)_removeAllUserContentFromGroup:(NSString *)groupName
diff --git a/WebKit/mac/WebView/WebViewPrivate.h b/WebKit/mac/WebView/WebViewPrivate.h
index b4cafc2..20610cc 100644
--- a/WebKit/mac/WebView/WebViewPrivate.h
+++ b/WebKit/mac/WebView/WebViewPrivate.h
@@ -474,10 +474,12 @@ Could be worth adding to the API.
// Removes all white list entries created with _whiteListAccessFromOrigin.
+ (void)_resetOriginAccessWhiteLists;
-+ (void)_addUserScriptToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime;
-+ (void)_addUserStyleSheetToGroup:(NSString *)groupName source:(NSString *)source url:(NSURL *)url worldID:(unsigned)worldID whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist;
-+ (void)_removeUserContentFromGroup:(NSString *)groupName url:(NSURL *)url worldID:(unsigned)worldID;
-+ (void)_removeUserContentFromGroup:(NSString *)groupName worldID:(unsigned)worldID;
++ (void)_addUserScriptToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist injectionTime:(WebUserScriptInjectionTime)injectionTime;
++ (void)_addUserStyleSheetToGroup:(NSString *)groupName worldID:(unsigned)worldID source:(NSString *)source url:(NSURL *)url whitelist:(NSArray *)whitelist blacklist:(NSArray *)blacklist;
++ (void)_removeUserScriptFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url;
++ (void)_removeUserStyleSheetFromGroup:(NSString *)groupName worldID:(unsigned)worldID url:(NSURL *)url;
++ (void)_removeUserScriptsFromGroup:(NSString *)groupName worldID:(unsigned)worldID;
++ (void)_removeUserStyleSheetsFromGroup:(NSString *)groupName worldID:(unsigned)worldID;
+ (void)_removeAllUserContentFromGroup:(NSString *)groupName;
/*!
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 94f7263..aa098bb 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,15 @@
+2009-10-13 Dave Hyatt <hyatt at apple.com>
+
+ Reviewed by Adam Roben..
+
+ Split removal functions for user scripts and stylehseets based on type.
+
+ * Interfaces/IWebViewPrivate.idl:
+ * WebView.cpp:
+ (WebView::removeUserScriptFromGroup):
+ (WebView::removeUserStyleSheetFromGroup):
+ * WebView.h:
+
2009-10-09 Adam Barth <abarth at webkit.org>
Reviewed by Darin Adler.
diff --git a/WebKit/win/Interfaces/IWebViewPrivate.idl b/WebKit/win/Interfaces/IWebViewPrivate.idl
index 465d804..003464a 100644
--- a/WebKit/win/Interfaces/IWebViewPrivate.idl
+++ b/WebKit/win/Interfaces/IWebViewPrivate.idl
@@ -190,8 +190,10 @@ interface IWebViewPrivate : IUnknown
HRESULT addUserStyleSheetToGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR source, [in] BSTR url,
[in] unsigned whitelistCount, [in, size_is(whitelistCount)] BSTR* whitelist,
[in] unsigned blacklistCount, [in, size_is(blacklistCount)] BSTR* blacklist);
- HRESULT removeUserContentWithURLFromGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR url);
- HRESULT removeUserContentFromGroup([in] BSTR groupName, [in] unsigned worldID);
+ HRESULT removeUserScriptFromGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR url);
+ HRESULT removeUserStyleSheetFromGroup([in] BSTR groupName, [in] unsigned worldID, [in] BSTR url);
+ HRESULT removeUserScriptsFromGroup([in] BSTR groupName, [in] unsigned worldID);
+ HRESULT removeUserStyleSheetsFromGroup([in] BSTR groupName, [in] unsigned worldID);
HRESULT removeAllUserContentFromGroup([in] BSTR groupName);
HRESULT setPluginHalterDelegate([in] IWebPluginHalterDelegate* d);
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 4b60bf3..69d2079 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -5479,7 +5479,7 @@ HRESULT WebView::addUserStyleSheetToGroup(BSTR groupName, unsigned worldID, BSTR
return S_OK;
}
-HRESULT WebView::removeUserContentWithURLFromGroup(BSTR groupName, unsigned worldID, BSTR url)
+HRESULT WebView::removeUserScriptFromGroup(BSTR groupName, unsigned worldID, BSTR url)
{
String group(groupName, SysStringLen(groupName));
if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
@@ -5490,12 +5490,12 @@ HRESULT WebView::removeUserContentWithURLFromGroup(BSTR groupName, unsigned worl
if (!pageGroup)
return E_FAIL;
- pageGroup->removeUserContentWithURLForWorld(KURL(KURL(), String(url, SysStringLen(url))), worldID);
+ pageGroup->removeUserScriptFromWorld(worldID, KURL(KURL(), String(url, SysStringLen(url))));
return S_OK;
}
-HRESULT WebView::removeUserContentFromGroup(BSTR groupName, unsigned worldID)
+HRESULT WebView::removeUserStyleSheetFromGroup(BSTR groupName, unsigned worldID, BSTR url)
{
String group(groupName, SysStringLen(groupName));
if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
@@ -5506,7 +5506,38 @@ HRESULT WebView::removeUserContentFromGroup(BSTR groupName, unsigned worldID)
if (!pageGroup)
return E_FAIL;
- pageGroup->removeUserContentForWorld(worldID);
+ pageGroup->removeUserStyleSheetFromWorld(worldID, KURL(KURL(), String(url, SysStringLen(url))));
+
+ return S_OK;
+}
+
+HRESULT WebView::removeUserScriptFromGroup(BSTR groupName, unsigned worldID)
+{
+ String group(groupName, SysStringLen(groupName));
+ if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
+ return E_INVALIDARG;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ ASSERT(pageGroup);
+ if (!pageGroup)
+ return E_FAIL;
+
+ pageGroup->removeUserScriptFromWorld(worldID);
+ return S_OK;
+}
+
+HRESULT WebView::removeUserStyleSheetFromGroup(BSTR groupName, unsigned worldID)
+{
+ String group(groupName, SysStringLen(groupName));
+ if (group.isEmpty() || !worldID || worldID == numeric_limits<unsigned>::max())
+ return E_INVALIDARG;
+
+ PageGroup* pageGroup = PageGroup::pageGroup(group);
+ ASSERT(pageGroup);
+ if (!pageGroup)
+ return E_FAIL;
+
+ pageGroup->removeUserStyleSheetFromWorld(worldID);
return S_OK;
}
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 3f20c69..7670d2f 100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
@@ -747,8 +747,10 @@ public:
virtual HRESULT STDMETHODCALLTYPE addUserStyleSheetToGroup(BSTR groupName, unsigned worldID, BSTR source, BSTR url,
unsigned whitelistCount, BSTR* whitelist,
unsigned blacklistCount, BSTR* blacklist);
- virtual HRESULT STDMETHODCALLTYPE removeUserContentWithURLFromGroup(BSTR groupName, unsigned worldID, BSTR url);
- virtual HRESULT STDMETHODCALLTYPE removeUserContentFromGroup(BSTR groupName, unsigned worldID);
+ virtual HRESULT STDMETHODCALLTYPE removeUserScriptFromGroup(BSTR groupName, unsigned worldID, BSTR url);
+ virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetFromGroup(BSTR groupName, unsigned worldID, BSTR url);
+ virtual HRESULT STDMETHODCALLTYPE removeUserScriptsFromGroup(BSTR groupName, unsigned worldID);
+ virtual HRESULT STDMETHODCALLTYPE removeUserStyleSheetsFromGroup(BSTR groupName, unsigned worldID);
virtual HRESULT STDMETHODCALLTYPE removeAllUserContentFromGroup(BSTR groupName);
virtual HRESULT STDMETHODCALLTYPE setPluginHalterDelegate(IWebPluginHalterDelegate*);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list