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

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

Issue 17054002: Element::recalcStyle() overly reattach()-es InsertionPoints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing Created 7 years, 6 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/Element.cpp ('k') | Source/core/dom/NodeRenderingTraversal.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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 EventPathWalker walker(node); 46 EventPathWalker walker(node);
47 walker.moveToParent(); 47 walker.moveToParent();
48 return walker.node(); 48 return walker.node();
49 } 49 }
50 50
51 void EventPathWalker::moveToParent() 51 void EventPathWalker::moveToParent()
52 { 52 {
53 ASSERT(m_node); 53 ASSERT(m_node);
54 ASSERT(m_distributedNode); 54 ASSERT(m_distributedNode);
55 if (ElementShadow* shadow = shadowOfParent(m_node)) { 55 if (ElementShadow* shadow = shadowOfParent(m_node)) {
56 ContentDistributor::ensureDistribution(shadow->youngestShadowRoot()); 56 shadow->host()->ensureDistribution();
57 if (InsertionPoint* insertionPoint = shadow->distributor().findInsertion PointFor(m_distributedNode)) { 57 if (InsertionPoint* insertionPoint = shadow->distributor().findInsertion PointFor(m_distributedNode)) {
58 m_node = insertionPoint; 58 m_node = insertionPoint;
59 m_isVisitingInsertionPointInReprojection = true; 59 m_isVisitingInsertionPointInReprojection = true;
60 return; 60 return;
61 } 61 }
62 } 62 }
63 if (!m_node->isShadowRoot()) { 63 if (!m_node->isShadowRoot()) {
64 m_node = m_node->parentNode(); 64 m_node = m_node->parentNode();
65 if (!(m_node && m_node->isShadowRoot() && ScopeContentDistribution::assi gnedTo(toShadowRoot(m_node)))) 65 if (!(m_node && m_node->isShadowRoot() && ScopeContentDistribution::assi gnedTo(toShadowRoot(m_node))))
66 m_distributedNode = m_node; 66 m_distributedNode = m_node;
67 m_isVisitingInsertionPointInReprojection = false; 67 m_isVisitingInsertionPointInReprojection = false;
68 return; 68 return;
69 } 69 }
70 70
71 const ShadowRoot* shadowRoot = toShadowRoot(m_node); 71 const ShadowRoot* shadowRoot = toShadowRoot(m_node);
72 if (InsertionPoint* insertionPoint = ScopeContentDistribution::assignedTo(sh adowRoot)) { 72 if (InsertionPoint* insertionPoint = ScopeContentDistribution::assignedTo(sh adowRoot)) {
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/Element.cpp ('k') | Source/core/dom/NodeRenderingTraversal.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698