From 7aa445162e2e1ab5f8d172316fd1dd3b28b47bb5 Mon Sep 17 00:00:00 2001 From: Jeremy Andrews Date: Sun, 5 Dec 2021 18:34:12 -0600 Subject: Issue #1593 - Part 5: Fix error that messes with event state detection. Iterator changes between 42 and 52 were a bit confusing. --- dom/xbl/nsBindingManager.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'dom') diff --git a/dom/xbl/nsBindingManager.cpp b/dom/xbl/nsBindingManager.cpp index 6fb29ca871..8f18f112af 100644 --- a/dom/xbl/nsBindingManager.cpp +++ b/dom/xbl/nsBindingManager.cpp @@ -740,8 +740,8 @@ GetContentSetRuleProcessors(nsTHashtable>* aContentS // for its immediate binding, and one more for each binding in the // inheritance chain. Additionally, a bound content may host multiple // shadow roots, each with its own rule processor. - nsXBLBinding *binding = boundContent->GetXBLBinding(); - if (binding) { + for (nsXBLBinding *binding = boundContent->GetXBLBinding(); binding; + binding = binding->GetBaseBinding()) { nsIStyleRuleProcessor* ruleProc = binding->PrototypeBinding()->GetRuleProcessor(); if (ruleProc) { @@ -751,7 +751,6 @@ GetContentSetRuleProcessors(nsTHashtable>* aContentS set->PutEntry(ruleProc); } - binding = binding->GetBaseBinding(); if (shadowRoot) { binding = shadowRoot->GetAssociatedBinding(); } -- cgit v1.2.3