Use constants for pointer types
Created attachment 361077 [details] Patch
Comment on attachment 361077 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=361077&action=review > Source/WebCore/dom/PointerEvent.h:90 > + static const String& mousePointerType() { static NeverDestroyed<const String> mouse(MAKE_STATIC_STRING_IMPL("mouse")); return mouse; } > + static const String& penPointerType() { static NeverDestroyed<const String> pen(MAKE_STATIC_STRING_IMPL("pen")); return pen; } > + static const String& touchPointerType() { static NeverDestroyed<const String> touch(MAKE_STATIC_STRING_IMPL("touch")); return touch; } Generally we put static NeverDestroyed variables like this in the cpp file so that we only end up with one (otherwise you get one per cpp that includes this header).
Created attachment 361099 [details] Patch
Created attachment 361100 [details] Patch for landing
Committed r240943: <https://trac.webkit.org/changeset/240943>
<rdar://problem/47799893>