[Webkit-unassigned] [Bug 25298] Ctrl + Right/Left arrow move forward/backward through document instead of right/left in RTL text

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jan 11 10:42:02 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=25298


Xiaomei Ji <xji at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #78476|0                           |1
        is obsolete|                            |
  Attachment #78476|review?                     |
               Flag|                            |
  Attachment #78549|                            |review?
               Flag|                            |




--- Comment #29 from Xiaomei Ji <xji at chromium.org>  2011-01-11 10:42:01 PST ---
Created an attachment (id=78549)
 --> (https://bugs.webkit.org/attachment.cgi?id=78549&action=review)
patch w/ layout test

fix compilation error in chromium and qt (efl error seems not related).


I tried different approaches, but seems this brutal force way works the best: it is the easiest, cleanest, and closest to complete correctness.

The patch computes word boundary box by box in order to save the correct word break position either before a space or after a space (if space is used as word breaker), so <div>who<span>ever</span><div> might be considered as 2 words "who" and "ever".

The patch works for most cases, but does not work well in complex structure such as block with inline element that having different directionality. It does not work well in 2 aspects:
1. word break might stop at both positions before and after a space in some case.
For example: <div dir=rtl class="test_move_by_word" contenteditable>abc ששש def <span dir=ltr>שנב  abc סטז</span>  uvw זזז xyz</div>
press ctrl-right-arrow when cursor is before "שנב abc" moves cursor after "שנב", press it again moves cursor after '  '(space).

2. word break might stop at the wrong position around space in some case. 
For example: <div dir=rtl class="test_move_by_word" contenteditable>abc ששש def <span dir=ltr>שנב  abc סטז</span>  uvw זזז xyz</div>
press ctrl-right-arrow when cursor is before "def שנב" moves cursor after '  '(space).

-- 
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