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

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

Issue 2398293003: Move Layout Tree Construction code into Element::rebuildLayoutTree() (Closed)
Patch Set: Final patch to land Created 4 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
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();
132 133
133 recalcDescendantStyles(change); 134 recalcDescendantStyles(change);
134 clearChildNeedsStyleRecalc(); 135 clearChildNeedsStyleRecalc();
136 clearChildNeedsReattachLayoutTree();
135 } 137 }
136 138
137 void ShadowRoot::attachLayoutTree(const AttachContext& context) { 139 void ShadowRoot::attachLayoutTree(const AttachContext& context) {
138 StyleSharingDepthScope sharingScope(*this); 140 StyleSharingDepthScope sharingScope(*this);
139 DocumentFragment::attachLayoutTree(context); 141 DocumentFragment::attachLayoutTree(context);
140 } 142 }
141 143
142 void ShadowRoot::detachLayoutTree(const AttachContext& context) { 144 void ShadowRoot::detachLayoutTree(const AttachContext& context) {
143 if (context.clearInvalidation) 145 if (context.clearInvalidation)
144 document().styleEngine().styleInvalidator().clearInvalidation(*this); 146 document().styleEngine().styleInvalidator().clearInvalidation(*this);
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 ostream << "ShadowRootType::Open"; 325 ostream << "ShadowRootType::Open";
324 break; 326 break;
325 case ShadowRootType::Closed: 327 case ShadowRootType::Closed:
326 ostream << "ShadowRootType::Closed"; 328 ostream << "ShadowRootType::Closed";
327 break; 329 break;
328 } 330 }
329 return ostream; 331 return ostream;
330 } 332 }
331 333
332 } // namespace blink 334 } // 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