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

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

Issue 652223002: Support style invalidation for ::content. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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) 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 void InsertionPoint::detach(const AttachContext& context) 113 void InsertionPoint::detach(const AttachContext& context)
114 { 114 {
115 for (size_t i = 0; i < m_distribution.size(); ++i) 115 for (size_t i = 0; i < m_distribution.size(); ++i)
116 m_distribution.at(i)->lazyReattachIfAttached(); 116 m_distribution.at(i)->lazyReattachIfAttached();
117 117
118 HTMLElement::detach(context); 118 HTMLElement::detach(context);
119 } 119 }
120 120
121 void InsertionPoint::willRecalcStyle(StyleRecalcChange change) 121 void InsertionPoint::willRecalcStyle(StyleRecalcChange change)
122 { 122 {
123 if (change < Inherit) 123 if (change < Inherit && styleChangeType() < SubtreeStyleChange)
chrishtr 2014/10/16 02:02:51 Is this part all that's needed to fix the attached
rune 2014/10/16 07:23:32 Yes. I started out to support invalidation for ::c
124 return; 124 return;
125 for (size_t i = 0; i < m_distribution.size(); ++i) 125 for (size_t i = 0; i < m_distribution.size(); ++i)
126 m_distribution.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChang eReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributed Nodes)); 126 m_distribution.at(i)->setNeedsStyleRecalc(SubtreeStyleChange, StyleChang eReasonForTracing::create(StyleChangeReason::PropagateInheritChangeToDistributed Nodes));
127 } 127 }
128 128
129 bool InsertionPoint::shouldUseFallbackElements() const 129 bool InsertionPoint::shouldUseFallbackElements() const
130 { 130 {
131 return isActive() && !hasDistribution(); 131 return isActive() && !hasDistribution();
132 } 132 }
133 133
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 if (!insertionPoints) 282 if (!insertionPoints)
283 return; 283 return;
284 for (size_t i = 0; i < insertionPoints->size(); ++i) 284 for (size_t i = 0; i < insertionPoints->size(); ++i)
285 results.append(insertionPoints->at(i).get()); 285 results.append(insertionPoints->at(i).get());
286 ASSERT(current != insertionPoints->last().get()); 286 ASSERT(current != insertionPoints->last().get());
287 current = insertionPoints->last().get(); 287 current = insertionPoints->last().get();
288 } 288 }
289 } 289 }
290 290
291 } // namespace blink 291 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698