WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
101499
Chromium Android port should consider "." as a word delimiter in English
https://bugs.webkit.org/show_bug.cgi?id=101499
Summary
Chromium Android port should consider "." as a word delimiter in English
Xianzhu Wang
Reported
2012-11-07 11:44:38 PST
On Android there are some special requirements about word selection. When the selection is to contain all white spaces, select an empty range instead to allow pasting. We also want to treat '.' as delimiters of words even when there is no space after the '.'.
Attachments
Patch
(3.52 KB, patch)
2012-11-07 12:26 PST
,
Xianzhu Wang
no flags
Details
Formatted Diff
Diff
Patch
(11.63 KB, patch)
2012-11-08 10:28 PST
,
Xianzhu Wang
rniwa
: review-
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Xianzhu Wang
Comment 1
2012-11-07 12:26:34 PST
Created
attachment 172858
[details]
Patch
Adam Barth
Comment 2
2012-11-07 13:22:39 PST
It's surprising that we're doing this work in the WebKit layer. Most other OS-specific selection handling is done in the editing code.
Adam Barth
Comment 3
2012-11-07 13:23:05 PST
Comment on
attachment 172858
[details]
Patch Marking r- for now based on the comment above.
Ryosuke Niwa
Comment 4
2012-11-07 13:25:36 PST
Comment on
attachment 172858
[details]
Patch Yeah this definitely doesn’t belong in WebKit layer.
Xianzhu Wang
Comment 5
2012-11-08 10:28:52 PST
Created
attachment 173067
[details]
Patch
Adam Barth
Comment 6
2012-11-08 18:46:53 PST
@rniwa: Would you be willing to review this patch? I'm unsure if this is the best way to add OS-specific behavior to visible selection.
Ryosuke Niwa
Comment 7
2012-11-08 19:02:17 PST
Comment on
attachment 173067
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=173067&action=review
> Source/WebCore/editing/android/VisibleSelectionAndroid.cpp:51 > + // Don't expand beyond '.' for word granularity. > + VisiblePosition originalStart = m_start; > + validate(granularity);
No, this is what you want to modify. You want to do this at much lower level by overriding ICU's behavior. Modify findNextWordFromIndex in TextBoundaries.cpp. You probably want to add TextBoundariesAndroid.cpp.
Ryosuke Niwa
Comment 8
2012-11-08 19:04:57 PST
By the way, this won't work in CJK where 。is used as a substitute for period. I bet ICU has some options to tweak this. +xji for ICU expertise, and +ap, +mitz for word break iteration
Ryosuke Niwa
Comment 9
2012-11-08 19:05:03 PST
By the way, this won't work in CJK where 。is used as a substitute for period. I bet ICU has some options to tweak this. +xji for ICU expertise, and +ap, +mitz for word break iteration
Xianzhu Wang
Comment 10
2012-11-08 19:14:34 PST
(In reply to
comment #7
)
> (From update of
attachment 173067
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=173067&action=review
> > > Source/WebCore/editing/android/VisibleSelectionAndroid.cpp:51 > > + // Don't expand beyond '.' for word granularity. > > + VisiblePosition originalStart = m_start; > > + validate(granularity); > > No, this is what you want to modify. You want to do this at much lower level by overriding ICU's behavior. > Modify findNextWordFromIndex in TextBoundaries.cpp. You probably want to add TextBoundariesAndroid.cpp.
Per the requirements, all we want to change is the long press word selection behavior, but not other word breaking behavior. We can discuss the requirements offline.
Ryosuke Niwa
Comment 11
2012-11-08 19:20:23 PST
(In reply to
comment #10
)
> Per the requirements, all we want to change is the long press word selection behavior, but not other word breaking behavior. We can discuss the requirements offline.
That's a very interesting requirement. With all due respect, I strongly recommend you to re-consider this feature and possibly get rid of it altogether. I don't know what's special about "." but changing the behavior of word breaking just for the purpose of long press doesn't sound like something we want to support in WebKit.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug