<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#c7">Comment # 7</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:koivisto@iki.fi" title="Antti Koivisto <koivisto@iki.fi>"> <span class="fn">Antti Koivisto</span></a>
</span></b>
<pre><span class="quote">> Should we lazily compute this value to avoid looking up the hash table
> proactively?</span >
Probably though I'm not sure if it makes much difference in practice.
<span class="quote">> > Source/WebCore/style/StyleSharingResolver.cpp:77
> > + if (!element.parentElement())
> > + return nullptr;
>
> You no longer check the existence of parent style. Is that expected?</span >
I'll put the check back. I'm not sure if it ever matters but can't really prove it.
<span class="quote">> > Source/WebCore/style/StyleSharingResolver.cpp:362
> > + for (unsigned i = 0; i < classNames.size(); ++i) {
>
> Should we store classNames.size() in a local variable instead?</span >
Or rather use range-for.
<span class="quote">> 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"?</span >
The class name is Style::SharingResolver so I feel "style" and "share" are redundant in the function name. I sort of like "similar" since it communicates why we can share style with it.</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>