зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1422931
- Part 1: Fix crash with slot element. r=smaug
This commit is contained in:
Родитель
ba42dac599
Коммит
491af03c03
|
@ -66,7 +66,8 @@ ExplicitChildIterator::ExplicitChildIterator(const nsIContent* aParent,
|
|||
mIsFirst(aStartAtBeginning),
|
||||
mIndexInInserted(0)
|
||||
{
|
||||
mParentAsSlot = HTMLSlotElement::FromContent(mParent);
|
||||
mParentAsSlot = nsContentUtils::IsWebComponentsEnabled() ?
|
||||
HTMLSlotElement::FromContent(mParent) : nullptr;
|
||||
}
|
||||
|
||||
nsIContent*
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<!-- Testing slot element with "dom.webcomponents.enabled" set to false -->
|
||||
<slot><div></div></slot>
|
||||
</html>
|
|
@ -236,4 +236,5 @@ load 1406109-1.html
|
|||
pref(dom.webcomponents.enabled,true) load 1324463.html
|
||||
pref(dom.webcomponents.customelements.enabled,true) load 1413815.html
|
||||
load 1411473.html
|
||||
pref(dom.webcomponents.enabled,false) load 1422931.html
|
||||
pref(dom.webcomponents.enabled,true) load 1419799.html
|
||||
|
|
|
@ -7534,7 +7534,7 @@ nsContentUtils::IsContentInsertionPoint(nsIContent* aContent)
|
|||
bool
|
||||
nsContentUtils::HasDistributedChildren(nsIContent* aContent)
|
||||
{
|
||||
if (!aContent) {
|
||||
if (!IsWebComponentsEnabled() || !aContent) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче