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

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

Issue 17054002: Element::recalcStyle() overly reattach()-es InsertionPoints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: For landing 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/shadow/ElementShadow.h ('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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 oldRoot->setPrev(0); 67 oldRoot->setPrev(0);
68 oldRoot->setNext(0); 68 oldRoot->setNext(0);
69 ChildNodeRemovalNotifier(shadowHost).notify(oldRoot.get()); 69 ChildNodeRemovalNotifier(shadowHost).notify(oldRoot.get());
70 } 70 }
71 71
72 m_distributor.invalidateDistribution(shadowHost); 72 m_distributor.invalidateDistribution(shadowHost);
73 } 73 }
74 74
75 void ElementShadow::attach() 75 void ElementShadow::attach()
76 { 76 {
77 ContentDistributor::ensureDistribution(youngestShadowRoot()); 77 ContentDistributor::ensureDistribution(host());
78 78
79 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) { 79 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) {
80 if (!root->attached()) 80 if (!root->attached())
81 root->attach(); 81 root->attach();
82 } 82 }
83 } 83 }
84 84
85 void ElementShadow::detach() 85 void ElementShadow::detach()
86 { 86 {
87 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) { 87 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadow Root()) {
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 info.addMember(m_shadowRoots, "shadowRoots"); 130 info.addMember(m_shadowRoots, "shadowRoots");
131 ShadowRoot* shadowRoot = m_shadowRoots.head(); 131 ShadowRoot* shadowRoot = m_shadowRoots.head();
132 while (shadowRoot) { 132 while (shadowRoot) {
133 info.addMember(shadowRoot, "shadowRoot"); 133 info.addMember(shadowRoot, "shadowRoot");
134 shadowRoot = shadowRoot->next(); 134 shadowRoot = shadowRoot->next();
135 } 135 }
136 info.addMember(m_distributor, "distributor"); 136 info.addMember(m_distributor, "distributor");
137 } 137 }
138 138
139 } // namespace 139 } // namespace
OLDNEW
« no previous file with comments | « Source/core/dom/shadow/ElementShadow.h ('k') | Source/core/dom/shadow/InsertionPoint.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698