[Webkit-unassigned] [Bug 25319] caret does not paint after type in characters in right aligned div or after delete all characters in RTL div or 0px right padding RTL textarea

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 20 15:16:16 PDT 2010


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





--- Comment #24 from Darin Adler <darin at apple.com>  2010-04-20 15:16:15 PST ---
(From update of attachment 53685)
> +        rightEdge = cb->x() + cb->width();

I think that instead of cb->x() + cb->width() you could write
cb->frameRect().right(). It seems a little clearer to me.

I didn't review all the code, but I have two comments on the part I did read.

> +    switch (cbStyle->textAlign()) {
> +    case TAAUTO:
> +    case JUSTIFY:
> +        if (cbStyle->direction() == RTL)
> +            rightAligned = true;

I would write this as:

    rightAligned = cbStyle->direction() == RTL;

> +        break;
> +    case RIGHT:
> +    case WEBKIT_RIGHT:
> +        rightAligned = true;
> +        break;
> +    default:
> +        break;
> +    }

It's better style to list all the ETextAlign values here and leave out the
default case. That way, if a new ETextAlign value is added later we will get a
warning when compiling with GCC.

I didn't mark this review+ yet because I'm not entirely sure it's right. Mitz
should look at this.

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