Permalink
Browse files

Revert "Added WebFrameLoadDelegate webView:foundUnknownScriptType:for…

…Frame"

This reverts commit 9db8597.
  • Loading branch information...
1 parent 715fdc5 commit 8e2e2629e9b867e1a2ac0f1ff41e4e3451f514fb @joshthecoder joshthecoder committed Apr 4, 2011
@@ -177,10 +177,8 @@ bool ScriptElement::prepareScript(const TextPosition1& scriptStartPosition, Lega
if (!m_element->inDocument())
return false;
-/* TITANIUM: disable this check, otherwise non-javascript scripts will never run.
if (!isScriptTypeSupported(supportLegacyTypes))
return false;
-*/
if (wasParserInserted) {
m_parserInserted = true;
@@ -267,14 +265,7 @@ void ScriptElement::executeScript(const ScriptSourceCode& sourceCode)
// Create a script from the script element node, using the script
// block's source and the script block's type.
// Note: This is where the script is compiled and actually executed.
- //
- // TITANIUM: If the script is Javascript let WebKit evaluate it.
- // Otherwise notify Titanium to evaluate the script if possible.
- if (isScriptTypeSupported()) {
- frame->script()->evaluate(sourceCode);
- } else {
- frame->loader()->foundUnknownScriptType(sourceCode.source());
- }
+ frame->script()->evaluate(sourceCode);
}
Document::updateStyleForAllDocuments();
@@ -378,9 +378,6 @@ class EmptyFrameLoaderClient : public FrameLoaderClient {
virtual void documentElementAvailable() { }
virtual void didPerformFirstNavigation() const { }
- // TITANIUM
- virtual void foundUnknownScriptType(const String&) { }
-
virtual void registerForIconNotification(bool) { }
#if USE(V8)
@@ -3427,12 +3427,6 @@ void FrameLoader::dispatchDidClearWindowObjectInWorld(DOMWrapperWorld* world)
InspectorInstrumentation::didClearWindowObjectInWorld(m_frame, world);
}
-// TITANIUM
-void FrameLoader::foundUnknownScriptType(const String& source)
-{
- m_client->foundUnknownScriptType(source);
-}
-
void FrameLoader::updateSandboxFlags()
{
SandboxFlags flags = m_forcedSandboxFlags;
@@ -245,9 +245,6 @@ class FrameLoader {
void dispatchDidClearWindowObjectsInAllWorlds();
void dispatchDocumentElementAvailable();
- // TITANIUM
- void foundUnknownScriptType(const String& source);
-
void ownerElementSandboxFlagsChanged() { updateSandboxFlags(); }
bool isSandboxed(SandboxFlags mask) const { return m_sandboxFlags & mask; }
@@ -267,9 +267,6 @@ namespace WebCore {
virtual void documentElementAvailable() = 0;
virtual void didPerformFirstNavigation() const = 0; // "Navigation" here means a transition from one page to another that ends up in the back/forward list.
- // TITANIUM
- virtual void foundUnknownScriptType(const String& source) = 0;
-
#if USE(V8)
virtual void didCreateScriptContextForFrame() = 0;
virtual void didDestroyScriptContextForFrame() = 0;
@@ -223,9 +223,6 @@ class WebFrameLoaderClient : public WebCore::FrameLoaderClient {
virtual void documentElementAvailable();
virtual void didPerformFirstNavigation() const;
- // TITANIUM
- virtual void foundUnknownScriptType(const String& source);
-
virtual void registerForIconNotification(bool listen);
#if ENABLE(JAVA_BRIDGE)
@@ -2003,18 +2003,6 @@ virtual void notifyWidget(WidgetNotification notification)
[preferences setCacheModel:WebCacheModelDocumentBrowser];
}
-// TITANIUM
-void WebFrameLoaderClient::foundUnknownScriptType(const String& source)
-{
- WebView* webView = getWebView(m_webFrame.get());
- WebFrameLoadDelegateImplementationCache* implementations = WebViewGetFrameLoadDelegateImplementations(webView);
-
- if (implementations->foundUnknownScriptTypeForFrameFunc) {
- CallFrameLoadDelegate(implementations->foundUnknownScriptTypeForFrameFunc, webView, @selector(webView:foundUnknownScriptType:forFrame:),
- (NSString *)source, m_webFrame.get());
- }
-}
-
PassRefPtr<FrameNetworkingContext> WebFrameLoaderClient::createNetworkingContext()
{
return WebFrameNetworkingContext::create(core(m_webFrame.get()));
@@ -77,7 +77,6 @@ struct WebFrameLoadDelegateImplementationCache {
IMP didFinishDocumentLoadForFrameFunc;
IMP didDisplayInsecureContentFunc;
IMP didRunInsecureContentFunc;
- IMP foundUnknownScriptTypeForFrameFunc;
};
struct WebScriptDebugDelegateImplementationCache {
@@ -1599,7 +1599,6 @@ - (void)_cacheFrameLoadDelegateImplementations
cache->windowScriptObjectAvailableFunc = getMethod(delegate, @selector(webView:windowScriptObjectAvailable:));
cache->didDisplayInsecureContentFunc = getMethod(delegate, @selector(webViewDidDisplayInsecureContent:));
cache->didRunInsecureContentFunc = getMethod(delegate, @selector(webView:didRunInsecureContent:));
- cache->foundUnknownScriptTypeForFrameFunc = getMethod(delegate, @selector(webView:foundUnknownScriptType:forFrame:));
}
- (void)_cacheScriptDebugDelegateImplementations

0 comments on commit 8e2e262

Please sign in to comment.