Changeset 86259 in webkit


Ignore:
Timestamp:
May 11, 2011 1:30:01 PM (13 years ago)
Author:
Adam Roben
Message:

Don't notify the plugin when a targeted javascript: URL request completes

This matches Mozilla and WebKit1.

Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
plugin doesn't appear on a hanes.com page

Test: plugins/get-targeted-javascript-url.html

Reviewed by Anders Carlsson.

Source/WebKit2:

  • WebProcess/Plugins/PluginView.cpp:

(WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
request had a target.

LayoutTests:

Test what happens when a plugin makes a targeted javascript: request

  • plugins/get-targeted-javascript-url-expected.txt: Added.
  • plugins/get-targeted-javascript-url.html: Added.

(startTest): Tell the plugin to make two targeted javascript: requests. One calls a function
with a return value, the other calls a function with no return value.
(finishTest): Check that both functions were called, and that we either didn't get an
NPP_URLNotify call (like in Mozilla, WebKit1, and WebKit2), or got an NPP_URLNotify call
with NPRES_DONE (like in Chrome).

Location:
trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r86258 r86259  
     12011-05-11  Adam Roben  <aroben@apple.com>
     2
     3        Test what happens when a plugin makes a targeted javascript: request
     4
     5        Test for <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
     6        plugin doesn't appear on a hanes.com page
     7
     8        Reviewed by Anders Carlsson.
     9
     10        * plugins/get-targeted-javascript-url-expected.txt: Added.
     11        * plugins/get-targeted-javascript-url.html: Added.
     12        (startTest): Tell the plugin to make two targeted javascript: requests. One calls a function
     13        with a return value, the other calls a function with no return value.
     14        (finishTest): Check that both functions were called, and that we either didn't get an
     15        NPP_URLNotify call (like in Mozilla, WebKit1, and WebKit2), or got an NPP_URLNotify call
     16        with NPRES_DONE (like in Chrome).
     17
    1182011-05-11  Kenji Imasaki  <imasaki@chromium.org>
    219
  • trunk/Source/WebKit2/ChangeLog

    r86255 r86259  
     12011-05-11  Adam Roben  <aroben@apple.com>
     2
     3        Don't notify the plugin when a targeted javascript: URL request completes
     4
     5        This matches Mozilla and WebKit1.
     6
     7        Fixes <http://webkit.org/b/60568> <rdar://problem/8610657> REGRESSION (WebKit2): Flash
     8        plugin doesn't appear on a hanes.com page
     9
     10        Test: plugins/get-targeted-javascript-url.html
     11
     12        Reviewed by Anders Carlsson.
     13
     14        * WebProcess/Plugins/PluginView.cpp:
     15        (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the
     16        request had a target.
     17
    1182011-05-11  Jessie Berlin  <jberlin@apple.com>
    219
  • trunk/Source/WebKit2/WebProcess/Plugins/PluginView.cpp

    r86169 r86259  
    782782        return;
    783783
     784    // Don't notify the plug-in at all about targeted javascript: requests. This matches Mozilla and WebKit1.
     785    if (!request->target().isNull())
     786        return;
     787
    784788    ScriptState* scriptState = frame->script()->globalObject(pluginWorld())->globalExec();
    785789    String resultString;
    786790    result.getString(scriptState, resultString);
    787791 
    788     if (!request->target().isNull()) {
    789         // Just send back whether the frame load succeeded or not.
    790         if (resultString.isNull())
    791             m_plugin->frameDidFail(request->requestID(), false);
    792         else
    793             m_plugin->frameDidFinishLoading(request->requestID());
    794         return;
    795     }
    796 
    797792    // Send the result back to the plug-in.
    798793    plugin->didEvaluateJavaScript(request->requestID(), decodeURLEscapeSequences(request->request().url()), resultString);
Note: See TracChangeset for help on using the changeset viewer.