Skip to content
Snippets Groups Projects
Commit 9f99a8ad authored by Emilio Cobos Álvarez's avatar Emilio Cobos Álvarez
Browse files

Bug 1382568: Avoid trying to resolve styles in an uninitialized presshell in GetInnerText. r=heycam

MozReview-Commit-ID: DFFb5OCQpHG

--HG--
extra : rebase_source : 2338719ce46efc405d845cc41ea633336c4e971c
parent a0324a14
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment