Use nsContentUtils::WordBreaker() in nsTextServicesDocument::FindWordBounds

RESOLVED FIXED in mozilla15

Status

()

Core
Editor
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: Ms2ger, Assigned: Ms2ger)

Tracking

Trunk
mozilla15
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
Created attachment 619404 [details] [diff] [review]
Patch v1
Attachment #619404 - Flags: review?(ehsan)
Comment on attachment 619404 [details] [diff] [review]
Patch v1

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

::: editor/txtsvc/src/nsTextServicesDocument.cpp
@@ +3755,5 @@
>  
> +  nsIWordBreaker* wordBreaker = nsContentUtils::WordBreaker();
> +  nsWordRange res = wordBreaker->FindWord(str, strLen, strOffset);
> +  if (res.mBegin > strLen) {
> +    return !str ? NS_ERROR_NULL_POINTER : NS_ERROR_ILLEGAL_VALUE;

Nit: please remove the !, and reverse the error values.
Attachment #619404 - Flags: review?(ehsan) → review+
(Assignee)

Comment 2

5 years ago
https://hg.mozilla.org/mozilla-central/rev/fb433d12a332
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
You need to log in before you can comment on or make changes to this bug.