[Webkit-unassigned] [Bug 50916] Add support for dir=auto

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 8 14:43:51 PST 2011


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





--- Comment #26 from Dave Hyatt <hyatt at apple.com>  2011-02-08 14:43:51 PST ---
(From update of attachment 81401)
View in context: https://bugs.webkit.org/attachment.cgi?id=81401&action=review

> Source/WebCore/dom/Element.cpp:1226
> +    if (isHTMLElement())
> +        adjustDirectionalityIfNeededAfterChildrenChanged(beforeChange, childCountDelta);

You should just make HTMLElement::childrenChanged and put this code there.  That way non-HTML elements don't have to test this.

> Source/WebCore/dom/Element.cpp:1827
> +TextDirection Element::directionalityIfhasDirAutoAttribute(bool& isAuto) const

Shouldn't the next 130 lines of code (all these functions) be in HTMLElement?  dir only applies to HTML, right, so it seems weird to have all this code sitting in Element.

> Source/WebCore/dom/Element.h:367
> +    void setHasDirAutoFlagRecursively(bool, Node* = 0);
> +    void dirAttributeChanged(Attribute*);
> +    void adjustDirectionalityIfNeededAfterChildAttributeChanged(Element* child);
> +    void calculateAndAdjustDirectionality();
> +    void adjustDirectionalityIfNeededAfterChildrenChanged(Node* beforeChange, int childCountDelta);

See my previous comment.  Why is all this in Element?  If auto is an HTML-specific feature only, does this have to be here?

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