Last Comment Bug 744507 - Cleanup GetPriorHTMLSibling/GetNextHTMLSibling
: Cleanup GetPriorHTMLSibling/GetNextHTMLSibling
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: Editor (show other bugs)
: Trunk
: All All
: -- normal (vote)
: mozilla14
Assigned To: :Ms2ger (⌚ UTC+1/+2)
:
: Makoto Kato [:m_kato]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-11 11:40 PDT by :Ms2ger (⌚ UTC+1/+2)
Modified: 2012-04-15 06:41 PDT (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Part a: preparatory cleanup (2.22 KB, patch)
2012-04-11 11:40 PDT, :Ms2ger (⌚ UTC+1/+2)
ehsan: review+
Details | Diff | Splinter Review
Part b: Add nsINode versions (7.55 KB, patch)
2012-04-11 11:41 PDT, :Ms2ger (⌚ UTC+1/+2)
ehsan: review+
Details | Diff | Splinter Review

Description :Ms2ger (⌚ UTC+1/+2) 2012-04-11 11:40:51 PDT
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.
Comment 1 :Ms2ger (⌚ UTC+1/+2) 2012-04-11 11:41:27 PDT
Created attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions
Comment 2 :Ehsan Akhgari 2012-04-12 11:35:12 PDT
Comment on attachment 614088 [details] [diff] [review]
Part b: Add nsINode versions

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

Beautiful!

Note You need to log in before you can comment on or make changes to this bug.