[Webkit-unassigned] [Bug 153768] Factor style sharing code out of StyleResolver

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Feb 1 18:33:18 PST 2016


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

--- Comment #5 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 270435
  --> https://bugs.webkit.org/attachment.cgi?id=270435
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=270435&action=review

> Source/WebCore/style/StyleSharingResolver.cpp:50
> +    EInsideLink elementLinkState;

Should we lazily compute this value to avoid looking up the hash table proactively?

> Source/WebCore/style/StyleSharingResolver.cpp:77
> +    if (!element.parentElement())
> +        return nullptr;

You no longer check the existence of parent style.  Is that expected?

> Source/WebCore/style/StyleSharingResolver.cpp:362
> +    for (unsigned i = 0; i < classNames.size(); ++i) {

Should we store classNames.size() in a local variable instead?

> Source/WebCore/style/StyleSharingResolver.h:46
> +    const Element* searchSimilar(const Element&) const;

I got confused by this name because it sounded as if we need to do further verification to make sure we can share a style with it.
How about "findStyleSharableElement" or "findElementToShareStyle"?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160202/bc24d2db/attachment.html>


More information about the webkit-unassigned mailing list