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

Unified Diff: Source/WebCore/page/Frame.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/Frame.h ('k') | Source/WebCore/page/PageGroup.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/page/Frame.cpp
diff --git a/Source/WebCore/page/Frame.cpp b/Source/WebCore/page/Frame.cpp
index ca199028f93522367565847b04a9a8f8efb405d5..037d131b047e5c30951269f1ec574115a186c3d4 100644
--- a/Source/WebCore/page/Frame.cpp
+++ b/Source/WebCore/page/Frame.cpp
@@ -551,44 +551,6 @@ FloatSize Frame::resizePageRectsKeepingRatio(const FloatSize& originalSize, cons
return resultSize;
}
-void Frame::injectUserScripts(UserScriptInjectionTime injectionTime)
-{
- if (!m_page)
- return;
-
- if (loader()->stateMachine()->creatingInitialEmptyDocument())
- return;
-
- // Walk the hashtable. Inject by world.
- const UserScriptMap* userScripts = m_page->group().userScripts();
- if (!userScripts)
- return;
- UserScriptMap::const_iterator end = userScripts->end();
- for (UserScriptMap::const_iterator it = userScripts->begin(); it != end; ++it)
- injectUserScriptsForWorld(it->key.get(), *it->value, injectionTime);
-}
-
-void Frame::injectUserScriptsForWorld(DOMWrapperWorld* world, const UserScriptVector& userScripts, UserScriptInjectionTime injectionTime)
-{
- if (userScripts.isEmpty())
- return;
-
- Document* doc = document();
- if (!doc)
- return;
-
- Vector<ScriptSourceCode> sourceCode;
- unsigned count = userScripts.size();
- for (unsigned i = 0; i < count; ++i) {
- UserScript* script = userScripts[i].get();
- if (script->injectedFrames() == InjectInTopFrameOnly && ownerElement())
- continue;
-
- if (script->injectionTime() == injectionTime && UserContentURLPattern::matchesPatterns(doc->url(), script->whitelist(), script->blacklist()))
- m_script.evaluateInWorld(ScriptSourceCode(script->source(), script->url()), world);
- }
-}
-
RenderView* Frame::contentRenderer() const
{
return document() ? document()->renderView() : 0;
« no previous file with comments | « Source/WebCore/page/Frame.h ('k') | Source/WebCore/page/PageGroup.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698