Closed Bug 716215 Opened 14 years ago Closed 14 years ago

nsHTMLEditor::IsEmptyNodeImpl checks if the parent is a form widget instead of the child

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla12

People

(Reporter: Ms2ger, Assigned: jhk)

Details

(Whiteboard: [good first bug][mentor=ehsan][lang=c++])

Attachments

(1 file)

<http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/html/nsHTMLEditor.cpp#4958> has 4921 while (child) 4923 nsCOMPtr<nsIDOMNode> node = child; 4959 else if (nsHTMLEditUtils::IsFormWidget(aNode)) 4960 { // break out if we find we aren't empty 4961 *outIsEmptyNode = false; 4962 return NS_OK; 4963 } where it probably wants to check nsHTMLEditUtils::IsFormWidget(node). Ehsan, could you confirm?
In fact, there's an early return for nsHTMLEditUtils::IsFormWidget(aNode) at line 4904.
(In reply to Ms2ger from comment #0) > <http://mxr.mozilla.org/mozilla-central/source/editor/libeditor/html/ > nsHTMLEditor.cpp#4958> has > > 4921 while (child) > 4923 nsCOMPtr<nsIDOMNode> node = child; > 4959 else if (nsHTMLEditUtils::IsFormWidget(aNode)) > 4960 { // break out if we find we aren't empty > 4961 *outIsEmptyNode = false; > 4962 return NS_OK; > 4963 } > > where it probably wants to check nsHTMLEditUtils::IsFormWidget(node). Ehsan, > could you confirm? Yes, you're right.
Whiteboard: [good first bug][mentor=ehsan]
Whiteboard: [good first bug][mentor=ehsan] → [good first bug][mentor=ehsan][lang=c++]
Attached patch PatchSplinter Review
Assignee: nobody → jigneshhk1992
Attachment #587274 - Flags: review?(Ms2ger)
Comment on attachment 587274 [details] [diff] [review] Patch Thanks, looks good.
Attachment #587274 - Flags: superreview?(ehsan)
Attachment #587274 - Flags: review?(Ms2ger)
Attachment #587274 - Flags: review+
Comment on attachment 587274 [details] [diff] [review] Patch Looks great, Jignesh, thanks a lot! Do you have try server access? Have you tested this patch on the try server?
Attachment #587274 - Flags: superreview?(ehsan) → superreview+
> Do you have try server access? Have > you tested this patch on the try server? No. I have applied for try access and will get it soon :). Thanks!
Status: NEW → RESOLVED
Closed: 14 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla12
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: