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

Side by Side Diff: Source/core/dom/shadow/ElementShadow.h

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/shadow/ContentDistributor.cpp ('k') | Source/core/dom/shadow/ElementShadow.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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 92
93 inline ShadowRoot* Node::youngestShadowRoot() const 93 inline ShadowRoot* Node::youngestShadowRoot() const
94 { 94 {
95 if (!this->isElementNode()) 95 if (!this->isElementNode())
96 return 0; 96 return 0;
97 if (ElementShadow* shadow = toElement(this)->shadow()) 97 if (ElementShadow* shadow = toElement(this)->shadow())
98 return shadow->youngestShadowRoot(); 98 return shadow->youngestShadowRoot();
99 return 0; 99 return 0;
100 } 100 }
101 101
102 inline void Element::ensureDistribution()
103 {
104 ContentDistributor::ensureDistribution(this);
105 }
106
102 inline ElementShadow* ElementShadow::containingShadow() const 107 inline ElementShadow* ElementShadow::containingShadow() const
103 { 108 {
104 if (ShadowRoot* parentRoot = host()->containingShadowRoot()) 109 if (ShadowRoot* parentRoot = host()->containingShadowRoot())
105 return parentRoot->owner(); 110 return parentRoot->owner();
106 return 0; 111 return 0;
107 } 112 }
108 113
109 class ShadowRootVector : public Vector<RefPtr<ShadowRoot> > { 114 class ShadowRootVector : public Vector<RefPtr<ShadowRoot> > {
110 public: 115 public:
111 explicit ShadowRootVector(ElementShadow* tree) 116 explicit ShadowRootVector(ElementShadow* tree)
(...skipping 10 matching lines...) Expand all
122 if (Node* parent = node->parentNode()) 127 if (Node* parent = node->parentNode())
123 if (parent->isElementNode()) 128 if (parent->isElementNode())
124 return toElement(parent)->shadow(); 129 return toElement(parent)->shadow();
125 return 0; 130 return 0;
126 } 131 }
127 132
128 133
129 } // namespace 134 } // namespace
130 135
131 #endif 136 #endif
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ContentDistributor.cpp ('k') | Source/core/dom/shadow/ElementShadow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698