Bug 1423990 - Follow-up for conditionally compiled code for Thunderbird. r=smaug

--HG--
extra : amend_source : e1e50e7e55d2c014b2ae8487f2cf9b7299da5879
This commit is contained in:
Jorg K 2017-12-26 02:58:00 +02:00
Родитель 9f89b69c65
Коммит 8ed13df845
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -1409,7 +1409,8 @@ nsHTMLCopyEncoder::SetSelection(nsISelection* aSelection)
// Wait for Firefox to get fixed to detect pre-formatting correctly,
// bug 1174452.
nsAutoString styleVal;
if (selContent->GetAttr(kNameSpaceID_None, nsGkAtoms::style, styleVal) &&
if (selContent->IsElement() &&
selContent->AsElement()->GetAttr(kNameSpaceID_None, nsGkAtoms::style, styleVal) &&
styleVal.Find(NS_LITERAL_STRING("pre-wrap")) != kNotFound) {
mIsTextWidget = true;
break;