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

Side by Side Diff: third_party/WebKit/Source/core/dom/shadow/ShadowRoot.cpp

Issue 2760233004: Make all setNeedsReattachLayoutTree happen from updateStyle. (Closed)
Patch Set: Included https://codereview.chromium.org/2760953003/ Created 3 years, 9 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 | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp ('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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 markup, &host(), AllowScriptingContent, "innerHTML", exceptionState)) 135 markup, &host(), AllowScriptingContent, "innerHTML", exceptionState))
136 replaceChildrenWithFragment(this, fragment, exceptionState); 136 replaceChildrenWithFragment(this, fragment, exceptionState);
137 } 137 }
138 138
139 void ShadowRoot::recalcStyle(StyleRecalcChange change) { 139 void ShadowRoot::recalcStyle(StyleRecalcChange change) {
140 // ShadowRoot doesn't support custom callbacks. 140 // ShadowRoot doesn't support custom callbacks.
141 DCHECK(!hasCustomStyleCallbacks()); 141 DCHECK(!hasCustomStyleCallbacks());
142 142
143 StyleSharingDepthScope sharingScope(*this); 143 StyleSharingDepthScope sharingScope(*this);
144 144
145 if (getStyleChangeType() >= SubtreeStyleChange) 145 if (getStyleChangeType() >= SubtreeStyleChange) {
146 change = Force; 146 change = Force;
147 if (needsAttach())
148 setNeedsReattachLayoutTree();
149 }
147 150
148 // There's no style to update so just calling recalcStyle means we're updated. 151 // There's no style to update so just calling recalcStyle means we're updated.
149 clearNeedsStyleRecalc(); 152 clearNeedsStyleRecalc();
150 153
151 recalcDescendantStyles(change); 154 recalcDescendantStyles(change);
152 clearChildNeedsStyleRecalc(); 155 clearChildNeedsStyleRecalc();
153 } 156 }
154 157
155 void ShadowRoot::rebuildLayoutTree() { 158 void ShadowRoot::rebuildLayoutTree() {
156 // ShadowRoot doesn't support custom callbacks. 159 // ShadowRoot doesn't support custom callbacks.
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 ostream << "ShadowRootType::Open"; 346 ostream << "ShadowRootType::Open";
344 break; 347 break;
345 case ShadowRootType::Closed: 348 case ShadowRootType::Closed:
346 ostream << "ShadowRootType::Closed"; 349 ostream << "ShadowRootType::Closed";
347 break; 350 break;
348 } 351 }
349 return ostream; 352 return ostream;
350 } 353 }
351 354
352 } // namespace blink 355 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/shadow/ElementShadow.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698