Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(83)

Unified Diff: Source/WebCore/page/PageGroup.cpp

Issue 14188004: Remove UserScript support, which is not used by Chromium (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Remove one more test Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/page/PageGroup.h ('k') | Source/WebCore/page/UserScript.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/PageGroup.cpp
diff --git a/Source/WebCore/page/PageGroup.cpp b/Source/WebCore/page/PageGroup.cpp
index 82a4462964196b7c01fa7bc25625d928e0de1979..cd2d48f2fcf0aa3fa3c827870b7df233ba0db400 100644
--- a/Source/WebCore/page/PageGroup.cpp
+++ b/Source/WebCore/page/PageGroup.cpp
@@ -256,21 +256,6 @@ StorageNamespace* PageGroup::localStorage()
return m_localStorage.get();
}
-void PageGroup::addUserScriptToWorld(DOMWrapperWorld* world, const String& source, const KURL& url,
- const Vector<String>& whitelist, const Vector<String>& blacklist,
- UserScriptInjectionTime injectionTime, UserContentInjectedFrames injectedFrames)
-{
- ASSERT_ARG(world, world);
-
- OwnPtr<UserScript> userScript = adoptPtr(new UserScript(source, url, whitelist, blacklist, injectionTime, injectedFrames));
- if (!m_userScripts)
- m_userScripts = adoptPtr(new UserScriptMap);
- OwnPtr<UserScriptVector>& scriptsInWorld = m_userScripts->add(world, nullptr).iterator->value;
- if (!scriptsInWorld)
- scriptsInWorld = adoptPtr(new UserScriptVector);
- scriptsInWorld->append(userScript.release());
-}
-
void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& source, const KURL& url,
const Vector<String>& whitelist, const Vector<String>& blacklist,
UserContentInjectedFrames injectedFrames,
@@ -291,90 +276,8 @@ void PageGroup::addUserStyleSheetToWorld(DOMWrapperWorld* world, const String& s
invalidatedInjectedStyleSheetCacheInAllFrames();
}
-void PageGroup::removeUserScriptFromWorld(DOMWrapperWorld* world, const KURL& url)
-{
- ASSERT_ARG(world, world);
-
- if (!m_userScripts)
- return;
-
- UserScriptMap::iterator it = m_userScripts->find(world);
- if (it == m_userScripts->end())
- return;
-
- UserScriptVector* scripts = it->value.get();
- for (int i = scripts->size() - 1; i >= 0; --i) {
- if (scripts->at(i)->url() == url)
- scripts->remove(i);
- }
-
- if (scripts->isEmpty())
- m_userScripts->remove(it);
-}
-
-void PageGroup::removeUserStyleSheetFromWorld(DOMWrapperWorld* world, const KURL& url)
-{
- ASSERT_ARG(world, world);
-
- if (!m_userStyleSheets)
- return;
-
- UserStyleSheetMap::iterator it = m_userStyleSheets->find(world);
- bool sheetsChanged = false;
- if (it == m_userStyleSheets->end())
- return;
-
- UserStyleSheetVector* stylesheets = it->value.get();
- for (int i = stylesheets->size() - 1; i >= 0; --i) {
- if (stylesheets->at(i)->url() == url) {
- stylesheets->remove(i);
- sheetsChanged = true;
- }
- }
-
- if (!sheetsChanged)
- return;
-
- if (stylesheets->isEmpty())
- m_userStyleSheets->remove(it);
-
- invalidatedInjectedStyleSheetCacheInAllFrames();
-}
-
-void PageGroup::removeUserScriptsFromWorld(DOMWrapperWorld* world)
-{
- ASSERT_ARG(world, world);
-
- if (!m_userScripts)
- return;
-
- UserScriptMap::iterator it = m_userScripts->find(world);
- if (it == m_userScripts->end())
- return;
-
- m_userScripts->remove(it);
-}
-
-void PageGroup::removeUserStyleSheetsFromWorld(DOMWrapperWorld* world)
-{
- ASSERT_ARG(world, world);
-
- if (!m_userStyleSheets)
- return;
-
- UserStyleSheetMap::iterator it = m_userStyleSheets->find(world);
- if (it == m_userStyleSheets->end())
- return;
-
- m_userStyleSheets->remove(it);
-
- invalidatedInjectedStyleSheetCacheInAllFrames();
-}
-
void PageGroup::removeAllUserContent()
{
- m_userScripts.clear();
-
if (m_userStyleSheets) {
m_userStyleSheets.clear();
invalidatedInjectedStyleSheetCacheInAllFrames();
« no previous file with comments | « Source/WebCore/page/PageGroup.h ('k') | Source/WebCore/page/UserScript.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698