[webkit-reviews] review requested: [Bug 24303] Using keyboard select RTL text, Highlight goes to opposite direction from FF&IE : [Attachment 28815] patch w/ Layout test (version 2)

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Mar 20 18:32:25 PDT 2009


Xiaomei Ji <xji at chromium.org> has asked  for review:
Bug 24303: Using keyboard select RTL text, Highlight goes to opposite direction
from FF&IE
https://bugs.webkit.org/show_bug.cgi?id=24303

Attachment 28815: patch w/ Layout test (version 2)
https://bugs.webkit.org/attachment.cgi?id=28815&action=review

------- Additional Comments from Xiaomei Ji <xji at chromium.org>
There is one part I am not sure.

Looks like FF does not across block boundary when extending selection.
But currently, Webkit across block boundary while extending selection if the
blocks are parent-child. It can extend selection inward or outward.
For example: 
<div> whatever <div dir="rtl"> just a test</div> end</div>
selection can be extended from the block "just a test" to "whatever ... end",
and vice versa.

In the current fix, when checking the directionality of enclosing block 
(SelectionController::directionOfEnclosingBlock()), I used the starting point
of the selection (m_sel.base().node()), not the ending point
(m_sel.extend().node()).

So, for the above, if the selection start at the outer block, the direction is
always treated as LTR even when it reaches the inner block. If the selection
starts at the inner block, the direction is always treated as RTL even when it
reaches the outer block.

Otherwise, the selection will be on and off by one character when it reaches
the direction change boundary. Or maybe we can check whether the current extent
reaches the enclosing block boundary and stops extending if it does.


More information about the webkit-reviews mailing list