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

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

Issue 2473743003: Call Element::rebuildLayoutTree from Document::updateStyle directly (Closed)
Patch Set: Commit the renames Created 4 years 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 youngest.setYoungerShadowRoot(shadowRoot); 102 youngest.setYoungerShadowRoot(shadowRoot);
103 shadowRoot.setOlderShadowRoot(youngest); 103 shadowRoot.setOlderShadowRoot(youngest);
104 } 104 }
105 105
106 void ElementShadow::attach(const Node::AttachContext& context) { 106 void ElementShadow::attach(const Node::AttachContext& context) {
107 Node::AttachContext childrenContext(context); 107 Node::AttachContext childrenContext(context);
108 childrenContext.resolvedStyle = 0; 108 childrenContext.resolvedStyle = 0;
109 109
110 for (ShadowRoot* root = &youngestShadowRoot(); root; 110 for (ShadowRoot* root = &youngestShadowRoot(); root;
111 root = root->olderShadowRoot()) { 111 root = root->olderShadowRoot()) {
112 if (root->needsAttach()) 112 if (root->needsReattachLayoutTree())
113 root->attachLayoutTree(childrenContext); 113 root->attachLayoutTree(childrenContext);
114 } 114 }
115 } 115 }
116 116
117 void ElementShadow::detach(const Node::AttachContext& context) { 117 void ElementShadow::detach(const Node::AttachContext& context) {
118 Node::AttachContext childrenContext(context); 118 Node::AttachContext childrenContext(context);
119 childrenContext.resolvedStyle = 0; 119 childrenContext.resolvedStyle = 0;
120 120
121 for (ShadowRoot* root = &youngestShadowRoot(); root; 121 for (ShadowRoot* root = &youngestShadowRoot(); root;
122 root = root->olderShadowRoot()) 122 root = root->olderShadowRoot())
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 visitor->trace(m_elementShadowV0); 168 visitor->trace(m_elementShadowV0);
169 visitor->trace(m_shadowRoot); 169 visitor->trace(m_shadowRoot);
170 } 170 }
171 171
172 DEFINE_TRACE_WRAPPERS(ElementShadow) { 172 DEFINE_TRACE_WRAPPERS(ElementShadow) {
173 visitor->traceWrappers(m_elementShadowV0); 173 visitor->traceWrappers(m_elementShadowV0);
174 visitor->traceWrappers(m_shadowRoot); 174 visitor->traceWrappers(m_shadowRoot);
175 } 175 }
176 176
177 } // namespace blink 177 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698