Bug 160206 - Move ControlStates hashmap to RenderBox.
Summary: Move ControlStates hashmap to RenderBox.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-26 12:29 PDT by zalan
Modified: 2016-07-26 14:50 PDT (History)
5 users (show)

See Also:


Attachments
Patch (8.06 KB, patch)
2016-07-26 12:33 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (7.97 KB, patch)
2016-07-26 14:20 PDT, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2016-07-26 12:29:44 PDT
RenderBox is the only client.
Comment 1 zalan 2016-07-26 12:33:06 PDT
Created attachment 284618 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-07-26 13:09:17 PDT
Comment on attachment 284618 [details]
Patch

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

> Source/WebCore/platform/ControlStates.h:102
> +    RetainPtr<PlatformControlInstance> m_controlInstance { nullptr };

No need for this.

> Source/WebCore/rendering/RenderBox.cpp:113
> +static HashMap<const RenderObject*, std::unique_ptr<ControlStates>>& controlStatesRendererMap()

Maybe do a using for HashMap<const RenderObject*, std::unique_ptr<ControlStates>>

> Source/WebCore/rendering/RenderBox.cpp:180
> +    removeControlStatesForRenderer(*this);

Maybe we should use a bit to avoid this hash lookup on every RenderBox dtor.
Comment 3 zalan 2016-07-26 14:20:24 PDT
Created attachment 284629 [details]
Patch
Comment 4 WebKit Commit Bot 2016-07-26 14:50:37 PDT
Comment on attachment 284629 [details]
Patch

Clearing flags on attachment: 284629

Committed r203738: <http://trac.webkit.org/changeset/203738>
Comment 5 WebKit Commit Bot 2016-07-26 14:50:42 PDT
All reviewed patches have been landed.  Closing bug.