[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
Wed Feb 16 09:07:02 PST 2011
https://bugs.webkit.org/show_bug.cgi?id=25298
--- Comment #32 from Xiaomei Ji <xji at chromium.org> 2011-02-16 09:07:01 PST ---
> > > 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.
--
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