Bug 157871 - Make LayoutUnit::operator bool() explicit.
Summary: Make LayoutUnit::operator bool() explicit.
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-05-18 16:26 PDT by zalan
Modified: 2016-05-18 20:10 PDT (History)
5 users (show)

See Also:


Attachments
Patch (2.19 KB, patch)
2016-05-18 16:29 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (2.26 KB, patch)
2016-05-18 18:48 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-05-18 16:26:44 PDT
This is in preparation to get LayoutUnit operator int() removed.
Comment 1 zalan 2016-05-18 16:29:21 PDT
Created attachment 279314 [details]
Patch
Comment 2 Simon Fraser (smfr) 2016-05-18 16:48:03 PDT
Comment on attachment 279314 [details]
Patch

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

> Source/WebCore/rendering/RenderView.cpp:280
> +    state.m_isPaginated = !!state.m_pageLogicalHeight;

I really think != 0 is better in these situations, and damn the style checker.
Comment 3 zalan 2016-05-18 17:01:41 PDT
(In reply to comment #2)
> Comment on attachment 279314 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=279314&action=review
> 
> > Source/WebCore/rendering/RenderView.cpp:280
> > +    state.m_isPaginated = !!state.m_pageLogicalHeight;
> 
> I really think != 0 is better in these situations, and damn the style
> checker.

Agree! It might even be more correct to check if state.m_pageLogicalHeight > 0
Comment 4 zalan 2016-05-18 18:48:52 PDT
Created attachment 279335 [details]
Patch
Comment 5 WebKit Commit Bot 2016-05-18 20:10:42 PDT
Comment on attachment 279335 [details]
Patch

Clearing flags on attachment: 279335

Committed r201124: <http://trac.webkit.org/changeset/201124>
Comment 6 WebKit Commit Bot 2016-05-18 20:10:47 PDT
All reviewed patches have been landed.  Closing bug.