Title: [89260] trunk/Source/WebKit/chromium
- Revision
- 89260
- Author
- [email protected]
- Date
- 2011-06-20 10:54:45 -0700 (Mon, 20 Jun 2011)
Log Message
2011-06-20 Adam Barth <[email protected]>
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):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (89259 => 89260)
--- trunk/Source/WebKit/chromium/ChangeLog 2011-06-20 17:52:58 UTC (rev 89259)
+++ trunk/Source/WebKit/chromium/ChangeLog 2011-06-20 17:54:45 UTC (rev 89260)
@@ -1,3 +1,20 @@
+2011-06-20 Adam Barth <[email protected]>
+
+ 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):
+
2011-06-20 Pavel Feldman <[email protected]>
Reviewed by Yury Semikhatsky.
Modified: trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp (89259 => 89260)
--- trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2011-06-20 17:52:58 UTC (rev 89259)
+++ trunk/Source/WebKit/chromium/src/WebFrameImpl.cpp 2011-06-20 17:54:45 UTC (rev 89260)
@@ -132,6 +132,7 @@
#include "SubstituteData.h"
#include "TextAffinity.h"
#include "TextIterator.h"
+#include "UserGestureIndicator.h"
#include "WebAnimationControllerImpl.h"
#include "WebConsoleMessage.h"
#include "WebDataSourceImpl.h"
@@ -848,12 +849,16 @@
}
#if USE(V8)
-v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(
- const WebScriptSource& source)
+v8::Handle<v8::Value> WebFrameImpl::executeScriptAndReturnValue(const WebScriptSource& source)
{
+ // FIXME: This fake user gesture is required to make a bunch of pyauto
+ // tests pass. If this isn't needed in non-test situations, we should
+ // consider removing this code and changing the tests.
+ // http://code.google.com/p/chromium/issues/detail?id=86397
+ UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
+
TextPosition1 position(WTF::OneBasedNumber::fromOneBasedInt(source.startLine), WTF::OneBasedNumber::base());
- return m_frame->script()->executeScript(
- ScriptSourceCode(source.code, source.url, position)).v8Value();
+ return m_frame->script()->executeScript(ScriptSourceCode(source.code, source.url, position)).v8Value();
}
// Returns the V8 context for this frame, or an empty handle if there is none.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes