mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1241752 - Remove runtime warning for nsIContent::GetEditingHost(). r=smaug
Returning a null editing host for a non-editable is a normal failing case, which does not need a warning.
This commit is contained in:
parent
6e798db711
commit
37c666ef89
@ -239,10 +239,15 @@ dom::Element*
|
||||
nsIContent::GetEditingHost()
|
||||
{
|
||||
// If this isn't editable, return nullptr.
|
||||
NS_ENSURE_TRUE(IsEditableInternal(), nullptr);
|
||||
if (!IsEditableInternal()) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
nsIDocument* doc = GetComposedDoc();
|
||||
NS_ENSURE_TRUE(doc, nullptr);
|
||||
if (!doc) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// If this is in designMode, we should return <body>
|
||||
if (doc->HasFlag(NODE_IS_EDITABLE) && !IsInShadowTree()) {
|
||||
return doc->GetBodyElement();
|
||||
|
Loading…
Reference in New Issue
Block a user