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

Issue 15063004: Make Event.path() return a pre-calculated NodeList rather than calculating it dynamically. (Closed)

Created:
7 years, 7 months ago by hayato
Modified:
7 years, 7 months ago
CC:
blink-reviews, dglazkov+blink, eae+blinkwatch, adamk+blink_chromium.org
Visibility:
Public.

Description

Make Event.path() return a pre-calculated NodeList rather than calculating it dynamically. The current implementation of Event.path() populates a NodeList dynamically when Event.path() is called. That has a drawback: If an event handler mutates a DOM tree, the returned value of event.path() will be changed. This patch pre-calculates a NodeList for each node so that event.path() should not be affected by mutating DOM tree. BUG=240162 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=150293

Patch Set 1 #

Patch Set 2 : Style clean up. Remove an empty lie. #

Patch Set 3 : Add an include. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+52 lines, -7 lines) Patch
A + LayoutTests/fast/dom/shadow/event-path-with-dom-mutation.html View 1 chunk +7 lines, -0 lines 0 comments Download
A + LayoutTests/fast/dom/shadow/event-path-with-dom-mutation-expected.txt View 2 chunks +4 lines, -0 lines 0 comments Download
M Source/core/dom/Event.cpp View 1 chunk +6 lines, -7 lines 0 comments Download
M Source/core/dom/EventContext.h View 1 3 chunks +6 lines, -0 lines 0 comments Download
M Source/core/dom/EventContext.cpp View 2 chunks +6 lines, -0 lines 0 comments Download
M Source/core/dom/EventRetargeter.cpp View 1 2 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
hayato
PTAL.
7 years, 7 months ago (2013-05-13 08:53:34 UTC) #1
dglazkov
Keeping a NodeList on each EventContext and the N^2 populating of these lists seems really ...
7 years, 7 months ago (2013-05-13 16:39:30 UTC) #2
hayato
On 2013/05/13 16:39:30, Dimitri Glazkov wrote: > Keeping a NodeList on each EventContext and the ...
7 years, 7 months ago (2013-05-14 02:42:06 UTC) #3
dglazkov
okay, lgtm.
7 years, 7 months ago (2013-05-14 03:04:37 UTC) #4
hayato
On 2013/05/14 02:42:06, hayato wrote: > On 2013/05/13 16:39:30, Dimitri Glazkov wrote: > > Keeping ...
7 years, 7 months ago (2013-05-14 03:47:38 UTC) #5
hayato
On 2013/05/14 03:04:37, Dimitri Glazkov wrote: > okay, lgtm. Thank you. Let me land this ...
7 years, 7 months ago (2013-05-14 03:48:36 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hayato@chromium.org/15063004/4007
7 years, 7 months ago (2013-05-14 03:48:53 UTC) #7
commit-bot: I haz the power
7 years, 7 months ago (2013-05-14 05:32:38 UTC) #8
Message was sent while issue was closed.
Change committed as 150293

Powered by Google App Engine
This is Rietveld 408576698