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

Unified Diff: third_party/WebKit/Source/core/dom/StyleEngine.cpp

Issue 2842263004: Fix assignedNodes({flatten:true}) to return fallback content in document tree (Closed)
Patch Set: Rename GetDistributedNodes to GetDistributedNodesExcludingFallback Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/dom/StyleEngine.cpp
diff --git a/third_party/WebKit/Source/core/dom/StyleEngine.cpp b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
index b19e177637881117d3334b75f792be6cbc922a4a..5d5c90bfc1409ce19b9cb89e62e118b89c87c655 100644
--- a/third_party/WebKit/Source/core/dom/StyleEngine.cpp
+++ b/third_party/WebKit/Source/core/dom/StyleEngine.cpp
@@ -871,7 +871,7 @@ void StyleEngine::ScheduleTypeRuleSetInvalidations(
}
void StyleEngine::InvalidateSlottedElements(HTMLSlotElement& slot) {
- for (auto& node : slot.GetDistributedNodes()) {
+ for (auto& node : slot.GetDistributedNodesExcludingFallback()) {
hayato 2017/05/18 06:58:25 Is this correct? Why doesn't this need to invalida
kochi 2017/05/18 07:21:49 If this is not correct, I'll file another bug. Thi
if (node->IsElementNode())
node->SetNeedsStyleRecalc(kLocalStyleChange,
StyleChangeReasonForTracing::Create(
@@ -912,7 +912,8 @@ void StyleEngine::ScheduleInvalidationsForRuleSets(
Element* element = ElementTraversal::FirstChild(*stay_within);
while (element) {
ScheduleRuleSetInvalidationsForElement(*element, rule_sets);
- if (invalidate_slotted && isHTMLSlotElement(element))
+ if (invalidate_slotted && isHTMLSlotElement(element) &&
+ toHTMLSlotElement(element)->SupportsDistribution())
InvalidateSlottedElements(toHTMLSlotElement(*element));
if (element->GetStyleChangeType() < kSubtreeStyleChange)

Powered by Google App Engine
This is Rietveld 408576698