Closed Bug 941710 Opened 12 years ago Closed 12 years ago

move out text boundary calculation from GetPosAndText

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Whiteboard: [qa-])

Attachments

(1 file)

Attached patch patchSplinter Review
No description provided.
Attachment #8336156 - Flags: review?(trev.saunders)
Assignee: nobody → surkov.alexander
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+
(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?
(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.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: