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

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

Issue 2439973005: Revert of Move Layout Tree Construction code into Element::rebuildLayoutTree() (Closed)
Patch Set: Revert "Move Layout Tree Construction code into Element::rebuildLayoutTree()" Created 4 years, 1 month 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
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // ShadowRoot doesn't support custom callbacks. 122 // ShadowRoot doesn't support custom callbacks.
123 DCHECK(!hasCustomStyleCallbacks()); 123 DCHECK(!hasCustomStyleCallbacks());
124 124
125 StyleSharingDepthScope sharingScope(*this); 125 StyleSharingDepthScope sharingScope(*this);
126 126
127 if (getStyleChangeType() >= SubtreeStyleChange) 127 if (getStyleChangeType() >= SubtreeStyleChange)
128 change = Force; 128 change = Force;
129 129
130 // There's no style to update so just calling recalcStyle means we're updated. 130 // There's no style to update so just calling recalcStyle means we're updated.
131 clearNeedsStyleRecalc(); 131 clearNeedsStyleRecalc();
132 clearNeedsReattachLayoutTree();
133 132
134 recalcDescendantStyles(change); 133 recalcDescendantStyles(change);
135 clearChildNeedsStyleRecalc(); 134 clearChildNeedsStyleRecalc();
136 clearChildNeedsReattachLayoutTree();
137 } 135 }
138 136
139 void ShadowRoot::attachLayoutTree(const AttachContext& context) { 137 void ShadowRoot::attachLayoutTree(const AttachContext& context) {
140 StyleSharingDepthScope sharingScope(*this); 138 StyleSharingDepthScope sharingScope(*this);
141 DocumentFragment::attachLayoutTree(context); 139 DocumentFragment::attachLayoutTree(context);
142 } 140 }
143 141
144 void ShadowRoot::detachLayoutTree(const AttachContext& context) { 142 void ShadowRoot::detachLayoutTree(const AttachContext& context) {
145 if (context.clearInvalidation) 143 if (context.clearInvalidation)
146 document().styleEngine().styleInvalidator().clearInvalidation(*this); 144 document().styleEngine().styleInvalidator().clearInvalidation(*this);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 ostream << "ShadowRootType::Open"; 323 ostream << "ShadowRootType::Open";
326 break; 324 break;
327 case ShadowRootType::Closed: 325 case ShadowRootType::Closed:
328 ostream << "ShadowRootType::Closed"; 326 ostream << "ShadowRootType::Closed";
329 break; 327 break;
330 } 328 }
331 return ostream; 329 return ostream;
332 } 330 }
333 331
334 } // namespace blink 332 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Text.cpp ('k') | third_party/WebKit/Source/core/html/HTMLFrameSetElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698