The default bug view has changed. See this FAQ.

Cleanup GetPriorHTMLSibling/GetNextHTMLSibling

RESOLVED FIXED in mozilla14

Status

()

Core
Editor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla14
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments)

(Assignee)

Description

5 years ago
Created attachment 614087 [details] [diff] [review]
Part a: preparatory cleanup

Note that none of the callers of GetPriorHTMLSibling(nsIDOMNode*, PRInt32, nsCOMPtr<nsIDOMNode>*) looks at the nsresult it returns, so it doesn't matter that we return NS_OK instead of NS_ERROR_NULL_POINTER when |node| is null.

Also note that GetChildAt will return null for out-of-bounds access, so the extra check (only in GetPriorHTMLSibling) isn't necessary.
Attachment #614087 - Flags: review?(ehsan)
(Assignee)

Comment 1

5 years ago
Created attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions
Attachment #614088 - Flags: review?(ehsan)

Updated

5 years ago
Attachment #614087 - Flags: review?(ehsan) → review+
Comment on attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions

Review of attachment 614088 [details] [diff] [review]:
-----------------------------------------------------------------

Beautiful!
Attachment #614088 - Flags: review?(ehsan) → review+
(Assignee)

Comment 3

5 years ago
https://hg.mozilla.org/mozilla-central/rev/7a9bd13747ba
https://hg.mozilla.org/mozilla-central/rev/fd06332733e5
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla14
You need to log in before you can comment on or make changes to this bug.