Bug 1427302 - Stop supporting type=content-* on XUL <browser>s, r=bz

Was: Backed out changeset 83fbff91e9d2 (bug 1328605).

MozReview-Commit-ID: 2itUgw8Ogkl

--HG--
extra : rebase_source : bad855f0292b28eb61b1549a1d96914a792c0fb6
This commit is contained in:
Gijs Kruitbosch 2018-01-10 19:37:29 +00:00
Родитель 258d33e8ca
Коммит 9d094a2464
3 изменённых файлов: 8 добавлений и 25 удалений

Просмотреть файл

@ -1130,15 +1130,8 @@ nsFrameLoader::AddTreeItemToTreeOwner(nsIDocShellTreeItem* aItem,
NS_PRECONDITION(mOwnerContent, "Must have owning content");
nsAutoString value;
bool isContent = false;
mOwnerContent->GetAttr(kNameSpaceID_None, TypeAttrName(), value);
// we accept "content" and "content-xxx" values.
// We ignore anything that comes after 'content-'.
isContent = value.LowerCaseEqualsLiteral("content") ||
StringBeginsWith(value, NS_LITERAL_STRING("content-"),
nsCaseInsensitiveStringComparator());
bool isContent = mOwnerContent->AttrValueIs(
kNameSpaceID_None, TypeAttrName(), nsGkAtoms::content, eIgnoreCase);
// Force mozbrowser frames to always be typeContent, even if the
// mozbrowser interfaces are disabled.
@ -3182,12 +3175,8 @@ nsFrameLoader::TryRemoteBrowser()
return false;
}
nsAutoString value;
mOwnerContent->GetAttr(kNameSpaceID_None, nsGkAtoms::type, value);
if (!value.LowerCaseEqualsLiteral("content") &&
!StringBeginsWith(value, NS_LITERAL_STRING("content-"),
nsCaseInsensitiveStringComparator())) {
if (!mOwnerContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::type,
nsGkAtoms::content, eIgnoreCase)) {
return false;
}
@ -3748,13 +3737,7 @@ nsFrameLoader::AttributeChanged(nsIDocument* aDocument,
#endif
parentTreeOwner->ContentShellRemoved(mDocShell);
nsAutoString value;
aElement->GetAttr(kNameSpaceID_None, TypeAttrName(), value);
if (value.LowerCaseEqualsLiteral("content") ||
StringBeginsWith(value, NS_LITERAL_STRING("content-"),
nsCaseInsensitiveStringComparator())) {
if (aElement->AttrValueIs(kNameSpaceID_None, TypeAttrName(), nsGkAtoms::content, eIgnoreCase)) {
parentTreeOwner->ContentShellAdded(mDocShell, is_primary);
}
}

Просмотреть файл

@ -95,5 +95,5 @@
});
]]></script>
<browser type="content-primary" flex="1" id="content" src="about:blank"/>
<browser type="content" primary="true" flex="1" id="content" src="about:blank"/>
</window>

Просмотреть файл

@ -77,6 +77,6 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1271240
]]>
</script>
<!-- <browser type="content-primary" flex="1" id="content" />
<browser type="content-primary" flex="1" id="content-remote" remote="true" /> -->
<!-- <browser type="content" flex="1" id="content" />
<browser type="content" flex="1" id="content-remote" remote="true" /> -->
</window>