Bug 185961

Summary: Avoid constructing the string "all" repeatedly in MediaQueryParser
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: CSSAssignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, darin, ggaren, koivisto, simon.fraser, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Chris Dumez 2018-05-24 14:37:52 PDT
Avoid constructing the string "all" repeatedly in MediaQueryParser.
Comment 1 Chris Dumez 2018-05-24 14:41:06 PDT
Created attachment 341225 [details]
Patch
Comment 2 Simon Fraser (smfr) 2018-05-24 16:42:41 PDT
Comment on attachment 341225 [details]
Patch

Maybe we should use AtomicStrings for media types?
Comment 3 WebKit Commit Bot 2018-05-24 17:09:47 PDT
Comment on attachment 341225 [details]
Patch

Clearing flags on attachment: 341225

Committed r232173: <https://trac.webkit.org/changeset/232173>
Comment 4 WebKit Commit Bot 2018-05-24 17:09:48 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Radar WebKit Bug Importer 2018-05-24 17:10:21 PDT
<rdar://problem/40540318>
Comment 6 Darin Adler 2018-05-25 21:24:31 PDT
This change is OK, but I wonder why we need std::optional<String> since String already has distinct null and empty values. Maybe use a null string instead of std::nullopt?