[Webkit-unassigned] [Bug 156846] RenderStyle should not be reference counted

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 21 13:44:54 PDT 2016


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

--- Comment #11 from Darin Adler <darin at apple.com> ---
Comment on attachment 276944
  --> https://bugs.webkit.org/attachment.cgi?id=276944
patch

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

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:2268
> +static inline RenderStyle* computeRenderStyleForProperty(Node* styledNode, PseudoId pseudoElementSpecifier, CSSPropertyID propertyID, std::unique_ptr<RenderStyle>& ownedStyle)

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.

-- 
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/20160421/2ae70aa4/attachment.html>


More information about the webkit-unassigned mailing list