[Webkit-unassigned] [Bug 76611] Content element should be able to be dynamically added/removed/replaced in a shadow tree.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 1 02:06:43 PST 2012


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





--- Comment #26 from MORITA Hajime <morrita at google.com>  2012-02-01 02:06:43 PST ---
(From update of attachment 124862)
View in context: https://bugs.webkit.org/attachment.cgi?id=124862&action=review

> Source/WebCore/dom/Element.cpp:947
> +        Node::attach();

Wow, here bug is. This should be after parentPusher.push().
Could you write a test to capture this?

> Source/WebCore/dom/ShadowRoot.cpp:177
> +    for (Node* child = host()->firstChild(); child; child = child->nextSibling()) {

Could you cache host() value for efficiency?

> Source/WebCore/dom/ShadowRoot.h:77
> +    bool m_needsShadowTreeStyleRecalc : 1;

This flag name looks confusing. What we need is not only recalculating style, but also invoking reattach.
The name should imply the fact.

> Source/WebCore/dom/ShadowRoot.h:98
> +    return m_needsShadowTreeStyleRecalc;

hasContentElement() check could be moved here.

> Source/WebCore/html/shadow/HTMLContentElement.cpp:99
> +        if (root->shadowHost())

This change is also can be moved to the flag setter.

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