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

Side by Side Diff: Source/core/dom/EventPathWalker.cpp

Issue 23819007: Have Node::document() return a reference instead of a pointer (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/EventDispatcher.cpp ('k') | Source/core/dom/EventRetargeter.cpp » ('j') | 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 21 matching lines...) Expand all
32 #include "core/dom/shadow/ShadowRoot.h" 32 #include "core/dom/shadow/ShadowRoot.h"
33 33
34 namespace WebCore { 34 namespace WebCore {
35 35
36 EventPathWalker::EventPathWalker(const Node* node) 36 EventPathWalker::EventPathWalker(const Node* node)
37 : m_node(node) 37 : m_node(node)
38 , m_distributedNode(node) 38 , m_distributedNode(node)
39 , m_isVisitingInsertionPointInReprojection(false) 39 , m_isVisitingInsertionPointInReprojection(false)
40 { 40 {
41 ASSERT(node); 41 ASSERT(node);
42 node->document()->updateDistributionForNodeIfNeeded(const_cast<Node*>(node)) ; 42 node->document().updateDistributionForNodeIfNeeded(const_cast<Node*>(node));
43 } 43 }
44 44
45 Node* EventPathWalker::parent(const Node* node) 45 Node* EventPathWalker::parent(const Node* node)
46 { 46 {
47 EventPathWalker walker(node); 47 EventPathWalker walker(node);
48 walker.moveToParent(); 48 walker.moveToParent();
49 return walker.node(); 49 return walker.node();
50 } 50 }
51 51
52 void EventPathWalker::moveToParent() 52 void EventPathWalker::moveToParent()
(...skipping 20 matching lines...) Expand all
73 m_node = insertionPoint; 73 m_node = insertionPoint;
74 m_isVisitingInsertionPointInReprojection = true; 74 m_isVisitingInsertionPointInReprojection = true;
75 return; 75 return;
76 } 76 }
77 m_node = shadowRoot->host(); 77 m_node = shadowRoot->host();
78 m_distributedNode = m_node; 78 m_distributedNode = m_node;
79 m_isVisitingInsertionPointInReprojection = false; 79 m_isVisitingInsertionPointInReprojection = false;
80 } 80 }
81 81
82 } // namespace 82 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/EventDispatcher.cpp ('k') | Source/core/dom/EventRetargeter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698