Backed out 4 changesets (bug 1331322) for Android reftest failures in 1169331-1.html and forced-bg-color-outside-visible-region.html

Backed out changeset 96c6b5a11284 (bug 1331322)
Backed out changeset 15877d32de7d (bug 1331322)
Backed out changeset 841d608704d7 (bug 1331322)
Backed out changeset 02096c5eb029 (bug 1331322)
This commit is contained in:
Phil Ringnalda
2017-02-15 21:24:00 -08:00
parent b1ef1c8c3b
commit a6b8226a11
25 changed files with 131 additions and 269 deletions

View File

@@ -325,15 +325,27 @@ nsresult
nsNumberControlFrame::MakeAnonymousElement(Element** aResult,
nsTArray<ContentInfo>& aElements,
nsIAtom* aTagName,
CSSPseudoElementType aPseudoType)
CSSPseudoElementType aPseudoType,
nsStyleContext* aParentContext)
{
// Get the NodeInfoManager and tag necessary to create the anonymous divs.
nsCOMPtr<nsIDocument> doc = mContent->GetComposedDoc();
RefPtr<Element> resultElement = doc->CreateHTMLElement(aTagName);
resultElement->SetPseudoElementType(aPseudoType);
// If we legitimately fail this assertion and need to allow
// non-pseudo-element anonymous children, then we'll need to add a branch
// that calls ResolveStyleFor((*aResult)->AsElement(), aParentContext)") to
// set newStyleContext.
NS_ASSERTION(aPseudoType != CSSPseudoElementType::NotPseudo,
"Expecting anonymous children to all be pseudo-elements");
// Associate the pseudo-element with the anonymous child
if (!aElements.AppendElement(resultElement)) {
RefPtr<nsStyleContext> newStyleContext =
PresContext()->StyleSet()->ResolvePseudoElementStyle(mContent->AsElement(),
aPseudoType,
aParentContext,
resultElement);
if (!aElements.AppendElement(ContentInfo(resultElement, newStyleContext))) {
return NS_ERROR_OUT_OF_MEMORY;
}
@@ -370,7 +382,8 @@ nsNumberControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
rv = MakeAnonymousElement(getter_AddRefs(mOuterWrapper),
aElements,
nsGkAtoms::div,
CSSPseudoElementType::mozNumberWrapper);
CSSPseudoElementType::mozNumberWrapper,
mStyleContext);
NS_ENSURE_SUCCESS(rv, rv);
ContentInfo& outerWrapperCI = aElements.LastElement();
@@ -379,7 +392,8 @@ nsNumberControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
rv = MakeAnonymousElement(getter_AddRefs(mTextField),
outerWrapperCI.mChildren,
nsGkAtoms::input,
CSSPseudoElementType::mozNumberText);
CSSPseudoElementType::mozNumberText,
outerWrapperCI.mStyleContext);
NS_ENSURE_SUCCESS(rv, rv);
mTextField->SetAttr(kNameSpaceID_None, nsGkAtoms::type,
@@ -426,7 +440,8 @@ nsNumberControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
rv = MakeAnonymousElement(getter_AddRefs(mSpinBox),
outerWrapperCI.mChildren,
nsGkAtoms::div,
CSSPseudoElementType::mozNumberSpinBox);
CSSPseudoElementType::mozNumberSpinBox,
outerWrapperCI.mStyleContext);
NS_ENSURE_SUCCESS(rv, rv);
ContentInfo& spinBoxCI = outerWrapperCI.mChildren.LastElement();
@@ -435,14 +450,16 @@ nsNumberControlFrame::CreateAnonymousContent(nsTArray<ContentInfo>& aElements)
rv = MakeAnonymousElement(getter_AddRefs(mSpinUp),
spinBoxCI.mChildren,
nsGkAtoms::div,
CSSPseudoElementType::mozNumberSpinUp);
CSSPseudoElementType::mozNumberSpinUp,
spinBoxCI.mStyleContext);
NS_ENSURE_SUCCESS(rv, rv);
// Create the ::-moz-number-spin-down pseudo-element:
rv = MakeAnonymousElement(getter_AddRefs(mSpinDown),
spinBoxCI.mChildren,
nsGkAtoms::div,
CSSPseudoElementType::mozNumberSpinDown);
CSSPseudoElementType::mozNumberSpinDown,
spinBoxCI.mStyleContext);
SyncDisabledState();