mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 992488 - Return false early from inDOMUtils::SelectorMatchesElement if the selector is for a pseudo-element. r=bzbarsky
This commit is contained in:
parent
b7b0beb7d8
commit
2777b01fc9
@ -370,6 +370,15 @@ inDOMUtils::SelectorMatchesElement(nsIDOMElement* aElement,
|
|||||||
// We want just the one list item, not the whole list tail
|
// We want just the one list item, not the whole list tail
|
||||||
nsAutoPtr<nsCSSSelectorList> sel(tail->Clone(false));
|
nsAutoPtr<nsCSSSelectorList> sel(tail->Clone(false));
|
||||||
|
|
||||||
|
// SelectorListMatches does not handle selectors that begin with a
|
||||||
|
// pseudo-element, which you can get from selectors like
|
||||||
|
// |input::-moz-placeholder:hover|. This function doesn't take
|
||||||
|
// a pseudo-element nsIAtom*, so we know we can't match.
|
||||||
|
if (sel->mSelectors->IsPseudoElement()) {
|
||||||
|
*aMatches = false;
|
||||||
|
return NS_OK;
|
||||||
|
}
|
||||||
|
|
||||||
element->OwnerDoc()->FlushPendingLinkUpdates();
|
element->OwnerDoc()->FlushPendingLinkUpdates();
|
||||||
// XXXbz what exactly should we do with visited state here?
|
// XXXbz what exactly should we do with visited state here?
|
||||||
TreeMatchContext matchingContext(false,
|
TreeMatchContext matchingContext(false,
|
||||||
|
Loading…
Reference in New Issue
Block a user