HTMLEditRules::IsEmptyInline() returns false when given node is not an inline element

NEW
Unassigned

Status

()

P3
normal
a year ago
a year ago

People

(Reporter: masayuki, Unassigned)

Tracking

(Blocks: 1 bug)

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

This is really odd behavior if caller checks its result with |!|.

http://searchfox.org/mozilla-central/rev/baf47b352e873d4516d7656186d6d7c7447d3873/editor/libeditor/HTMLEditRules.cpp#7941,7946,7951

> bool
> HTMLEditRules::IsEmptyInline(nsINode& aNode)
> {
>   NS_ENSURE_TRUE(mHTMLEditor, false);
>   RefPtr<HTMLEditor> htmlEditor(mHTMLEditor);
> 
>   if (IsInlineNode(aNode) && htmlEditor->IsContainer(&aNode)) {
>     bool isEmpty = true;
>     htmlEditor->IsEmptyNode(&aNode, &isEmpty);
>     return isEmpty;
>   }
>   return false;
> }
status-firefox57: affected → ---
Priority: -- → P3
You need to log in before you can comment on or make changes to this bug.