diff options
author | Patrick Scott <phanna@android.com> | 2009-11-18 13:55:30 -0500 |
---|---|---|
committer | Patrick Scott <phanna@android.com> | 2009-11-19 09:19:18 -0500 |
commit | 27e40b2407e7e39b8fde83728baee90aae279760 (patch) | |
tree | f06d6bbc372c2f3541721893f0c6e1e2bef7a085 /WebCore/loader/EmptyClients.h | |
parent | 19e61e8bbfd288bd9bf211069dd66e51ffadce15 (diff) | |
download | external_webkit-27e40b2407e7e39b8fde83728baee90aae279760.zip external_webkit-27e40b2407e7e39b8fde83728baee90aae279760.tar.gz external_webkit-27e40b2407e7e39b8fde83728baee90aae279760.tar.bz2 |
Change window focus only if the user initiated the event.
This does not work in the javascript case because the user gesture is stored in
the caller's script environment and that knowledge is not obtainable in the
receiving frame. However, this change allows targeted links to change the focus
to the correct window but prevents sites like slate.com from changing back to
the opening window.
This change will be followed by a simple revert of the previous change in the
Browser app.
Bug: 2161671
Diffstat (limited to 'WebCore/loader/EmptyClients.h')
-rw-r--r-- | WebCore/loader/EmptyClients.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/WebCore/loader/EmptyClients.h b/WebCore/loader/EmptyClients.h index 44fad72..b4952b1 100644 --- a/WebCore/loader/EmptyClients.h +++ b/WebCore/loader/EmptyClients.h @@ -70,7 +70,11 @@ public: virtual float scaleFactor() { return 1.f; } +#ifdef ANDROID_USER_GESTURE + virtual void focus(bool userGesture) { } +#else virtual void focus() { } +#endif virtual void unfocus() { } virtual bool canTakeFocus(FocusDirection) { return false; } |