<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - RenderStyle should not be reference counted"
href="https://bugs.webkit.org/show_bug.cgi?id=156846#c11">Comment # 11</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - RenderStyle should not be reference counted"
href="https://bugs.webkit.org/show_bug.cgi?id=156846">bug 156846</a>
from <span class="vcard"><a class="email" href="mailto:darin@apple.com" title="Darin Adler <darin@apple.com>"> <span class="fn">Darin Adler</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=276944&action=diff" name="attach_276944" title="patch">attachment 276944</a> <a href="attachment.cgi?id=276944&action=edit" title="patch">[details]</a></span>
patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=276944&action=review">https://bugs.webkit.org/attachment.cgi?id=276944&action=review</a>
<span class="quote">> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2268
> +static inline RenderStyle* computeRenderStyleForProperty(Node* styledNode, PseudoId pseudoElementSpecifier, CSSPropertyID propertyID, std::unique_ptr<RenderStyle>& ownedStyle)</span >
Maybe we should make a class template that supports this use in the future. A union of unique_ptr with a raw pointer that can hold either an owned or unowned pointer. Or we can make a smaller implementation that uses a boolean. Would be nice to not have to add an extra local variable and argument for cases like this. Might even be a way to do this with a unique_ptr and a custom deleter; not sure if the deleter can have 1 bit of state.</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>