summaryrefslogtreecommitdiffstats
path: root/layout/forms/nsMeterFrame.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'layout/forms/nsMeterFrame.cpp')
-rw-r--r--layout/forms/nsMeterFrame.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/layout/forms/nsMeterFrame.cpp b/layout/forms/nsMeterFrame.cpp
index 1f3bd8022..6ef362820 100644
--- a/layout/forms/nsMeterFrame.cpp
+++ b/layout/forms/nsMeterFrame.cpp
@@ -75,14 +75,9 @@ nsMeterFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
mBarDiv = doc->CreateHTMLElement(nsGkAtoms::div);
// Associate ::-moz-meter-bar pseudo-element to the anonymous child.
- CSSPseudoElementType pseudoType = CSSPseudoElementType::mozMeterBar;
- RefPtr<nsStyleContext> newStyleContext = PresContext()->StyleSet()->
- ResolvePseudoElementStyle(mContent->AsElement(), pseudoType,
- StyleContext(), mBarDiv->AsElement());
+ mBarDiv->SetPseudoElementType(CSSPseudoElementType::mozMeterBar);
- if (!aElements.AppendElement(ContentInfo(mBarDiv, newStyleContext))) {
- return NS_ERROR_OUT_OF_MEMORY;
- }
+ aElements.AppendElement(mBarDiv);
return NS_OK;
}