[Webkit-unassigned] [Bug 65542] Need support for dirname attribute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 1 10:19:17 PDT 2011


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





--- Comment #12 from Aharon (Vladimir) Lanin <aharon at google.com>  2011-11-01 10:19:16 PST ---
(In reply to comment #11)
> (In reply to comment #10)
> > (From update of attachment 111386 [details] [details])
> > View in context: https://bugs.webkit.org/attachment.cgi?id=111386&action=review
> > 
> > disclaimer: I'm not  a WK reviewer
> > 
> > >>> Source/WebCore/html/HTMLTextFormControlElement.cpp:584
> > >>> +        dir = String("ltr");
> > >> 
> > >> I don't know this is a right code to detect direction of the value.
> > >> Does any WebKit RTL expert have comment on this?
> > > 
> > > Yes, RTL expert can comment on this.
> > 
> > Seems really wrong that you're resolving the style yourself here, then again that might be the right way of doing it.
> > Would  computedStyle()->direction() work?
> > 
> My understanding of the spec is that we need to consider only "dir" attribute and not css style "direction". Perhaps Aharon can confirm that?

The HTML spec says that the value has to have "the directionality" of the element, i.e. http://dev.w3.org/html5/spec/Overview.html#the-directionality. This, indeed, is not a function of CSS, but only of the element's (or an ancestor's) dir attribute - and the element's value, if the dir value is auto. (The dirname control's value is always either "ltr" or "rtl" - never "auto".)

When I filed a bug on the HTML spec (http://www.w3.org/Bugs/Public/show_bug.cgi?id=10809) requesting this feature, I had asked for the computed direction style to be reported. Others had also expected this to be the outcome. However, when the HTML spec editor finally agreed to put in the feature (or a version of it that he liked), he formulated it to use the directionality, not the computed direction style. There may have been weighty reasons for that; I did not ask. It does seem a bit backwards to have an HTML feature be dependent on CSS.

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