[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
Mon Jan 10 17:31:30 PST 2011


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


Xiaomei Ji <xji at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #30436|0                           |1
        is obsolete|                            |
  Attachment #57283|0                           |1
        is obsolete|                            |
  Attachment #58093|0                           |1
        is obsolete|                            |
  Attachment #78476|                            |review?
               Flag|                            |




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

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