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

Side by Side Diff: third_party/WebKit/Source/core/events/EventPath.cpp

Issue 2343923003: Make event.composedPath() on window behave the same way as that on document (Closed)
Patch Set: rebased Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/events/EventPath.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Neither the name of Google Inc. nor the names of its 10 * * Neither the name of Google Inc. nor the names of its
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 RelatedTargetMap relatedNodeMap; 378 RelatedTargetMap relatedNodeMap;
379 buildRelatedNodeMap(*targetNode, relatedNodeMap); 379 buildRelatedNodeMap(*targetNode, relatedNodeMap);
380 for (size_t j = 0; j < treeScopes.size(); ++j) { 380 for (size_t j = 0; j < treeScopes.size(); ++j) {
381 adjustedTouchList[j]->append(touch.cloneWithNewTarget( 381 adjustedTouchList[j]->append(touch.cloneWithNewTarget(
382 findRelatedNode(*treeScopes[j], relatedNodeMap))); 382 findRelatedNode(*treeScopes[j], relatedNodeMap)));
383 } 383 }
384 } 384 }
385 } 385 }
386 386
387 const NodeEventContext& EventPath::topNodeEventContext() { 387 NodeEventContext& EventPath::topNodeEventContext() {
388 DCHECK(!isEmpty()); 388 DCHECK(!isEmpty());
389 return last(); 389 return last();
390 } 390 }
391 391
392 void EventPath::ensureWindowEventContext() { 392 void EventPath::ensureWindowEventContext() {
393 DCHECK(m_event); 393 DCHECK(m_event);
394 if (!m_windowEventContext) 394 if (!m_windowEventContext)
395 m_windowEventContext = 395 m_windowEventContext =
396 new WindowEventContext(*m_event, topNodeEventContext()); 396 new WindowEventContext(*m_event, topNodeEventContext());
397 } 397 }
(...skipping 12 matching lines...) Expand all
410 410
411 DEFINE_TRACE(EventPath) { 411 DEFINE_TRACE(EventPath) {
412 visitor->trace(m_nodeEventContexts); 412 visitor->trace(m_nodeEventContexts);
413 visitor->trace(m_node); 413 visitor->trace(m_node);
414 visitor->trace(m_event); 414 visitor->trace(m_event);
415 visitor->trace(m_treeScopeEventContexts); 415 visitor->trace(m_treeScopeEventContexts);
416 visitor->trace(m_windowEventContext); 416 visitor->trace(m_windowEventContext);
417 } 417 }
418 418
419 } // namespace blink 419 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/events/EventPath.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698