Changeset 89260 in webkit


Ignore:
Timestamp:
Jun 20, 2011 10:54:45 AM (13 years ago)
Author:
abarth@webkit.org
Message:

2011-06-20 Adam Barth <abarth@webkit.org>

Reviewed by Dimitri Glazkov.

Several pyauto tests are failing because some infobars
https://bugs.webkit.org/show_bug.cgi?id=62968

This function used to evaluate script as if there was a user gesture
(due to the lack of a source URL). This patch re-introduces the user
gesture (this time explicitly), which causes the pyauto tests listed in
http://code.google.com/p/chromium/issues/detail?id=86397 to start
passing again. It's unclear whether this forced gesture is needed in
non-test scenarios.

  • src/WebFrameImpl.cpp: (WebKit::WebFrameImpl::executeScriptAndReturnValue):
Location:
trunk/Source/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/chromium/ChangeLog

    r89252 r89260  
     12011-06-20  Adam Barth  <abarth@webkit.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Several pyauto tests are failing because some infobars
     6        https://bugs.webkit.org/show_bug.cgi?id=62968
     7
     8        This function used to evaluate script as if there was a user gesture
     9        (due to the lack of a source URL). This patch re-introduces the user
     10        gesture (this time explicitly), which causes the pyauto tests listed in
     11        http://code.google.com/p/chromium/issues/detail?id=86397 to start
     12        passing again.  It's unclear whether this forced gesture is needed in
     13        non-test scenarios.
     14
     15        * src/WebFrameImpl.cpp:
     16        (WebKit::WebFrameImpl::executeScriptAndReturnValue):
     17
    1182011-06-20  Pavel Feldman  <pfeldman@chromium.org>
    219
  • trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp

    r89052 r89260  
    133133#include "TextAffinity.h"
    134134#include "TextIterator.h"
     135#include "UserGestureIndicator.h"
    135136#include "WebAnimationControllerImpl.h"
    136137#include "WebConsoleMessage.h"
     
    849850
    850851#if USE(V8)
    851 v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(
    852     const WebScriptSource& source)
    853 {
     852v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(const WebScriptSource& source)
     853{
     854    // FIXME: This fake user gesture is required to make a bunch of pyauto
     855    // tests pass. If this isn't needed in non-test situations, we should
     856    // consider removing this code and changing the tests.
     857    // http://code.google.com/p/chromium/issues/detail?id=86397
     858    UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
     859
    854860    TextPosition1 position(WTF::OneBasedNumber::fromOneBasedInt(source.startLine), WTF::OneBasedNumber::base());
    855     return m_frame->script()->executeScript(
    856         ScriptSourceCode(source.code, source.url, position)).v8Value();
     861    return m_frame->script()->executeScript(ScriptSourceCode(source.code, source.url, position)).v8Value();
    857862}
    858863
Note: See TracChangeset for help on using the changeset viewer.