Bug 123401 - RenderElement::m_style should be a Ref.
Summary: RenderElement::m_style should be a Ref.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Andreas Kling
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-28 06:42 PDT by Andreas Kling
Modified: 2013-10-28 08:47 PDT (History)
9 users (show)

See Also:


Attachments
Patch (7.08 KB, patch)
2013-10-28 06:49 PDT, Andreas Kling
koivisto: review+
eflews.bot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Kling 2013-10-28 06:42:10 PDT
m_style can not be null, so let's enforce this at compile-time.
Comment 1 Andreas Kling 2013-10-28 06:49:50 PDT
Created attachment 215300 [details]
Patch
Comment 2 Antti Koivisto 2013-10-28 06:56:38 PDT
Comment on attachment 215300 [details]
Patch

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

> Source/WebCore/rendering/RenderElement.cpp:415
> +    Ref<RenderStyle> oldStyle(std::move(style));
> +    m_style.swap(oldStyle);

It is bit misleading that you put the new style to a variable called oldStyle. Might API that would work like

Ref<RenderStyle> oldStyle(m_style.swap(std::move(style)))

be better?
Comment 3 EFL EWS Bot 2013-10-28 07:44:52 PDT
Comment on attachment 215300 [details]
Patch

Attachment 215300 [details] did not pass efl-wk2-ews (efl-wk2):
Output: http://webkit-queues.appspot.com/results/15558149
Comment 4 Andreas Kling 2013-10-28 08:47:06 PDT
Committed r158111: <http://trac.webkit.org/changeset/158111>