зеркало из https://github.com/mozilla/pjs.git
Don't call SelectorMatches on document fragments. (Bug 437170) r+sr=bzbarsky
This commit is contained in:
Родитель
9704ef1a8b
Коммит
8aaec8fb44
|
@ -1741,7 +1741,9 @@ static PRBool SelectorMatchesTree(RuleProcessorData& aPrevData,
|
||||||
data = prevdata->mParentData;
|
data = prevdata->mParentData;
|
||||||
if (!data) {
|
if (!data) {
|
||||||
nsIContent *content = prevdata->mContent->GetParent();
|
nsIContent *content = prevdata->mContent->GetParent();
|
||||||
if (content) {
|
// GetParent could return a document fragment; we only want
|
||||||
|
// element parents.
|
||||||
|
if (content && content->IsNodeOfType(nsINode::eELEMENT)) {
|
||||||
data = new (prevdata->mPresContext)
|
data = new (prevdata->mPresContext)
|
||||||
RuleProcessorData(prevdata->mPresContext, content,
|
RuleProcessorData(prevdata->mPresContext, content,
|
||||||
prevdata->mRuleWalker,
|
prevdata->mRuleWalker,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче