[webkit-reviews] review granted: [Bug 239127] Replace AtomString(const char*) with AtomString::fromLatin1(const char*) : [Attachment 457410] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Apr 12 18:07:48 PDT 2022


Darin Adler <darin at apple.com> has granted Chris Dumez <cdumez at apple.com>'s
request for review:
Bug 239127: Replace AtomString(const char*) with AtomString::fromLatin1(const
char*)
https://bugs.webkit.org/show_bug.cgi?id=239127

Attachment 457410: Patch

https://bugs.webkit.org/attachment.cgi?id=457410&action=review




--- Comment #9 from Darin Adler <darin at apple.com> ---
Comment on attachment 457410
  --> https://bugs.webkit.org/attachment.cgi?id=457410
Patch

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

> Source/WTF/wtf/text/AtomString.h:171
> +    AtomString(const char*);

Might even mark this explicit.

> Source/WebCore/dom/DocumentInlines.h:42
> +inline AtomString Document::encoding() const { return
AtomString::fromLatin1(textEncoding().domName()); }

I wonder if this is better AtomString than String; worth thinking about at some
point, now obviously good to change just this.

> Source/WebCore/editing/HTMLInterchange.h:39
> +#define ApplePasteAsQuotation     "Apple-paste-as-quotation"_s
> +#define AppleStyleSpanClass	     "Apple-style-span"_s
> +#define AppleTabSpanClass	     "Apple-tab-span"_s
> +#define WebKitMSOListQuirksStyle  "WebKit-mso-list-quirks-style"_s

If we’re changing it this much, maybe we can use constexpr instead of #define

> Source/WebCore/page/Quirks.cpp:504
> +	       if (auto* paneContainer =
node->treeScope().getElementById(AtomString("paneContainer"_s))) {

Does this require an explicit conversion?


More information about the webkit-reviews mailing list