mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-29 18:58:40 +09:00
Issue #2250 - Part 1: Return early if the element being tested for is likely an ancestor and does not have an assigned slot
This commit is contained in:
parent
a00793acff
commit
1c2dd6aee0
1 changed files with 7 additions and 1 deletions
|
|
@ -1732,7 +1732,13 @@ static bool SelectorMatches(Element* aElement,
|
|||
|
||||
Element* targetElement = aElement;
|
||||
if (aTreeMatchContext.mForAssignedSlot) {
|
||||
targetElement = aElement->GetAssignedSlot()->AsElement();
|
||||
HTMLSlotElement* slot = aElement->GetAssignedSlot();
|
||||
// We're likely testing the slottable's ancestors and it might
|
||||
// not have an assigned slot, so return early.
|
||||
if (!slot) {
|
||||
return false;
|
||||
}
|
||||
targetElement = slot->AsElement();
|
||||
}
|
||||
|
||||
// namespace/tag match
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue