This repository was archived by the owner on Mar 13, 2018. It is now read-only.
File tree 2 files changed +13
-18
lines changed
2 files changed +13
-18
lines changed Original file line number Diff line number Diff line change 475
475
return eventPhaseTable . get ( this ) ;
476
476
} ,
477
477
get path ( ) {
478
- var nodeList = new wrappers . NodeList ( ) ;
479
478
var eventPath = eventPathTable . get ( this ) ;
480
- if ( eventPath ) {
481
- var index = 0 ;
482
- var lastIndex = eventPath . length - 1 ;
483
- var baseRoot = getTreeScope ( currentTargetTable . get ( this ) ) ;
484
-
485
- for ( var i = 0 ; i <= lastIndex ; i ++ ) {
486
- var currentTarget = eventPath [ i ] ;
487
- var currentRoot = getTreeScope ( currentTarget ) ;
488
- if ( currentRoot . contains ( baseRoot ) &&
489
- // Make sure we do not add Window to the path.
490
- ( i !== lastIndex || currentTarget instanceof wrappers . Node ) ) {
491
- nodeList [ index ++ ] = currentTarget ;
492
- }
493
- }
494
- nodeList . length = index ;
495
- }
496
- return nodeList ;
479
+ if ( ! eventPath )
480
+ return [ ] ;
481
+ // TODO(arv): Event path should contain window.
482
+ return eventPath . slice ( ) ;
497
483
} ,
498
484
stopPropagation : function ( ) {
499
485
stopPropagationTable . set ( this , true ) ;
Original file line number Diff line number Diff line change @@ -1194,6 +1194,9 @@ test('retarget order (multiple shadow roots)', function() {
1194
1194
[
1195
1195
tree . c ,
1196
1196
tree . content ,
1197
+ tree . content2 ,
1198
+ tree . e ,
1199
+ tree . sr2 ,
1197
1200
tree . d ,
1198
1201
tree . sr ,
1199
1202
tree . b ,
@@ -1209,6 +1212,12 @@ test('retarget order (multiple shadow roots)', function() {
1209
1212
assertArrayEqual (
1210
1213
[
1211
1214
tree . c ,
1215
+ tree . content ,
1216
+ tree . content2 ,
1217
+ tree . e ,
1218
+ tree . sr2 ,
1219
+ tree . d ,
1220
+ tree . sr ,
1212
1221
tree . b ,
1213
1222
tree . a ,
1214
1223
tree . div ,
You can’t perform that action at this time.
0 commit comments