зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1382568: Avoid trying to resolve styles in an uninitialized presshell in GetInnerText. r=heycam
MozReview-Commit-ID: DFFb5OCQpHG --HG-- extra : rebase_source : 2338719ce46efc405d845cc41ea633336c4e971c
This commit is contained in:
Родитель
a0324a142f
Коммит
9f99a8ad5f
|
@ -3060,7 +3060,10 @@ nsGenericHTMLElement::GetInnerText(mozilla::dom::DOMString& aValue,
|
|||
{
|
||||
if (!GetPrimaryFrame(FlushType::Layout)) {
|
||||
nsIPresShell* presShell = nsComputedDOMStyle::GetPresShellForContent(this);
|
||||
if (!presShell || IsOrHasAncestorWithDisplayNone(this, presShell)) {
|
||||
// NOTE(emilio): We need to check the presshell is styled in order to ensure
|
||||
// the document is styled.
|
||||
if (!presShell || !presShell->DidInitialize() ||
|
||||
IsOrHasAncestorWithDisplayNone(this, presShell)) {
|
||||
GetTextContentInternal(aValue, aError);
|
||||
return;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче