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

Side by Side Diff: Source/core/dom/NodeRenderingTraversal.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/EventPathWalker.cpp ('k') | Source/core/dom/Text.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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 } 43 }
44 44
45 void ParentDetails::didTraverseShadowRoot(const ShadowRoot* root) 45 void ParentDetails::didTraverseShadowRoot(const ShadowRoot* root)
46 { 46 {
47 m_resetStyleInheritance = m_resetStyleInheritance || root->resetStyleInheri tance(); 47 m_resetStyleInheritance = m_resetStyleInheritance || root->resetStyleInheri tance();
48 } 48 }
49 49
50 ContainerNode* parent(const Node* node, ParentDetails* details) 50 ContainerNode* parent(const Node* node, ParentDetails* details)
51 { 51 {
52 if (ShadowRoot* root = node->containingShadowRoot())
53 root->host()->ensureDistribution();
54
52 ComposedShadowTreeWalker walker(node, ComposedShadowTreeWalker::CrossUpperBo undary, ComposedShadowTreeWalker::CanStartFromShadowBoundary); 55 ComposedShadowTreeWalker walker(node, ComposedShadowTreeWalker::CrossUpperBo undary, ComposedShadowTreeWalker::CanStartFromShadowBoundary);
53 ContainerNode* found = toContainerNode(walker.traverseParent(walker.get(), d etails)); 56 ContainerNode* found = toContainerNode(walker.traverseParent(walker.get(), d etails));
54 return details->outOfComposition() ? 0 : found; 57 return details->outOfComposition() ? 0 : found;
55 } 58 }
56 59
57 Node* nextSibling(const Node* node) 60 Node* nextSibling(const Node* node)
58 { 61 {
59 ComposedShadowTreeWalker walker(node); 62 ComposedShadowTreeWalker walker(node);
60 if (node->isBeforePseudoElement()) { 63 if (node->isBeforePseudoElement()) {
61 walker.parent(); 64 walker.parent();
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 Node* lastChildInScope(const Node* node) 119 Node* lastChildInScope(const Node* node)
117 { 120 {
118 ComposedShadowTreeWalker walker = ComposedShadowTreeWalker(node, ComposedSha dowTreeWalker::DoNotCrossUpperBoundary); 121 ComposedShadowTreeWalker walker = ComposedShadowTreeWalker(node, ComposedSha dowTreeWalker::DoNotCrossUpperBoundary);
119 walker.lastChild(); 122 walker.lastChild();
120 return walker.get(); 123 return walker.get();
121 } 124 }
122 125
123 } 126 }
124 127
125 } // namespace 128 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/EventPathWalker.cpp ('k') | Source/core/dom/Text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698