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

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

Issue 17038004: Remove needsShadowTreeWalker flag (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/NodeRenderingTraversal.cpp ('k') | Source/core/dom/shadow/InsertionPoint.h » ('j') | 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) 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 23 matching lines...) Expand all
34 ShadowRoot* ElementShadow::addShadowRoot(Element* shadowHost, ShadowRoot::Shadow RootType type) 34 ShadowRoot* ElementShadow::addShadowRoot(Element* shadowHost, ShadowRoot::Shadow RootType type)
35 { 35 {
36 RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost->document(), t ype); 36 RefPtr<ShadowRoot> shadowRoot = ShadowRoot::create(shadowHost->document(), t ype);
37 37
38 shadowRoot->setParentOrShadowHostNode(shadowHost); 38 shadowRoot->setParentOrShadowHostNode(shadowHost);
39 shadowRoot->setParentTreeScope(shadowHost->treeScope()); 39 shadowRoot->setParentTreeScope(shadowHost->treeScope());
40 m_shadowRoots.push(shadowRoot.get()); 40 m_shadowRoots.push(shadowRoot.get());
41 m_distributor.didShadowBoundaryChange(shadowHost); 41 m_distributor.didShadowBoundaryChange(shadowHost);
42 ChildNodeInsertionNotifier(shadowHost).notify(shadowRoot.get()); 42 ChildNodeInsertionNotifier(shadowHost).notify(shadowRoot.get());
43 43
44 // Existence of shadow roots requires the host and its children to do traver sal using ComposedShadowTreeWalker.
45 shadowHost->setNeedsShadowTreeWalker();
46
47 // FIXME(94905): ShadowHost should be reattached during recalcStyle.
48 // Set some flag here and recreate shadow hosts' renderer in
49 // Element::recalcStyle.
50 if (shadowHost->attached()) 44 if (shadowHost->attached())
51 shadowHost->lazyReattach(); 45 shadowHost->lazyReattach();
52 46
53 InspectorInstrumentation::didPushShadowRoot(shadowHost, shadowRoot.get()); 47 InspectorInstrumentation::didPushShadowRoot(shadowHost, shadowRoot.get());
54 48
55 return shadowRoot.get(); 49 return shadowRoot.get();
56 } 50 }
57 51
58 void ElementShadow::removeAllShadowRoots() 52 void ElementShadow::removeAllShadowRoots()
59 { 53 {
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 info.addMember(m_shadowRoots, "shadowRoots"); 130 info.addMember(m_shadowRoots, "shadowRoots");
137 ShadowRoot* shadowRoot = m_shadowRoots.head(); 131 ShadowRoot* shadowRoot = m_shadowRoots.head();
138 while (shadowRoot) { 132 while (shadowRoot) {
139 info.addMember(shadowRoot, "shadowRoot"); 133 info.addMember(shadowRoot, "shadowRoot");
140 shadowRoot = shadowRoot->next(); 134 shadowRoot = shadowRoot->next();
141 } 135 }
142 info.addMember(m_distributor, "distributor"); 136 info.addMember(m_distributor, "distributor");
143 } 137 }
144 138
145 } // namespace 139 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/NodeRenderingTraversal.cpp ('k') | Source/core/dom/shadow/InsertionPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698