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

Side by Side Diff: Source/WebCore/dom/ShadowRoot.cpp

Issue 8002029: Merge 95600 - Style changes on forwarded shadow children should trigger shadow renderer reconstru... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 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
« no previous file with comments | « Source/WebCore/dom/ShadowRoot.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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 112 }
113 113
114 void ShadowRoot::hostChildrenChanged() 114 void ShadowRoot::hostChildrenChanged()
115 { 115 {
116 if (!hasContentElement()) 116 if (!hasContentElement())
117 return; 117 return;
118 // This results in forced detaching/attaching of the shadow render tree. See ShadowRoot::recalcStyle(). 118 // This results in forced detaching/attaching of the shadow render tree. See ShadowRoot::recalcStyle().
119 setNeedsStyleRecalc(); 119 setNeedsStyleRecalc();
120 } 120 }
121 121
122 bool ShadowRoot::isInclusionSelectorActive() const
123 {
124 return m_inclusions && m_inclusions->hasCandidates();
125 }
126
122 bool ShadowRoot::hasContentElement() const 127 bool ShadowRoot::hasContentElement() const
123 { 128 {
124 for (Node* n = firstChild(); n; n = n->traverseNextNode(this)) { 129 for (Node* n = firstChild(); n; n = n->traverseNextNode(this)) {
125 if (n->isContentElement()) 130 if (n->isContentElement())
126 return true; 131 return true;
127 } 132 }
128 133
129 return false; 134 return false;
130 } 135 }
131 136
(...skipping 26 matching lines...) Expand all
158 ShadowInclusionSelector* ShadowRoot::ensureInclusions() 163 ShadowInclusionSelector* ShadowRoot::ensureInclusions()
159 { 164 {
160 if (!m_inclusions) 165 if (!m_inclusions)
161 m_inclusions = adoptPtr(new ShadowInclusionSelector()); 166 m_inclusions = adoptPtr(new ShadowInclusionSelector());
162 m_inclusions->willSelectOver(this); 167 m_inclusions->willSelectOver(this);
163 return m_inclusions.get(); 168 return m_inclusions.get();
164 } 169 }
165 170
166 171
167 } 172 }
OLDNEW
« no previous file with comments | « Source/WebCore/dom/ShadowRoot.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698