Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(121)

Issue 18013: When any event is ongoing, we don't set user gesture correctly... (Closed)

Created:
11 years, 11 months ago by Elliot Glaysher
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

When a function handling an event doesn't return a value, it leaves the "event" object on the global context. This namespace pollution was causing some functionality that was trying to detect if we were in an event, such as popup blocking, to go wrong. BUG=6367 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=8050

Patch Set 1 #

Total comments: 2

Patch Set 2 : '' #

Patch Set 3 : '' #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -3 lines) Patch
M webkit/port/bindings/v8/v8_events.cpp View 2 chunks +3 lines, -3 lines 2 comments Download

Messages

Total messages: 9 (0 generated)
Elliot Glaysher
(I don't know this section of the code. Please really double check my solution. I ...
11 years, 11 months ago (2009-01-13 20:30:14 UTC) #1
dglazkov
It might be good to have a second pair of eyes on this, so I ...
11 years, 11 months ago (2009-01-13 21:40:07 UTC) #2
Elliot Glaysher
http://codereview.chromium.org/18013/diff/1/2 File webkit/port/bindings/v8/ScriptController.cpp (right): http://codereview.chromium.org/18013/diff/1/2#newcode214 Line 214: } On 2009/01/13 21:40:08, Dimitri Glazkov wrote: > ...
11 years, 11 months ago (2009-01-13 23:10:26 UTC) #3
dglazkov
Feng, can you take a look?
11 years, 11 months ago (2009-01-14 17:36:57 UTC) #4
Feng Qian
Looks good to me, a layout test? On 2009/01/14 17:36:57, Dimitri Glazkov wrote: > Feng, ...
11 years, 11 months ago (2009-01-14 17:43:38 UTC) #5
dglazkov
Damn. I think this ain't gonna fly. All we're doing is making sure it's an ...
11 years, 11 months ago (2009-01-14 17:46:39 UTC) #6
Elliot Glaysher
> We should see how WebKit does it and make sure they don't make the ...
11 years, 11 months ago (2009-01-14 21:24:28 UTC) #7
Elliot Glaysher
I have completely redone the patch to address the root problem. Please take another look.
11 years, 11 months ago (2009-01-14 23:11:05 UTC) #8
Mike Belshe
11 years, 11 months ago (2009-01-14 23:36:00 UTC) #9
LGTM

http://codereview.chromium.org/18013/diff/206/10
File webkit/port/bindings/v8/v8_events.cpp (right):

http://codereview.chromium.org/18013/diff/206/10#newcode87
Line 87: v8::Local<v8::String> event_symbol = v8::String::NewSymbol("event");
Let's add a comment here:

For compatibility, we store the event object as a property on the window called
"event".  Because this is the global namespace, we save away any existing
"event" property, and then restore it after executing the javascript handler.

http://codereview.chromium.org/18013/diff/206/10#newcode110
Line 110: // Restore the old event.
Update comment to:

Restore the old event.  This must be done for all exit paths through this
method.

Powered by Google App Engine
This is Rietveld 408576698