Closed Bug 971831 Opened 10 years ago Closed 10 years ago

get rid of RangeBoundToHypertextOffset

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla30

People

(Reporter: surkov, Assigned: lpy)

References

(Blocks 1 open bug)

Details

(Whiteboard: [good first bug][mentor=surkov.alexander@gmail.com][lang=c++])

Attachments

(1 file, 2 obsolete files)

OS: Mac OS X → All
Assignee: nobody → pylaurent1314
Attached patch bug971831.patch (obsolete) — Splinter Review
Attachment #8375379 - Flags: review?(surkov.alexander)
Comment on attachment 8375379 [details] [diff] [review]
bug971831.patch

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

pls remove RangeBoundToHypertextOffset method

::: accessible/src/generic/HyperTextAccessible.cpp
@@ +1864,5 @@
>    // the point is not in a range, that we do not need to compute an end offset,
>    // and that we should use the end offset of the last range to compute the
>    // start offset of the text attribute range.
> +  startHTOffset = DOMPointToOffset(domSel->GetRangeAt(rangeCount - 1)->GetEndParent(),
> +                                       domSel->GetRangeAt(rangeCount - 1)->EndOffset());

it'd be nicer to have local variable for range
nit: fix second line indentation
Attachment #8375379 - Flags: review?(surkov.alexander)
Attached patch bug971831-V2.patch (obsolete) — Splinter Review
thanks
Attachment #8375379 - Attachment is obsolete: true
Attachment #8375485 - Flags: review?(surkov.alexander)
Comment on attachment 8375485 [details] [diff] [review]
bug971831-V2.patch

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

r=me thx! please fix nits, attach new patch and add checking-needed keyword

::: accessible/src/generic/HyperTextAccessible.cpp
@@ +1826,3 @@
>  
>      if (idx > 0) {
> +      nsRange* domSelRange = domSel->GetRangeAt(idx - 1);

nit: pls rename it to prevRange

@@ +1842,5 @@
>    // We never found a range that ended after the point, therefore we know that
>    // the point is not in a range, that we do not need to compute an end offset,
>    // and that we should use the end offset of the last range to compute the
>    // start offset of the text attribute range.
> +  nsRange* domSelRange = domSel->GetRangeAt(rangeCount - 1);

same
Attachment #8375485 - Flags: review?(surkov.alexander) → review+
thanks
Attachment #8375485 - Attachment is obsolete: true
Attachment #8376035 - Flags: review+
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/93ce1741b01b
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla30
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: