Changeset 49372 in webkit


Ignore:
Timestamp:
Oct 8, 2009 10:08:51 PM (14 years ago)
Author:
abarth@webkit.org
Message:

2009-10-08 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move executeScript from FrameLoader to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=30200

Update API call.

  • Api/qwebframe.cpp: (QWebFrame::evaluateJavaScript):

2009-10-08 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move executeScript from FrameLoader to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=30200

Update API call.

  • webkit/webkitwebview.cpp: (webkit_web_view_execute_script):

2009-10-08 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move executeScript from FrameLoader to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=30200

Update API call.

  • WebView.cpp: (WebView::stringByEvaluatingJavaScriptFromString):

2009-10-08 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move executeScript from FrameLoader to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=30200

Update API call.

  • WebFrame.cpp: (wxWebFrame::RunScript):

2009-10-08 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move executeScript from FrameLoader to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=30200

Update API call.

  • WebView/WebFrame.mm: (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
  • WebView/WebView.mm: (-[WebView aeDescByEvaluatingJavaScriptFromString:]):

2009-10-08 Adam Barth <abarth@webkit.org>

Reviewed by Eric Seidel.

Move executeScript from FrameLoader to ScriptController
https://bugs.webkit.org/show_bug.cgi?id=30200

These methods have virtually no interaction with FrameLoader. They
really seem like they ought to belong to ScriptController.

  • WebCore.base.exp:
  • bindings/js/ScheduledAction.cpp: (WebCore::ScheduledAction::execute):
  • bindings/js/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::executeScript): (WebCore::ScriptController::executeIfJavaScriptURL): (WebCore::ScriptController::evaluate):
  • bindings/js/ScriptController.h:
  • bindings/v8/ScriptController.cpp: (WebCore::ScriptController::ScriptController): (WebCore::ScriptController::executeScript): (WebCore::ScriptController::executeIfJavaScriptURL):
  • bindings/v8/ScriptController.h:
  • dom/XMLTokenizer.cpp: (WebCore::XMLTokenizer::notifyFinished):
  • dom/XMLTokenizerLibxml2.cpp: (WebCore::XMLTokenizer::endElementNs):
  • dom/XMLTokenizerQt.cpp: (WebCore::XMLTokenizer::parseEndElement):
  • html/HTMLTokenizer.cpp: (WebCore::HTMLTokenizer::scriptExecution):
  • loader/FrameLoader.cpp: (WebCore::FrameLoader::changeLocation): (WebCore::FrameLoader::urlSelected): (WebCore::FrameLoader::requestFrame): (WebCore::FrameLoader::submitForm): (WebCore::FrameLoader::replaceDocument):
  • loader/FrameLoader.h:
  • plugins/PluginView.cpp: (WebCore::PluginView::performRequest):
Location:
trunk
Files:
1 added
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r49333 r49372  
     12009-10-08  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move executeScript from FrameLoader to ScriptController
     6        https://bugs.webkit.org/show_bug.cgi?id=30200
     7
     8        These methods have virtually no interaction with FrameLoader.  They
     9        really seem like they ought to belong to ScriptController.
     10
     11        * WebCore.base.exp:
     12        * bindings/js/ScheduledAction.cpp:
     13        (WebCore::ScheduledAction::execute):
     14        * bindings/js/ScriptController.cpp:
     15        (WebCore::ScriptController::ScriptController):
     16        (WebCore::ScriptController::executeScript):
     17        (WebCore::ScriptController::executeIfJavaScriptURL):
     18        (WebCore::ScriptController::evaluate):
     19        * bindings/js/ScriptController.h:
     20        * bindings/v8/ScriptController.cpp:
     21        (WebCore::ScriptController::ScriptController):
     22        (WebCore::ScriptController::executeScript):
     23        (WebCore::ScriptController::executeIfJavaScriptURL):
     24        * bindings/v8/ScriptController.h:
     25        * dom/XMLTokenizer.cpp:
     26        (WebCore::XMLTokenizer::notifyFinished):
     27        * dom/XMLTokenizerLibxml2.cpp:
     28        (WebCore::XMLTokenizer::endElementNs):
     29        * dom/XMLTokenizerQt.cpp:
     30        (WebCore::XMLTokenizer::parseEndElement):
     31        * html/HTMLTokenizer.cpp:
     32        (WebCore::HTMLTokenizer::scriptExecution):
     33        * loader/FrameLoader.cpp:
     34        (WebCore::FrameLoader::changeLocation):
     35        (WebCore::FrameLoader::urlSelected):
     36        (WebCore::FrameLoader::requestFrame):
     37        (WebCore::FrameLoader::submitForm):
     38        (WebCore::FrameLoader::replaceDocument):
     39        * loader/FrameLoader.h:
     40        * plugins/PluginView.cpp:
     41        (WebCore::PluginView::performRequest):
     42
    1432009-10-08  Geoffrey Garen  <ggaren@apple.com>
    244
  • trunk/WebCore/GNUmakefile.am

    r49291 r49372  
    477477        WebCore/bindings/js/SerializedScriptValue.h \
    478478        WebCore/bindings/js/StringSourceProvider.h \
     479        WebCore/bindings/ScriptControllerBase.cpp \
    479480        WebCore/bridge/IdentifierRep.cpp \
    480481        WebCore/bridge/IdentifierRep.h \
  • trunk/WebCore/WebCore.base.exp

    r49212 r49372  
    157157__ZN7WebCore11FrameLoader11setEncodingERKNS_6StringEb
    158158__ZN7WebCore11FrameLoader12shouldReloadERKNS_4KURLES3_
    159 __ZN7WebCore11FrameLoader13executeScriptERKNS_6StringEb
    160159__ZN7WebCore11FrameLoader14detachChildrenEv
    161160__ZN7WebCore11FrameLoader14scrollToAnchorERKNS_4KURLE
     
    377376__ZN7WebCore16NavigationActionC1Ev
    378377__ZN7WebCore16ScriptController10initScriptEv
     378__ZN7WebCore16ScriptController13executeScriptERKNS_6StringEb
    379379__ZN7WebCore16ScriptController18windowScriptObjectEv
    380380__ZN7WebCore16VisibleSelectionC1EPKNS_5RangeENS_9EAffinityE
  • trunk/WebCore/WebCore.gypi

    r49309 r49372  
    625625            'bindings/js/WorkerScriptController.cpp',
    626626            'bindings/js/WorkerScriptController.h',
     627            'bindings/ScriptControllerBase.cpp',
    627628            'bindings/v8/ChildThreadDOMData.cpp',
    628629            'bindings/v8/ChildThreadDOMData.h',
  • trunk/WebCore/WebCore.pro

    r49290 r49372  
    768768    bindings/js/ScheduledAction.cpp \
    769769    bindings/js/SerializedScriptValue.cpp \
     770    bindings/ScriptControllerBase.cpp \
    770771    bridge/IdentifierRep.cpp \
    771772    bridge/NP_jsobject.cpp \
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r49290 r49372  
    2970829708                                </File>
    2970929709                        </Filter>
     29710      <File
     29711        RelativePath="..\bindings\ScriptControllerBase.cpp"
     29712        >
     29713      </File>
    2971029714                </Filter>
    2971129715                <Filter
  • trunk/WebCore/WebCore.xcodeproj/project.pbxproj

    r49317 r49372  
    23542354                97DD4D860FDF4D6E00ECF9A4 /* XSSAuditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */; };
    23552355                97DD4D870FDF4D6E00ECF9A4 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */; };
     2356                97EF7DFE107E55B700D7C49C /* ScriptControllerBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */; };
    23562357                A17C81220F2A5CF7005DAAEB /* HTMLElementFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */; };
    23572358                A17C81230F2A5CF7005DAAEB /* HTMLElementFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */; };
     
    75477548                97DD4D840FDF4D6D00ECF9A4 /* XSSAuditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = XSSAuditor.cpp; sourceTree = "<group>"; };
    75487549                97DD4D850FDF4D6E00ECF9A4 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XSSAuditor.h; sourceTree = "<group>"; };
     7550                97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptControllerBase.cpp; sourceTree = "<group>"; };
    75497551                A17C81200F2A5CF7005DAAEB /* HTMLElementFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLElementFactory.cpp; sourceTree = "<group>"; };
    75507552                A17C81210F2A5CF7005DAAEB /* HTMLElementFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTMLElementFactory.h; sourceTree = "<group>"; };
     
    1416614168                                14813BF309EDF88E00F757E1 /* IDLParser.pm */,
    1416714169                                93F8B3080A300FEA00F61AB8 /* IDLStructure.pm */,
     14170                                97EF7DFD107E55B700D7C49C /* ScriptControllerBase.cpp */,
    1416814171                        );
    1416914172                        path = bindings;
     
    1966819671                                416E75BF0EDF8FD700360E1D /* ScriptCallStack.cpp in Sources */,
    1966919672                                93B70D6F09EB0C7C009D8468 /* ScriptController.cpp in Sources */,
     19673                                97EF7DFE107E55B700D7C49C /* ScriptControllerBase.cpp in Sources */,
    1967019674                                A83E1C740E49042C00140B9C /* ScriptControllerMac.mm in Sources */,
    1967119675                                08A484770E5272C500C3FE76 /* ScriptElement.cpp in Sources */,
  • trunk/WebCore/WebCoreSources.bkl

    r49012 r49372  
    162162        bindings/js/JSWebKitCSSMatrixConstructor.cpp
    163163        bindings/js/JSWebKitPointConstructor.cpp
     164        bindings/ScriptControllerBase.cpp
    164165    </set>
    165166
  • trunk/WebCore/bindings/js/ScheduledAction.cpp

    r46431 r49372  
    126126        Document::updateStyleForAllDocuments();
    127127    } else
    128         frame->loader()->executeScript(m_code);
     128        frame->script()->executeScript(m_code);
    129129
    130130    frame->script()->setProcessingTimerCallback(false);
  • trunk/WebCore/bindings/js/ScriptController.cpp

    r48680 r49372  
    4949    , m_handlerLineNumber(0)
    5050    , m_sourceURL(0)
     51    , m_inExecuteScript(false)
    5152    , m_processingTimerCallback(false)
    5253    , m_paused(false)
     
    8586    const SourceCode& jsSourceCode = sourceCode.jsSourceCode();
    8687    String sourceURL = jsSourceCode.provider()->url();
    87    
     88
    8889    if (!m_XSSAuditor->canEvaluate(sourceCode.source())) {
    8990        // This script is not safe to be evaluated.
  • trunk/WebCore/bindings/js/ScriptController.h

    r48057 r49372  
    8181    }
    8282
     83    ScriptValue executeScript(const ScriptSourceCode&);
     84    ScriptValue executeScript(const String& script, bool forceUserGesture = false);
     85
     86    // Returns true if argument is a JavaScript URL.
     87    bool executeIfJavaScriptURL(const KURL&, bool userGesture = false, bool replaceDocument = true);
     88
    8389    ScriptValue evaluate(const ScriptSourceCode&);
    8490    void evaluateInIsolatedWorld(unsigned worldID, const Vector<ScriptSourceCode>&);
     
    156162    const String* m_sourceURL;
    157163
     164    bool m_inExecuteScript;
     165
    158166    bool m_processingTimerCallback;
    159167    bool m_paused;
  • trunk/WebCore/bindings/v8/ScriptController.cpp

    r49278 r49372  
    8989    : m_frame(frame)
    9090    , m_sourceURL(0)
     91    , m_inExecuteScript(false)
    9192    , m_processingTimerCallback(false)
    9293    , m_paused(false)
  • trunk/WebCore/bindings/v8/ScriptController.h

    r49278 r49372  
    5959        // or this accessor should be made JSProxy*
    6060        V8Proxy* proxy() { return m_proxy.get(); }
     61
     62        ScriptValue executeScript(const ScriptSourceCode&);
     63        ScriptValue executeScript(const String& script, bool forceUserGesture = false);
     64
     65        // Returns true if argument is a JavaScript URL.
     66        bool executeIfJavaScriptURL(const KURL&, bool userGesture = false, bool replaceDocument = true);
    6167
    6268        // Evaluate a script file in the environment of this proxy.
     
    163169        const String* m_sourceURL;
    164170
     171        bool m_inExecuteScript;
     172
    165173        bool m_processingTimerCallback;
    166174        bool m_paused;
  • trunk/WebCore/dom/XMLTokenizer.cpp

    r47313 r49372  
    297297        scriptElement->dispatchErrorEvent();
    298298    else {
    299         m_view->frame()->loader()->executeScript(sourceCode);
     299        m_view->frame()->script()->executeScript(sourceCode);
    300300        scriptElement->dispatchLoadEvent();
    301301    }
  • trunk/WebCore/dom/XMLTokenizerLibxml2.cpp

    r49208 r49372  
    863863                m_scriptElement = 0;
    864864        } else
    865             m_view->frame()->loader()->executeScript(ScriptSourceCode(scriptElement->scriptContent(), m_doc->url(), m_scriptStartLine));
     865            m_view->frame()->script()->executeScript(ScriptSourceCode(scriptElement->scriptContent(), m_doc->url(), m_scriptStartLine));
    866866    }
    867867    m_requestingScript = false;
  • trunk/WebCore/dom/XMLTokenizerQt.cpp

    r49020 r49372  
    622622                m_scriptElement = 0;
    623623        } else
    624             m_view->frame()->loader()->executeScript(ScriptSourceCode(scriptElement->scriptContent(), m_doc->url(), m_scriptStartLine));
     624            m_view->frame()->script()->executeScript(ScriptSourceCode(scriptElement->scriptContent(), m_doc->url(), m_scriptStartLine));
    625625    }
    626626    m_requestingScript = false;
  • trunk/WebCore/html/HTMLTokenizer.cpp

    r49194 r49372  
    562562
    563563    m_state = state;
    564     m_doc->frame()->loader()->executeScript(sourceCode);
     564    m_doc->frame()->script()->executeScript(sourceCode);
    565565    state = m_state;
    566566
  • trunk/WebCore/loader/FrameLoader.cpp

    r49320 r49372  
    176176    , m_inStopAllLoaders(false)
    177177    , m_isExecutingJavaScriptFormAction(false)
    178     , m_isRunningScript(false)
    179178    , m_didCallImplicitClose(false)
    180179    , m_wasUnloadEventEmitted(false)
     
    316315    ResourceRequest request(url, referrer, refresh ? ReloadIgnoringCacheData : UseProtocolCachePolicy);
    317316   
    318     if (executeIfJavaScriptURL(request.url(), userGesture))
     317    if (m_frame->script()->executeIfJavaScriptURL(request.url(), userGesture))
    319318        return;
    320319
     
    324323void FrameLoader::urlSelected(const ResourceRequest& request, const String& passedTarget, PassRefPtr<Event> triggeringEvent, bool lockHistory, bool lockBackForwardList, bool userGesture)
    325324{
    326     if (executeIfJavaScriptURL(request.url(), userGesture, false))
     325    if (m_frame->script()->executeIfJavaScriptURL(request.url(), userGesture, false))
    327326        return;
    328327
     
    361360
    362361    if (!scriptURL.isEmpty())
    363         frame->loader()->executeIfJavaScriptURL(scriptURL);
     362        frame->script()->executeIfJavaScriptURL(scriptURL);
    364363
    365364    return true;
     
    433432    if (protocolIsJavaScript(u)) {
    434433        m_isExecutingJavaScriptFormAction = true;
    435         executeIfJavaScriptURL(u, false, false);
     434        m_frame->script()->executeIfJavaScriptURL(u, false, false);
    436435        m_isExecutingJavaScriptFormAction = false;
    437436        return;
     
    648647}
    649648
    650 bool FrameLoader::executeIfJavaScriptURL(const KURL& url, bool userGesture, bool replaceDocument)
    651 {
    652     if (!protocolIsJavaScript(url))
    653         return false;
    654 
    655     if (m_frame->page() && !m_frame->page()->javaScriptURLsAreAllowed())
    656         return true;
    657 
    658     const int javascriptSchemeLength = sizeof("javascript:") - 1;
    659 
    660     String script = url.string().substring(javascriptSchemeLength);
    661     ScriptValue result;
    662     if (m_frame->script()->xssAuditor()->canEvaluateJavaScriptURL(script))
    663         result = executeScript(decodeURLEscapeSequences(script), userGesture);
    664 
    665     String scriptResult;
    666     if (!result.getString(scriptResult))
    667         return true;
    668 
    669     SecurityOrigin* currentSecurityOrigin = m_frame->document()->securityOrigin();
    670 
    671     // FIXME: We should always replace the document, but doing so
    672     //        synchronously can cause crashes:
    673     //        http://bugs.webkit.org/show_bug.cgi?id=16782
    674     if (replaceDocument) {
    675         stopAllLoaders();
    676         begin(m_URL, true, currentSecurityOrigin);
    677         write(scriptResult);
    678         end();
    679     }
    680 
    681     return true;
    682 }
    683 
    684 ScriptValue FrameLoader::executeScript(const String& script, bool forceUserGesture)
    685 {
    686     return executeScript(ScriptSourceCode(script, forceUserGesture ? KURL() : m_URL));
    687 }
    688 
    689 ScriptValue FrameLoader::executeScript(const ScriptSourceCode& sourceCode)
    690 {
    691     if (!m_frame->script()->isEnabled() || m_frame->script()->isPaused())
    692         return ScriptValue();
    693 
    694     bool wasRunningScript = m_isRunningScript;
    695     m_isRunningScript = true;
    696 
    697     ScriptValue result = m_frame->script()->evaluate(sourceCode);
    698 
    699     if (!wasRunningScript) {
    700         m_isRunningScript = false;
    701         Document::updateStyleForAllDocuments();
    702     }
    703 
    704     return result;
    705 }
    706649
    707650void FrameLoader::cancelAndClear()
     
    714657    clear(false);
    715658    m_frame->script()->updatePlatformScriptObjects();
     659}
     660
     661void FrameLoader::replaceDocument(const String& html)
     662{
     663    stopAllLoaders();
     664    begin(m_URL, true, m_frame->document()->securityOrigin());
     665    write(html);
     666    end();
    716667}
    717668
  • trunk/WebCore/loader/FrameLoader.h

    r49290 r49372  
    232232        KURL baseURL() const;
    233233
     234        void replaceDocument(const String&);
     235
    234236        void begin();
    235237        void begin(const KURL&, bool dispatchWindowObjectAvailable = true, SecurityOrigin* forcedSecurityOrigin = 0);
     
    242244        void setEncoding(const String& encoding, bool userChosen);
    243245        String encoding() const;
    244 
    245         ScriptValue executeScript(const ScriptSourceCode&);
    246         ScriptValue executeScript(const String& script, bool forceUserGesture = false);
    247246
    248247        void gotoAnchor();
     
    452451        Frame* loadSubframe(HTMLFrameOwnerElement*, const KURL&, const String& name, const String& referrer);
    453452
    454         // Returns true if argument is a JavaScript URL.
    455         bool executeIfJavaScriptURL(const KURL&, bool userGesture = false, bool replaceDocument = true);
    456 
    457453        bool gotoAnchor(const String& name); // returns true if the anchor was found
    458454        void scrollToAnchor(const KURL&);
     
    500496
    501497        bool m_isExecutingJavaScriptFormAction;
    502         bool m_isRunningScript;
    503498
    504499        String m_responseMIMEType;
  • trunk/WebCore/plugins/PluginView.cpp

    r49244 r49372  
    451451    // Executing a script can cause the plugin view to be destroyed, so we keep a reference to the parent frame.
    452452    RefPtr<Frame> parentFrame = m_parentFrame;
    453     JSValue result = m_parentFrame->loader()->executeScript(jsString, request->shouldAllowPopups()).jsValue();
     453    JSValue result = m_parentFrame->script()->executeScript(jsString, request->shouldAllowPopups()).jsValue();
    454454
    455455    if (targetFrameName.isNull()) {
  • trunk/WebKit/gtk/ChangeLog

    r49288 r49372  
     12009-10-08  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move executeScript from FrameLoader to ScriptController
     6        https://bugs.webkit.org/show_bug.cgi?id=30200
     7
     8        Update API call.
     9
     10        * webkit/webkitwebview.cpp:
     11        (webkit_web_view_execute_script):
     12
    1132009-10-07  Xan Lopez  <xlopez@igalia.com>
    214
  • trunk/WebKit/gtk/webkit/webkitwebview.cpp

    r49069 r49372  
    31533153    g_return_if_fail(script);
    31543154
    3155     if (FrameLoader* loader = core(webView)->mainFrame()->loader())
    3156         loader->executeScript(String::fromUTF8(script), true);
     3155    core(webView)->mainFrame()->script()->executeScript(String::fromUTF8(script), true);
    31573156}
    31583157
  • trunk/WebKit/mac/ChangeLog

    r49369 r49372  
     12009-10-08  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move executeScript from FrameLoader to ScriptController
     6        https://bugs.webkit.org/show_bug.cgi?id=30200
     7
     8        Update API call.
     9
     10        * WebView/WebFrame.mm:
     11        (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
     12        * WebView/WebView.mm:
     13        (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
     14
    1152009-10-08  Brady Eidson  <beidson@apple.com>
    216
  • trunk/WebKit/mac/WebView/WebFrame.mm

    r49212 r49372  
    596596    ASSERT(_private->coreFrame->document());
    597597   
    598     JSValue result = _private->coreFrame->loader()->executeScript(string, forceUserGesture).jsValue();
     598    JSValue result = _private->coreFrame->script()->executeScript(string, forceUserGesture).jsValue();
    599599
    600600    if (!_private->coreFrame) // In case the script removed our frame from the page.
  • trunk/WebKit/mac/WebView/WebView.mm

    r49369 r49372  
    40974097    if (!coreFrame->document())
    40984098        return nil;
    4099     JSValue result = coreFrame->loader()->executeScript(script, true).jsValue();
     4099    JSValue result = coreFrame->script()->executeScript(script, true).jsValue();
    41004100    if (!result) // FIXME: pass errors
    41014101        return 0;
  • trunk/WebKit/qt/Api/qwebframe.cpp

    r49020 r49372  
    12521252    QVariant rc;
    12531253    if (proxy) {
    1254         JSC::JSValue v = d->frame->loader()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
     1254        JSC::JSValue v = d->frame->script()->executeScript(ScriptSourceCode(scriptSource)).jsValue();
    12551255        int distance = 0;
    12561256        rc = JSC::Bindings::convertValueToQVariant(proxy->globalObject()->globalExec(), v, QMetaType::Void, &distance);
  • trunk/WebKit/qt/ChangeLog

    r49294 r49372  
     12009-10-08  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move executeScript from FrameLoader to ScriptController
     6        https://bugs.webkit.org/show_bug.cgi?id=30200
     7
     8        Update API call.
     9
     10        * Api/qwebframe.cpp:
     11        (QWebFrame::evaluateJavaScript):
     12
    1132009-10-08  Jedrzej Nowacki  <jedrzej.nowacki@nokia.com>
    214
  • trunk/WebKit/win/ChangeLog

    r49320 r49372  
     12009-10-08  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move executeScript from FrameLoader to ScriptController
     6        https://bugs.webkit.org/show_bug.cgi?id=30200
     7
     8        Update API call.
     9
     10        * WebView.cpp:
     11        (WebView::stringByEvaluatingJavaScriptFromString):
     12
    1132009-10-08  Anders Carlsson  <andersca@apple.com>
    214
  • trunk/WebKit/win/WebView.cpp

    r49305 r49372  
    28662866        return E_FAIL;
    28672867
    2868     JSC::JSValue scriptExecutionResult = coreFrame->loader()->executeScript(WebCore::String(script), true).jsValue();
     2868    JSC::JSValue scriptExecutionResult = coreFrame->script()->executeScript(WebCore::String(script), true).jsValue();
    28692869    if (!scriptExecutionResult)
    28702870        return E_FAIL;
  • trunk/WebKit/wx/ChangeLog

    r49284 r49372  
     12009-10-08  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Eric Seidel.
     4
     5        Move executeScript from FrameLoader to ScriptController
     6        https://bugs.webkit.org/show_bug.cgi?id=30200
     7
     8        Update API call.
     9
     10        * WebFrame.cpp:
     11        (wxWebFrame::RunScript):
     12
    1132009-10-07  Adam Barth  <abarth@webkit.org>
    214
  • trunk/WebKit/wx/WebFrame.cpp

    r48347 r49372  
    189189    wxString returnValue = wxEmptyString;
    190190    if (m_impl->frame) {
    191         JSC::JSValue result = m_impl->frame->loader()->executeScript(javascript, true).jsValue();
     191        JSC::JSValue result = m_impl->frame->script()->executeScript(javascript, true).jsValue();
    192192        if (result)
    193193            returnValue = wxString(result.toString(m_impl->frame->script()->globalObject()->globalExec()).UTF8String().c_str(), wxConvUTF8);       
Note: See TracChangeset for help on using the changeset viewer.