Bug 1024428 - don't crash when using input type='range' in shadow dom. r=wchen

This commit is contained in:
Olli Pettay
2014-07-30 23:15:44 +03:00
parent 9272cf34eb
commit 70eea80bc1
3 changed files with 14 additions and 1 deletions

View File

@@ -111,7 +111,7 @@ nsRangeFrame::MakeAnonymousDiv(Element** aResult,
nsCSSPseudoElements::Type aPseudoType,
nsTArray<ContentInfo>& aElements)
{
nsCOMPtr<nsIDocument> doc = mContent->GetDocument();
nsCOMPtr<nsIDocument> doc = mContent->GetComposedDoc();
nsRefPtr<Element> resultElement = doc->CreateHTMLElement(nsGkAtoms::div);
// Associate the pseudo-element with the anonymous child.