Bug 214416 - Make DocumentParser.ParserState an enum class
Summary: Make DocumentParser.ParserState an enum class
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-07-16 11:27 PDT by Rob Buis
Modified: 2020-07-16 23:40 PDT (History)
6 users (show)

See Also:


Attachments
Patch (3.87 KB, patch)
2020-07-16 11:28 PDT, Rob Buis
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2020-07-16 11:27:08 PDT
Make DocumentParser.ParserState an enum class since it is more readable.
Comment 1 Rob Buis 2020-07-16 11:28:12 PDT
Created attachment 404468 [details]
Patch
Comment 2 Darin Adler 2020-07-16 14:22:17 PDT
Comment on attachment 404468 [details]
Patch

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

> Source/WebCore/dom/DocumentParser.h:70
> +    bool isStopped() const { return m_state >= ParserState::Stopped; }

Very sneaky that this one is different from the other three.

I wonder if some of the callers who are checking isStopped() actually should be checking !isParsing() instead.
Comment 3 EWS 2020-07-16 23:39:13 PDT
Committed r264501: <https://trac.webkit.org/changeset/264501>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 404468 [details].
Comment 4 Radar WebKit Bug Importer 2020-07-16 23:40:17 PDT
<rdar://problem/65710633>