Closed
Bug 941710
Opened 12 years ago
Closed 12 years ago
move out text boundary calculation from GetPosAndText
Categories
(Core :: Disability Access APIs, defect)
Core
Disability Access APIs
Tracking
()
RESOLVED
FIXED
mozilla28
People
(Reporter: surkov, Assigned: surkov)
References
(Blocks 1 open bug)
Details
(Whiteboard: [qa-])
Attachments
(1 file)
|
11.29 KB,
patch
|
tbsaunde
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #8336156 -
Flags: review?(trev.saunders)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → surkov.alexander
Comment 1•12 years ago
|
||
Comment on attachment 8336156 [details] [diff] [review]
patch
>+HyperTextAccessible::TextBounds(int32_t aStartOffset, int32_t aEndOffset,
>+ uint32_t aCoordType)
>+{
>+ int32_t startOffset = ConvertMagicOffset(aStartOffset);
>+ int32_t endOffset = ConvertMagicOffset(aEndOffset);
>+
>+ int32_t childIdx = GetChildIndexAtOffset(startOffset);
>+ if (childIdx == -1)
>+ return nsIntRect();
assert startoffset == endoffset == 0?
Attachment #8336156 -
Flags: review?(trev.saunders) → review+
| Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Trevor Saunders (:tbsaunde) from comment #1)
> assert startoffset == endoffset == 0?
should we assert for more cases for example startoffset >= endoffsert? do we need to return early?
Comment 3•12 years ago
|
||
(In reply to alexander :surkov from comment #2)
> (In reply to Trevor Saunders (:tbsaunde) from comment #1)
>
> > assert startoffset == endoffset == 0?
>
> should we assert for more cases for example startoffset >= endoffsert? do we
> need to return early?
more aserts can't hurt. As for returning early I guess it depends on if consumers are trusted to be sane.
| Assignee | ||
Comment 4•12 years ago
|
||
Comment 5•12 years ago
|
||
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Updated•12 years ago
|
Whiteboard: [qa-]
You need to log in
before you can comment on or make changes to this bug.
Description
•