Summary: | Add WeakPtr support to RenderObject. | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | bfulgham, commit-queue, dino, ggaren, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | WebKit Nightly Build | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Bug Depends on: | 177389 | ||||||||
Bug Blocks: | |||||||||
Attachments: |
|
Description
zalan
2017-09-25 06:14:56 PDT
This is related to bug 177389 Created attachment 321679 [details]
Patch
Created attachment 322188 [details]
Patch
Comment on attachment 322188 [details] Patch Clearing flags on attachment: 322188 Committed r222653: <http://trac.webkit.org/changeset/222653> All reviewed patches have been landed. Closing bug. Comment on attachment 322188 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=322188&action=review > Source/WebCore/rendering/RenderMultiColumnFlow.cpp:441 > + m_spannerMap.add(placeholder.spanner(), placeholder.createWeakPtr<RenderMultiColumnSpannerPlaceholder>()); This is bit awkward. Could we have a standalone template function so we could just do makeWeakPtr(placeholder) and get correctly typed WeakPtr automatically? > > Source/WebCore/rendering/RenderMultiColumnFlow.cpp:441
> > + m_spannerMap.add(placeholder.spanner(), placeholder.createWeakPtr<RenderMultiColumnSpannerPlaceholder>());
>
> This is bit awkward. Could we have a standalone template function so we
> could just do
>
> makeWeakPtr(placeholder)
>
> and get correctly typed WeakPtr automatically?
Totally!
Maybe we should also change the interface so that WeakPtrFactory vends WeakReference<T>& instead of WeakPtr<T> and WeakPtr<T> automatically constructs itself, just like RefPtr, using that WeakReference<T>&.
|