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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 3 06:40:49 PST 2011


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





--- Comment #18 from Yael <yael.aharon at nokia.com>  2011-02-03 06:40:48 PST ---
(In reply to comment #14)
Thank you for your review,
> (From update of attachment 80968 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=80968&action=review
> 
> What happened to the change log comments?
> 
Sorry, forgot to add them back after re-genrating the changelog :(

> > Source/WebCore/ChangeLog:29
> 
> Same here.
> 
Yup, forgot them here too :(

> > Source/WebCore/dom/Node.cpp:1255
> > +    if (parentNode() && parentNode()->getFlag(SelfOrAncestorHasDirAutoFlag))
> > +        setFlag(SelfOrAncestorHasDirAutoFlag);
> > +
> 
> It’s strange that inheriting this bit from the parent happens in attach() and not when actually being added to the parent in the DOM tree. It is also not cleared when attaching under a parent that doesn’t have the flag set, so it seems as if you can move a subtree from under a dir="auto" parent to a dir="ltr" parent and the subtree will maintain the flag.
> 
I am not sure I understand the difference between "Node::attach" and adding to the parent in the DOM tree? I was wondering if I should do something in detach(), and I guess I should. However, is detach() not the same as removing a node from the DOM ?

> I am still fuzzy on whether this patch (a) handles all dynamic cases correctly and (b) does not scan descendants multiple times as the tree is constructed. I guess that depends on when childrenChanged() is called during parsing.
> 
You are right, there are multiple scanning during construction. I'll see if I can mark only the part of the tree up to the first relevant text node.

> > Source/WebCore/html/HTMLElement.cpp:905
> > +    setAttribute(dirAttr, textDirection == LTR ? "ltr" : " rtl");
> 
> Did you mean to set the attribute here?
No, I wanted to change the css direction on the existing attribute. sorry about that.

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