Closed Bug 1215816 Opened 9 years ago Closed 9 years ago

nsContentIterator::Init(nsIDOMRange*) shouldn't include end node if it's an empty element and end offset is 0 when mPre == true

Categories

(Core :: DOM: Core & HTML, defect)

44 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: masayuki, Assigned: masayuki)

References

Details

Attachments

(1 file)

Similar to bug 1215798, nsContentIterator::Init(nsIDOMRange*) has another bug at deciding the end node of the range. When the end node is an empty element and the end offset is 0, the iterator shouldn't enumerate the end node. E.g., <p>[<br>]<br></p> At this case, the range is { startNode: first <br>, startOffset: 0, endNode: second <br>, endOffset: 0 }. With te patch of 1215798, pre-order iterator enumerates both <br> elements in this case.
I'm not sure if you're the best person to review a patch of nsContentIterator, though. See comment 0 for the detail.
Attachment #8675423 - Flags: review?(bugs)
Attachment #8675423 - Flags: review?(bugs) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/e55d4c56c0ee3bdecef68c73e90ab299a9abbd44 Bug 1215816 nsContentIterator::Init(nsIDOMRange*) should not include end node if it's an empty element and the end offset is 0 when mPre is true r=smaug
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: