[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 Feb 21 22:32:19 PST 2011


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





--- Comment #33 from mitz at webkit.org  2011-02-21 22:32:18 PST ---
(In reply to comment #32)
> > > > Source/WebCore/editing/visible_units.cpp:1221
> > > > +enum WORDDIRECTION {
> > > > +    LEFTWORD,
> > > > +    RIGHTWORD
> > > > +};
> > > 
> > > Enums and their values should be in “CamelCase”, not uppercase. How does this enum differ from TextDirection?
> > 
> > This is only used to differentiate whether we are moving cursor left or right. It is introduced so that the leftWordPosition() and rightWordPosition() could share a common function. 
> > 
> > > 
> > > > Source/WebCore/editing/visible_units.cpp:1233
> > > > +        VisiblePosition wordBreak = ((direction == RIGHTWORD && box->direction() == LTR) || (direction == LEFTWORD && box->direction() == RTL) ? nextWordPosition(c) : previousWordPosition(c));
> > > 
> > > For example, here, if you used TextDirection instead of WORDDIRECTION you could have just written this expression as
> > >     (direction == boxDirection) ? nextWordPosition(c) : previousWordPosition(c);
> > 
> > 
> > It could. The problem is the meaning of the enum.
> > 
> 
> Think it over again, I feel it is reasonable that they share the same enum.

Actually, I see your point about TextDirection being inappropriate. This should use the pre-existing SelectionDirection values DirectionLeft and DirectionRight.

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