Bug 186015 - Modernize RenderStyleConstants.h - Part 3
Summary: Modernize RenderStyleConstants.h - Part 3
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Weinig
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-05-26 12:55 PDT by Sam Weinig
Modified: 2018-05-27 17:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (97.44 KB, patch)
2018-05-26 13:05 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (99.00 KB, patch)
2018-05-26 14:05 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews117 for mac-sierra (382.90 KB, application/zip)
2018-05-26 15:10 PDT, EWS Watchlist
no flags Details
Patch (98.93 KB, patch)
2018-05-26 17:35 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews112 for mac-sierra (3.13 MB, application/zip)
2018-05-26 19:24 PDT, EWS Watchlist
no flags Details
Patch (102.98 KB, patch)
2018-05-26 19:34 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff
Patch (102.94 KB, patch)
2018-05-27 15:34 PDT, Sam Weinig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Weinig 2018-05-26 12:55:13 PDT
Modernize RenderStyleConstants.h - Part 3
Comment 1 Sam Weinig 2018-05-26 13:05:08 PDT Comment hidden (obsolete)
Comment 2 EWS Watchlist 2018-05-26 13:06:51 PDT Comment hidden (obsolete)
Comment 3 Sam Weinig 2018-05-26 14:05:16 PDT Comment hidden (obsolete)
Comment 4 EWS Watchlist 2018-05-26 14:07:48 PDT Comment hidden (obsolete)
Comment 5 EWS Watchlist 2018-05-26 15:10:22 PDT Comment hidden (obsolete)
Comment 6 EWS Watchlist 2018-05-26 15:10:23 PDT Comment hidden (obsolete)
Comment 7 Sam Weinig 2018-05-26 17:35:21 PDT Comment hidden (obsolete)
Comment 8 Sam Weinig 2018-05-26 17:38:05 PDT
The fact that you can't construct an OptionSet with a enum value that happens to be 0 is a bit annoying. I'm not clear on the reasoning for it.
Comment 9 EWS Watchlist 2018-05-26 17:38:29 PDT Comment hidden (obsolete)
Comment 10 EWS Watchlist 2018-05-26 19:24:41 PDT Comment hidden (obsolete)
Comment 11 EWS Watchlist 2018-05-26 19:24:42 PDT Comment hidden (obsolete)
Comment 12 Sam Weinig 2018-05-26 19:34:31 PDT
Created attachment 341416 [details]
Patch
Comment 13 EWS Watchlist 2018-05-26 19:35:59 PDT Comment hidden (obsolete)
Comment 14 Yusuke Suzuki 2018-05-27 07:36:26 PDT
Comment on attachment 341416 [details]
Patch

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

r=me with comments.

> Source/WebCore/css/CSSComputedStyleDeclaration.cpp:-1839
> -    if (speakAs & SpeakNormal)

Since `SpeakNormal` was 0 previously, I think this path was never executed (speakAs & SpeakNormal is always zero). Is the following code correct?

> Source/WebCore/css/CSSLineBoxContainValue.h:35
> +enum LineBoxContainFlags {

Should we change this to `enum class` too?
Comment 15 Sam Weinig 2018-05-27 15:34:26 PDT
Created attachment 341432 [details]
Patch
Comment 16 EWS Watchlist 2018-05-27 15:37:27 PDT
Attachment 341432 [details] did not pass style-queue:


ERROR: Source/WebCore/rendering/TextDecorationPainter.cpp:252:  Code inside a namespace should not be indented.  [whitespace/indent] [4]
Total errors found: 1 in 39 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 17 Sam Weinig 2018-05-27 17:22:32 PDT
(In reply to Yusuke Suzuki from comment #14)
> Comment on attachment 341416 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=341416&action=review
> 
> r=me with comments.
> 
> > Source/WebCore/css/CSSComputedStyleDeclaration.cpp:-1839
> > -    if (speakAs & SpeakNormal)
> 
> Since `SpeakNormal` was 0 previously, I think this path was never executed
> (speakAs & SpeakNormal is always zero). Is the following code correct?

That code is funny. The added code doesn't actually change behavior, because the old code ended up doing the same thing at the end of the chain of if-statements if the list was empty. Anyway, no reason to have duplicate functionality so I removed that initial if.

> 
> > Source/WebCore/css/CSSLineBoxContainValue.h:35
> > +enum LineBoxContainFlags {
> 
> Should we change this to `enum class` too?

Yeah, I'll get there.
Comment 18 WebKit Commit Bot 2018-05-27 17:49:27 PDT
Comment on attachment 341432 [details]
Patch

Clearing flags on attachment: 341432

Committed r232229: <https://trac.webkit.org/changeset/232229>
Comment 19 WebKit Commit Bot 2018-05-27 17:49:29 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 Radar WebKit Bug Importer 2018-05-27 17:50:27 PDT
<rdar://problem/40588982>