OSDN Git Service

Change window focus only if the user initiated the event.
authorPatrick Scott <phanna@android.com>
Wed, 18 Nov 2009 18:55:30 +0000 (13:55 -0500)
committerPatrick Scott <phanna@android.com>
Thu, 19 Nov 2009 14:19:18 +0000 (09:19 -0500)
commit27e40b2407e7e39b8fde83728baee90aae279760
treef06d6bbc372c2f3541721893f0c6e1e2bef7a085
parent19e61e8bbfd288bd9bf211069dd66e51ffadce15
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
WebCore/loader/EmptyClients.h
WebCore/loader/FrameLoader.cpp
WebCore/page/Chrome.cpp
WebCore/page/Chrome.h
WebCore/page/ChromeClient.h
WebCore/page/Frame.cpp
WebKit/android/WebCoreSupport/ChromeClientAndroid.cpp
WebKit/android/WebCoreSupport/ChromeClientAndroid.h