[Webkit-unassigned] [Bug 61324] New: --webkit-visual-word does not work well in words separated by multiple spaces
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon May 23 17:00:21 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=61324
Summary: --webkit-visual-word does not work well in words
separated by multiple spaces
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: HTML Editing
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: xji at chromium.org
CC: playmobil at google.com, progame+wk at gmail.com,
rniwa at webkit.org
Blocks: 25298
Thanks Yair who reported this.
For example, following logical text in LTR context:
" abc def hij".
The word breaks are:
" |abc | def | hij".
When cursor is at position "abc |", press ctrl-right-arrow should move cursor to "|def", instead, it moves cursor to "def | hij".
The automatic test has a flaw and misses this case. The automatic test uses sel.modify("move", "right", "character") followed by sel.modify("move", "right", "word") to test caret move by word in every character position. But sel.modify("move", "right", "character") actually does not stop at every character position, it bypasses collapsed spaces. For example, when cursor is at "abc |", sel.modify("move", "right", "character") moves cursor to "d|ef".
The cause of this failure is in positionBeforeNextWord(), where it checks whether the position itself is a word break, and if it is, this position is used as positionAfterCurrentWord, and position before next word is calculated. But position "abc |" is not considered as position after current word since its previous word break's next word break is at position "abc |", not itself "abc |".
I could not think of a better way to solve this except remove those positionBeforeNextWord/positionAfterPreviousWord short-cut.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list