[Webkit-unassigned] [Bug 65542] Need support for dirname attribute
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Nov 2 17:37:11 PDT 2011
https://bugs.webkit.org/show_bug.cgi?id=65542
--- Comment #16 from Yael <yael.aharon at nokia.com> 2011-11-02 17:37:10 PST ---
(In reply to comment #15)
> Please suggest if following code for finding directionality is correct?
>
> if (fastHasAttribute(dirAttr)) {
> AtomicString dirAttributeValue = fastGetAttribute(dirAttr);
> if (equalIgnoringCase(dirAttributeValue, "rtl") || equalIgnoringCase(dirAttributeValue, "ltr"))
> return dirAttributeValue;
>
> if (equalIgnoringCase(dirAttributeValue, "auto")) {
> bool isAuto;
> TextDirection textDirection = directionalityIfhasDirAutoAttribute(isAuto);
> return textDirection == RTL ? "rtl" : "ltr";
> }
> }
>
> return "ltr";
>
> I think 'return "ltr";' should be 'return directionality() == RTL ? "rtl" : "ltr";'
> but directionality() is private in HTMLElement.
If an element does not have a dir attribute, the default should be "ltr" .
return "ltr" is the right thing to do here. Directionality should be checked only when there is a dir attribute and its value is "auto".
--
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