[webkit-reviews] review granted: [Bug 86574] Avoid reparsing the style attribute when cloning elements. : [Attachment 142168] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed May 16 05:26:18 PDT 2012


Antti Koivisto <koivisto at iki.fi> has granted Andreas Kling <kling at webkit.org>'s
request for review:
Bug 86574: Avoid reparsing the style attribute when cloning elements.
https://bugs.webkit.org/show_bug.cgi?id=86574

Attachment 142168: Patch
https://bugs.webkit.org/attachment.cgi?id=142168&action=review

------- Additional Comments from Antti Koivisto <koivisto at iki.fi>
View in context: https://bugs.webkit.org/attachment.cgi?id=142168&action=review


r=me

> Source/WebCore/dom/Element.cpp:2109
> +    // Transfer additional data if the we are cloning from another element
of the same type.
> +    if (tagQName() == other.tagQName())
> +	   copyNonAttributePropertiesFromElement(other);

Would it be better to have a different function for cloning to an element with
a different tag name? That seems like a quite different case (why do we do it?)
from regular cloning.

> Source/WebCore/dom/StyledElement.h:36
> +enum ShouldReparseStyleAttribute { DoNotReparseStyleAttribute = 0,
ReparseStyleAttribute = 1 };

I would scope this to StyledElement.


More information about the webkit-reviews mailing list