<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Factor style sharing code out of StyleResolver"
href="https://bugs.webkit.org/show_bug.cgi?id=153768#c5">Comment # 5</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Factor style sharing code out of StyleResolver"
href="https://bugs.webkit.org/show_bug.cgi?id=153768">bug 153768</a>
from <span class="vcard"><a class="email" href="mailto:rniwa@webkit.org" title="Ryosuke Niwa <rniwa@webkit.org>"> <span class="fn">Ryosuke Niwa</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=270435&action=diff" name="attach_270435" title="patch">attachment 270435</a> <a href="attachment.cgi?id=270435&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=270435&action=review">https://bugs.webkit.org/attachment.cgi?id=270435&action=review</a>
<span class="quote">> Source/WebCore/style/StyleSharingResolver.cpp:50
> + EInsideLink elementLinkState;</span >
Should we lazily compute this value to avoid looking up the hash table proactively?
<span class="quote">> Source/WebCore/style/StyleSharingResolver.cpp:77
> + if (!element.parentElement())
> + return nullptr;</span >
You no longer check the existence of parent style. Is that expected?
<span class="quote">> Source/WebCore/style/StyleSharingResolver.cpp:362
> + for (unsigned i = 0; i < classNames.size(); ++i) {</span >
Should we store classNames.size() in a local variable instead?
<span class="quote">> Source/WebCore/style/StyleSharingResolver.h:46
> + const Element* searchSimilar(const Element&) const;</span >
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"?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>