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

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

Issue 8041049: Merge 95600 - Style changes on forwarded shadow children should trigger shadow renderer reconstru... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 2 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 void ShadowRoot::hostChildrenChanged() 109 void ShadowRoot::hostChildrenChanged()
110 { 110 {
111 if (!hasContentElement()) 111 if (!hasContentElement())
112 return; 112 return;
113 // This results in forced detaching/attaching of the shadow render tree. See ShadowRoot::recalcStyle(). 113 // This results in forced detaching/attaching of the shadow render tree. See ShadowRoot::recalcStyle().
114 setNeedsStyleRecalc(); 114 setNeedsStyleRecalc();
115 } 115 }
116 116
117 bool ShadowRoot::isInclusionSelectorActive() const
118 {
119 return m_inclusions && m_inclusions->hasCandidates();
120 }
121
117 bool ShadowRoot::hasContentElement() const 122 bool ShadowRoot::hasContentElement() const
118 { 123 {
119 for (Node* n = firstChild(); n; n = n->traverseNextNode(this)) { 124 for (Node* n = firstChild(); n; n = n->traverseNextNode(this)) {
120 if (n->isContentElement()) 125 if (n->isContentElement())
121 return true; 126 return true;
122 } 127 }
123 128
124 return false; 129 return false;
125 } 130 }
126 131
(...skipping 26 matching lines...) Expand all
153 ShadowInclusionSelector* ShadowRoot::ensureInclusions() 158 ShadowInclusionSelector* ShadowRoot::ensureInclusions()
154 { 159 {
155 if (!m_inclusions) 160 if (!m_inclusions)
156 m_inclusions = adoptPtr(new ShadowInclusionSelector()); 161 m_inclusions = adoptPtr(new ShadowInclusionSelector());
157 m_inclusions->willSelectOver(this); 162 m_inclusions->willSelectOver(this);
158 return m_inclusions.get(); 163 return m_inclusions.get();
159 } 164 }
160 165
161 166
162 } 167 }
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