Changeset 275457 in webkit


Ignore:
Timestamp:
Apr 5, 2021 5:09:31 PM (3 years ago)
Author:
ysuzuki@apple.com
Message:

Define AtomString(ASCIILiteral) and use ASCIILiteral more to avoid memory allocation
https://bugs.webkit.org/show_bug.cgi?id=224125

Reviewed by Saam Barati.

Source/WebCore:

We apply "..."_s more. This avoids allocating of string storage when creating StringImpl.

  • accessibility/AccessibilityObject.cpp:

(WebCore::initializeRoleMap):

  • dom/ScriptElement.cpp:

(WebCore::isLegacySupportedJavaScriptLanguage):

  • editing/EditorCommand.cpp:

(WebCore::createCommandMap):

  • html/Autofill.cpp:

(WebCore::fieldNameMap):

  • platform/LegacySchemeRegistry.cpp:

(WebCore::builtinLocalURLSchemes):
(WebCore::builtinSecureSchemes):
(WebCore::builtinSchemesWithUniqueOrigins):
(WebCore::builtinEmptyDocumentSchemes):
(WebCore::builtinCanDisplayOnlyIfCanRequestSchemes):
(WebCore::builtinCORSEnabledSchemes):

  • platform/MIMETypeRegistry.cpp:

(WebCore::MIMETypeRegistry::systemPreviewMIMETypes):

  • platform/graphics/FontCascade.cpp:

(WebCore::FontCascade::hasValidAverageCharWidth const):

  • platform/graphics/HEVCUtilities.cpp:

(WebCore::codecStringForDoViCodecType):
(WebCore::profileIDForAlphabeticDoViProfile):

  • platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:

(WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):

  • platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:

(WebCore::AVAssetMIMETypeCache::staticContainerTypeList):

  • platform/graphics/cg/ImageSourceCGWin.cpp:

(WebCore::preferredExtensionForImageType):

  • svg/SVGTests.cpp:

(WebCore::supportedSVGFeatures):

Source/WTF:

Add AtomString(ASCIILiteral). ASCIILiteral ensures that storage is constant non-heap string by its type.
So we can just use it as a literal (not allocating a string storage).

  • wtf/text/AtomString.h:
Location:
trunk/Source
Files:
15 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r275449 r275457  
     12021-04-05  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Define AtomString(ASCIILiteral) and use ASCIILiteral more to avoid memory allocation
     4        https://bugs.webkit.org/show_bug.cgi?id=224125
     5
     6        Reviewed by Saam Barati.
     7
     8        Add AtomString(ASCIILiteral). ASCIILiteral ensures that storage is constant non-heap string by its type.
     9        So we can just use it as a literal (not allocating a string storage).
     10
     11        * wtf/text/AtomString.h:
     12
    1132021-04-02  Simon Fraser  <simon.fraser@apple.com>
    214
  • trunk/Source/WTF/wtf/text/AtomString.h

    r274896 r275457  
    7474    }
    7575
     76    AtomString(ASCIILiteral literal)
     77        : m_string(AtomStringImpl::addLiteral(literal.characters(), literal.length()))
     78    {
     79    }
     80
    7681    // We have to declare the copy constructor and copy assignment operator as well, otherwise
    7782    // they'll be implicitly deleted by adding the move constructor and move assignment operator.
     
    166171
    167172private:
    168     // The explicit constructors with AtomString::ConstructFromLiteral must be used for literals.
    169     AtomString(ASCIILiteral);
    170 
    171173    enum class CaseConvertType { Upper, Lower };
    172174    template<CaseConvertType> AtomString convertASCIICase() const;
  • trunk/Source/WebCore/ChangeLog

    r275450 r275457  
     12021-04-05  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        Define AtomString(ASCIILiteral) and use ASCIILiteral more to avoid memory allocation
     4        https://bugs.webkit.org/show_bug.cgi?id=224125
     5
     6        Reviewed by Saam Barati.
     7
     8        We apply "..."_s more. This avoids allocating of string storage when creating StringImpl.
     9
     10        * accessibility/AccessibilityObject.cpp:
     11        (WebCore::initializeRoleMap):
     12        * dom/ScriptElement.cpp:
     13        (WebCore::isLegacySupportedJavaScriptLanguage):
     14        * editing/EditorCommand.cpp:
     15        (WebCore::createCommandMap):
     16        * html/Autofill.cpp:
     17        (WebCore::fieldNameMap):
     18        * platform/LegacySchemeRegistry.cpp:
     19        (WebCore::builtinLocalURLSchemes):
     20        (WebCore::builtinSecureSchemes):
     21        (WebCore::builtinSchemesWithUniqueOrigins):
     22        (WebCore::builtinEmptyDocumentSchemes):
     23        (WebCore::builtinCanDisplayOnlyIfCanRequestSchemes):
     24        (WebCore::builtinCORSEnabledSchemes):
     25        * platform/MIMETypeRegistry.cpp:
     26        (WebCore::MIMETypeRegistry::systemPreviewMIMETypes):
     27        * platform/graphics/FontCascade.cpp:
     28        (WebCore::FontCascade::hasValidAverageCharWidth const):
     29        * platform/graphics/HEVCUtilities.cpp:
     30        (WebCore::codecStringForDoViCodecType):
     31        (WebCore::profileIDForAlphabeticDoViProfile):
     32        * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
     33        (WebCore::MediaPlayerPrivateAVFoundation::staticMIMETypeList):
     34        * platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm:
     35        (WebCore::AVAssetMIMETypeCache::staticContainerTypeList):
     36        * platform/graphics/cg/ImageSourceCGWin.cpp:
     37        (WebCore::preferredExtensionForImageType):
     38        * svg/SVGTests.cpp:
     39        (WebCore::supportedSVGFeatures):
     40
    1412021-04-02  Ryosuke Niwa  <rniwa@webkit.org>
    242
  • trunk/Source/WebCore/accessibility/AccessibilityObject.cpp

    r275410 r275457  
    20472047
    20482048    const RoleEntry roles[] = {
    2049         { "alert", AccessibilityRole::ApplicationAlert },
    2050         { "alertdialog", AccessibilityRole::ApplicationAlertDialog },
    2051         { "application", AccessibilityRole::WebApplication },
    2052         { "article", AccessibilityRole::DocumentArticle },
    2053         { "banner", AccessibilityRole::LandmarkBanner },
    2054         { "blockquote", AccessibilityRole::Blockquote },
    2055         { "button", AccessibilityRole::Button },
    2056         { "caption", AccessibilityRole::Caption },
    2057         { "checkbox", AccessibilityRole::CheckBox },
    2058         { "complementary", AccessibilityRole::LandmarkComplementary },
    2059         { "contentinfo", AccessibilityRole::LandmarkContentInfo },
    2060         { "deletion", AccessibilityRole::Deletion },
    2061         { "dialog", AccessibilityRole::ApplicationDialog },
    2062         { "directory", AccessibilityRole::Directory },
     2049        { "alert"_s, AccessibilityRole::ApplicationAlert },
     2050        { "alertdialog"_s, AccessibilityRole::ApplicationAlertDialog },
     2051        { "application"_s, AccessibilityRole::WebApplication },
     2052        { "article"_s, AccessibilityRole::DocumentArticle },
     2053        { "banner"_s, AccessibilityRole::LandmarkBanner },
     2054        { "blockquote"_s, AccessibilityRole::Blockquote },
     2055        { "button"_s, AccessibilityRole::Button },
     2056        { "caption"_s, AccessibilityRole::Caption },
     2057        { "checkbox"_s, AccessibilityRole::CheckBox },
     2058        { "complementary"_s, AccessibilityRole::LandmarkComplementary },
     2059        { "contentinfo"_s, AccessibilityRole::LandmarkContentInfo },
     2060        { "deletion"_s, AccessibilityRole::Deletion },
     2061        { "dialog"_s, AccessibilityRole::ApplicationDialog },
     2062        { "directory"_s, AccessibilityRole::Directory },
    20632063        // The 'doc-*' roles are defined the ARIA DPUB mobile: https://www.w3.org/TR/dpub-aam-1.0/
    20642064        // Editor's draft is currently at https://rawgit.com/w3c/aria/master/dpub-aam/dpub-aam.html
    2065         { "doc-abstract", AccessibilityRole::ApplicationTextGroup },
    2066         { "doc-acknowledgments", AccessibilityRole::LandmarkDocRegion },
    2067         { "doc-afterword", AccessibilityRole::LandmarkDocRegion },
    2068         { "doc-appendix", AccessibilityRole::LandmarkDocRegion },
    2069         { "doc-backlink", AccessibilityRole::WebCoreLink },
    2070         { "doc-biblioentry", AccessibilityRole::ListItem },
    2071         { "doc-bibliography", AccessibilityRole::LandmarkDocRegion },
    2072         { "doc-biblioref", AccessibilityRole::WebCoreLink },
    2073         { "doc-chapter", AccessibilityRole::LandmarkDocRegion },
    2074         { "doc-colophon", AccessibilityRole::ApplicationTextGroup },
    2075         { "doc-conclusion", AccessibilityRole::LandmarkDocRegion },
    2076         { "doc-cover", AccessibilityRole::Image },
    2077         { "doc-credit", AccessibilityRole::ApplicationTextGroup },
    2078         { "doc-credits", AccessibilityRole::LandmarkDocRegion },
    2079         { "doc-dedication", AccessibilityRole::ApplicationTextGroup },
    2080         { "doc-endnote", AccessibilityRole::ListItem },
    2081         { "doc-endnotes", AccessibilityRole::LandmarkDocRegion },
    2082         { "doc-epigraph", AccessibilityRole::ApplicationTextGroup },
    2083         { "doc-epilogue", AccessibilityRole::LandmarkDocRegion },
    2084         { "doc-errata", AccessibilityRole::LandmarkDocRegion },
    2085         { "doc-example", AccessibilityRole::ApplicationTextGroup },
    2086         { "doc-footnote", AccessibilityRole::Footnote },
    2087         { "doc-foreword", AccessibilityRole::LandmarkDocRegion },
    2088         { "doc-glossary", AccessibilityRole::LandmarkDocRegion },
    2089         { "doc-glossref", AccessibilityRole::WebCoreLink },
    2090         { "doc-index", AccessibilityRole::LandmarkNavigation },
    2091         { "doc-introduction", AccessibilityRole::LandmarkDocRegion },
    2092         { "doc-noteref", AccessibilityRole::WebCoreLink },
    2093         { "doc-notice", AccessibilityRole::DocumentNote },
    2094         { "doc-pagebreak", AccessibilityRole::Splitter },
    2095         { "doc-pagelist", AccessibilityRole::LandmarkNavigation },
    2096         { "doc-part", AccessibilityRole::LandmarkDocRegion },
    2097         { "doc-preface", AccessibilityRole::LandmarkDocRegion },
    2098         { "doc-prologue", AccessibilityRole::LandmarkDocRegion },
    2099         { "doc-pullquote", AccessibilityRole::ApplicationTextGroup },
    2100         { "doc-qna", AccessibilityRole::ApplicationTextGroup },
    2101         { "doc-subtitle", AccessibilityRole::Heading },
    2102         { "doc-tip", AccessibilityRole::DocumentNote },
    2103         { "doc-toc", AccessibilityRole::LandmarkNavigation },
    2104         { "figure", AccessibilityRole::Figure },
     2065        { "doc-abstract"_s, AccessibilityRole::ApplicationTextGroup },
     2066        { "doc-acknowledgments"_s, AccessibilityRole::LandmarkDocRegion },
     2067        { "doc-afterword"_s, AccessibilityRole::LandmarkDocRegion },
     2068        { "doc-appendix"_s, AccessibilityRole::LandmarkDocRegion },
     2069        { "doc-backlink"_s, AccessibilityRole::WebCoreLink },
     2070        { "doc-biblioentry"_s, AccessibilityRole::ListItem },
     2071        { "doc-bibliography"_s, AccessibilityRole::LandmarkDocRegion },
     2072        { "doc-biblioref"_s, AccessibilityRole::WebCoreLink },
     2073        { "doc-chapter"_s, AccessibilityRole::LandmarkDocRegion },
     2074        { "doc-colophon"_s, AccessibilityRole::ApplicationTextGroup },
     2075        { "doc-conclusion"_s, AccessibilityRole::LandmarkDocRegion },
     2076        { "doc-cover"_s, AccessibilityRole::Image },
     2077        { "doc-credit"_s, AccessibilityRole::ApplicationTextGroup },
     2078        { "doc-credits"_s, AccessibilityRole::LandmarkDocRegion },
     2079        { "doc-dedication"_s, AccessibilityRole::ApplicationTextGroup },
     2080        { "doc-endnote"_s, AccessibilityRole::ListItem },
     2081        { "doc-endnotes"_s, AccessibilityRole::LandmarkDocRegion },
     2082        { "doc-epigraph"_s, AccessibilityRole::ApplicationTextGroup },
     2083        { "doc-epilogue"_s, AccessibilityRole::LandmarkDocRegion },
     2084        { "doc-errata"_s, AccessibilityRole::LandmarkDocRegion },
     2085        { "doc-example"_s, AccessibilityRole::ApplicationTextGroup },
     2086        { "doc-footnote"_s, AccessibilityRole::Footnote },
     2087        { "doc-foreword"_s, AccessibilityRole::LandmarkDocRegion },
     2088        { "doc-glossary"_s, AccessibilityRole::LandmarkDocRegion },
     2089        { "doc-glossref"_s, AccessibilityRole::WebCoreLink },
     2090        { "doc-index"_s, AccessibilityRole::LandmarkNavigation },
     2091        { "doc-introduction"_s, AccessibilityRole::LandmarkDocRegion },
     2092        { "doc-noteref"_s, AccessibilityRole::WebCoreLink },
     2093        { "doc-notice"_s, AccessibilityRole::DocumentNote },
     2094        { "doc-pagebreak"_s, AccessibilityRole::Splitter },
     2095        { "doc-pagelist"_s, AccessibilityRole::LandmarkNavigation },
     2096        { "doc-part"_s, AccessibilityRole::LandmarkDocRegion },
     2097        { "doc-preface"_s, AccessibilityRole::LandmarkDocRegion },
     2098        { "doc-prologue"_s, AccessibilityRole::LandmarkDocRegion },
     2099        { "doc-pullquote"_s, AccessibilityRole::ApplicationTextGroup },
     2100        { "doc-qna"_s, AccessibilityRole::ApplicationTextGroup },
     2101        { "doc-subtitle"_s, AccessibilityRole::Heading },
     2102        { "doc-tip"_s, AccessibilityRole::DocumentNote },
     2103        { "doc-toc"_s, AccessibilityRole::LandmarkNavigation },
     2104        { "figure"_s, AccessibilityRole::Figure },
    21052105        // The mappings for 'graphics-*' roles are defined in this spec: https://w3c.github.io/graphics-aam/
    2106         { "graphics-document", AccessibilityRole::GraphicsDocument },
    2107         { "graphics-object", AccessibilityRole::GraphicsObject },
    2108         { "graphics-symbol", AccessibilityRole::GraphicsSymbol },
    2109         { "grid", AccessibilityRole::Grid },
    2110         { "gridcell", AccessibilityRole::GridCell },
    2111         { "table", AccessibilityRole::Table },
    2112         { "cell", AccessibilityRole::Cell },
    2113         { "columnheader", AccessibilityRole::ColumnHeader },
    2114         { "combobox", AccessibilityRole::ComboBox },
    2115         { "definition", AccessibilityRole::Definition },
    2116         { "document", AccessibilityRole::Document },
    2117         { "feed", AccessibilityRole::Feed },
    2118         { "form", AccessibilityRole::Form },
    2119         { "rowheader", AccessibilityRole::RowHeader },
    2120         { "group", AccessibilityRole::ApplicationGroup },
    2121         { "heading", AccessibilityRole::Heading },
    2122         { "img", AccessibilityRole::Image },
    2123         { "insertion", AccessibilityRole::Insertion },
    2124         { "link", AccessibilityRole::WebCoreLink },
    2125         { "list", AccessibilityRole::List },
    2126         { "listitem", AccessibilityRole::ListItem },
    2127         { "listbox", AccessibilityRole::ListBox },
    2128         { "log", AccessibilityRole::ApplicationLog },
    2129         { "main", AccessibilityRole::LandmarkMain },
    2130         { "marquee", AccessibilityRole::ApplicationMarquee },
    2131         { "math", AccessibilityRole::DocumentMath },
    2132         { "menu", AccessibilityRole::Menu },
    2133         { "menubar", AccessibilityRole::MenuBar },
    2134         { "menuitem", AccessibilityRole::MenuItem },
    2135         { "menuitemcheckbox", AccessibilityRole::MenuItemCheckbox },
    2136         { "menuitemradio", AccessibilityRole::MenuItemRadio },
    2137         { "meter", AccessibilityRole::Meter },
    2138         { "none", AccessibilityRole::Presentational },
    2139         { "note", AccessibilityRole::DocumentNote },
    2140         { "navigation", AccessibilityRole::LandmarkNavigation },
    2141         { "option", AccessibilityRole::ListBoxOption },
    2142         { "paragraph", AccessibilityRole::Paragraph },
    2143         { "presentation", AccessibilityRole::Presentational },
    2144         { "progressbar", AccessibilityRole::ProgressIndicator },
    2145         { "radio", AccessibilityRole::RadioButton },
    2146         { "radiogroup", AccessibilityRole::RadioGroup },
    2147         { "region", AccessibilityRole::LandmarkRegion },
    2148         { "row", AccessibilityRole::Row },
    2149         { "rowgroup", AccessibilityRole::RowGroup },
    2150         { "scrollbar", AccessibilityRole::ScrollBar },
    2151         { "search", AccessibilityRole::LandmarkSearch },
    2152         { "searchbox", AccessibilityRole::SearchField },
    2153         { "separator", AccessibilityRole::Splitter },
    2154         { "slider", AccessibilityRole::Slider },
    2155         { "spinbutton", AccessibilityRole::SpinButton },
    2156         { "status", AccessibilityRole::ApplicationStatus },
    2157         { "subscript", AccessibilityRole::Subscript },
    2158         { "superscript", AccessibilityRole::Superscript },
    2159         { "switch", AccessibilityRole::Switch },
    2160         { "tab", AccessibilityRole::Tab },
    2161         { "tablist", AccessibilityRole::TabList },
    2162         { "tabpanel", AccessibilityRole::TabPanel },
    2163         { "text", AccessibilityRole::StaticText },
    2164         { "textbox", AccessibilityRole::TextArea },
    2165         { "term", AccessibilityRole::Term },
    2166         { "time", AccessibilityRole::Time },
    2167         { "timer", AccessibilityRole::ApplicationTimer },
    2168         { "toolbar", AccessibilityRole::Toolbar },
    2169         { "tooltip", AccessibilityRole::UserInterfaceTooltip },
    2170         { "tree", AccessibilityRole::Tree },
    2171         { "treegrid", AccessibilityRole::TreeGrid },
    2172         { "treeitem", AccessibilityRole::TreeItem }
     2106        { "graphics-document"_s, AccessibilityRole::GraphicsDocument },
     2107        { "graphics-object"_s, AccessibilityRole::GraphicsObject },
     2108        { "graphics-symbol"_s, AccessibilityRole::GraphicsSymbol },
     2109        { "grid"_s, AccessibilityRole::Grid },
     2110        { "gridcell"_s, AccessibilityRole::GridCell },
     2111        { "table"_s, AccessibilityRole::Table },
     2112        { "cell"_s, AccessibilityRole::Cell },
     2113        { "columnheader"_s, AccessibilityRole::ColumnHeader },
     2114        { "combobox"_s, AccessibilityRole::ComboBox },
     2115        { "definition"_s, AccessibilityRole::Definition },
     2116        { "document"_s, AccessibilityRole::Document },
     2117        { "feed"_s, AccessibilityRole::Feed },
     2118        { "form"_s, AccessibilityRole::Form },
     2119        { "rowheader"_s, AccessibilityRole::RowHeader },
     2120        { "group"_s, AccessibilityRole::ApplicationGroup },
     2121        { "heading"_s, AccessibilityRole::Heading },
     2122        { "img"_s, AccessibilityRole::Image },
     2123        { "insertion"_s, AccessibilityRole::Insertion },
     2124        { "link"_s, AccessibilityRole::WebCoreLink },
     2125        { "list"_s, AccessibilityRole::List },
     2126        { "listitem"_s, AccessibilityRole::ListItem },
     2127        { "listbox"_s, AccessibilityRole::ListBox },
     2128        { "log"_s, AccessibilityRole::ApplicationLog },
     2129        { "main"_s, AccessibilityRole::LandmarkMain },
     2130        { "marquee"_s, AccessibilityRole::ApplicationMarquee },
     2131        { "math"_s, AccessibilityRole::DocumentMath },
     2132        { "menu"_s, AccessibilityRole::Menu },
     2133        { "menubar"_s, AccessibilityRole::MenuBar },
     2134        { "menuitem"_s, AccessibilityRole::MenuItem },
     2135        { "menuitemcheckbox"_s, AccessibilityRole::MenuItemCheckbox },
     2136        { "menuitemradio"_s, AccessibilityRole::MenuItemRadio },
     2137        { "meter"_s, AccessibilityRole::Meter },
     2138        { "none"_s, AccessibilityRole::Presentational },
     2139        { "note"_s, AccessibilityRole::DocumentNote },
     2140        { "navigation"_s, AccessibilityRole::LandmarkNavigation },
     2141        { "option"_s, AccessibilityRole::ListBoxOption },
     2142        { "paragraph"_s, AccessibilityRole::Paragraph },
     2143        { "presentation"_s, AccessibilityRole::Presentational },
     2144        { "progressbar"_s, AccessibilityRole::ProgressIndicator },
     2145        { "radio"_s, AccessibilityRole::RadioButton },
     2146        { "radiogroup"_s, AccessibilityRole::RadioGroup },
     2147        { "region"_s, AccessibilityRole::LandmarkRegion },
     2148        { "row"_s, AccessibilityRole::Row },
     2149        { "rowgroup"_s, AccessibilityRole::RowGroup },
     2150        { "scrollbar"_s, AccessibilityRole::ScrollBar },
     2151        { "search"_s, AccessibilityRole::LandmarkSearch },
     2152        { "searchbox"_s, AccessibilityRole::SearchField },
     2153        { "separator"_s, AccessibilityRole::Splitter },
     2154        { "slider"_s, AccessibilityRole::Slider },
     2155        { "spinbutton"_s, AccessibilityRole::SpinButton },
     2156        { "status"_s, AccessibilityRole::ApplicationStatus },
     2157        { "subscript"_s, AccessibilityRole::Subscript },
     2158        { "superscript"_s, AccessibilityRole::Superscript },
     2159        { "switch"_s, AccessibilityRole::Switch },
     2160        { "tab"_s, AccessibilityRole::Tab },
     2161        { "tablist"_s, AccessibilityRole::TabList },
     2162        { "tabpanel"_s, AccessibilityRole::TabPanel },
     2163        { "text"_s, AccessibilityRole::StaticText },
     2164        { "textbox"_s, AccessibilityRole::TextArea },
     2165        { "term"_s, AccessibilityRole::Term },
     2166        { "time"_s, AccessibilityRole::Time },
     2167        { "timer"_s, AccessibilityRole::ApplicationTimer },
     2168        { "toolbar"_s, AccessibilityRole::Toolbar },
     2169        { "tooltip"_s, AccessibilityRole::UserInterfaceTooltip },
     2170        { "tree"_s, AccessibilityRole::Tree },
     2171        { "treegrid"_s, AccessibilityRole::TreeGrid },
     2172        { "treeitem"_s, AccessibilityRole::TreeItem }
    21732173    };
    21742174
  • trunk/Source/WebCore/dom/ScriptElement.cpp

    r273203 r275457  
    112112{
    113113    static const auto languages = makeNeverDestroyed(HashSet<String, ASCIICaseInsensitiveHash> {
    114         "javascript",
    115         "javascript1.0",
    116         "javascript1.1",
    117         "javascript1.2",
    118         "javascript1.3",
    119         "javascript1.4",
    120         "javascript1.5",
    121         "javascript1.6",
    122         "javascript1.7",
    123         "livescript",
    124         "ecmascript",
    125         "jscript",
     114        "javascript"_s,
     115        "javascript1.0"_s,
     116        "javascript1.1"_s,
     117        "javascript1.2"_s,
     118        "javascript1.3"_s,
     119        "javascript1.4"_s,
     120        "javascript1.5"_s,
     121        "javascript1.6"_s,
     122        "javascript1.7"_s,
     123        "livescript"_s,
     124        "ecmascript"_s,
     125        "jscript"_s,
    126126    });
    127127    return languages.get().contains(language);
  • trunk/Source/WebCore/editing/EditorCommand.cpp

    r273077 r275457  
    15991599
    16001600struct CommandEntry {
    1601     const char* name;
     1601    ASCIILiteral name;
    16021602    EditorInternalCommand command;
    16031603};
     
    16061606{
    16071607    static const CommandEntry commands[] = {
    1608         { "AlignCenter", { executeJustifyCenter, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1609         { "AlignJustified", { executeJustifyFull, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1610         { "AlignLeft", { executeJustifyLeft, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1611         { "AlignRight", { executeJustifyRight, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1612         { "BackColor", { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueBackColor, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1613         { "Bold", { executeToggleBold, supported, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1614         { "ClearText", { executeClearText, supported, enabledClearText, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
    1615         { "Copy", { executeCopy, supportedCopyCut, enabledCopy, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledCopyCut } },
    1616         { "CreateLink", { executeCreateLink, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1617         { "Cut", { executeCut, supportedCopyCut, enabledCut, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledCopyCut } },
    1618         { "DefaultParagraphSeparator", { executeDefaultParagraphSeparator, supported, enabled, stateNone, valueDefaultParagraphSeparator, notTextInsertion, doNotAllowExecutionWhenDisabled} },
    1619         { "Delete", { executeDelete, supported, enabledDelete, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1620         { "DeleteBackward", { executeDeleteBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1621         { "DeleteBackwardByDecomposingPreviousCharacter", { executeDeleteBackwardByDecomposingPreviousCharacter, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1622         { "DeleteForward", { executeDeleteForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1623         { "DeleteToBeginningOfLine", { executeDeleteToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1624         { "DeleteToBeginningOfParagraph", { executeDeleteToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1625         { "DeleteToEndOfLine", { executeDeleteToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1626         { "DeleteToEndOfParagraph", { executeDeleteToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1627         { "DeleteToMark", { executeDeleteToMark, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1628         { "DeleteWordBackward", { executeDeleteWordBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1629         { "DeleteWordForward", { executeDeleteWordForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1630         { "FindString", { executeFindString, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1631         { "FontName", { executeFontName, supported, enabledInEditableText, stateNone, valueFontName, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1632         { "FontSize", { executeFontSize, supported, enabledInEditableText, stateNone, valueFontSize, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1633         { "FontSizeDelta", { executeFontSizeDelta, supported, enabledInEditableText, stateNone, valueFontSizeDelta, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1634         { "ForeColor", { executeForeColor, supported, enabledInRichlyEditableText, stateNone, valueForeColor, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1635         { "FormatBlock", { executeFormatBlock, supported, enabledInRichlyEditableText, stateNone, valueFormatBlock, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1636         { "ForwardDelete", { executeForwardDelete, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1637         { "HiliteColor", { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1638         { "IgnoreSpelling", { executeIgnoreSpelling, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1639         { "Indent", { executeIndent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1640         { "InsertBacktab", { executeInsertBacktab, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
    1641         { "InsertHTML", { executeInsertHTML, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1642         { "InsertHorizontalRule", { executeInsertHorizontalRule, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1643         { "InsertImage", { executeInsertImage, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1644         { "InsertLineBreak", { executeInsertLineBreak, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
    1645         { "InsertNewline", { executeInsertNewline, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },   
    1646         { "InsertNewlineInQuotedContent", { executeInsertNewlineInQuotedContent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1647         { "InsertOrderedList", { executeInsertOrderedList, supported, enabledInRichlyEditableText, stateOrderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1648         { "InsertNestedOrderedList", { executeInsertNestedOrderedList, supported, enabledInRichlyEditableText, stateOrderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1649         { "InsertParagraph", { executeInsertParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1650         { "InsertTab", { executeInsertTab, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
    1651         { "InsertText", { executeInsertText, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
    1652         { "InsertUnorderedList", { executeInsertUnorderedList, supported, enabledInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1653         { "InsertNestedUnorderedList", { executeInsertNestedUnorderedList, supported, enabledInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1654         { "Italic", { executeToggleItalic, supported, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1655         { "JustifyCenter", { executeJustifyCenter, supported, enabledInRichlyEditableText, stateJustifyCenter, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1656         { "JustifyFull", { executeJustifyFull, supported, enabledInRichlyEditableText, stateJustifyFull, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1657         { "JustifyLeft", { executeJustifyLeft, supported, enabledInRichlyEditableText, stateJustifyLeft, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1658         { "JustifyNone", { executeJustifyLeft, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1659         { "JustifyRight", { executeJustifyRight, supported, enabledInRichlyEditableText, stateJustifyRight, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1660         { "MakeTextWritingDirectionLeftToRight", { executeMakeTextWritingDirectionLeftToRight, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateTextWritingDirectionLeftToRight, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1661         { "MakeTextWritingDirectionNatural", { executeMakeTextWritingDirectionNatural, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateTextWritingDirectionNatural, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1662         { "MakeTextWritingDirectionRightToLeft", { executeMakeTextWritingDirectionRightToLeft, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateTextWritingDirectionRightToLeft, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1663         { "MoveBackward", { executeMoveBackward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1664         { "MoveBackwardAndModifySelection", { executeMoveBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1665         { "MoveDown", { executeMoveDown, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1666         { "MoveDownAndModifySelection", { executeMoveDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1667         { "MoveForward", { executeMoveForward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1668         { "MoveForwardAndModifySelection", { executeMoveForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1669         { "MoveLeft", { executeMoveLeft, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1670         { "MoveLeftAndModifySelection", { executeMoveLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1671         { "MovePageDown", { executeMovePageDown, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1672         { "MovePageDownAndModifySelection", { executeMovePageDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1673         { "MovePageUp", { executeMovePageUp, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1674         { "MovePageUpAndModifySelection", { executeMovePageUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1675         { "MoveParagraphBackwardAndModifySelection", { executeMoveParagraphBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1676         { "MoveParagraphForwardAndModifySelection", { executeMoveParagraphForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1677         { "MoveRight", { executeMoveRight, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1678         { "MoveRightAndModifySelection", { executeMoveRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1679         { "MoveToBeginningOfDocument", { executeMoveToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1680         { "MoveToBeginningOfDocumentAndModifySelection", { executeMoveToBeginningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1681         { "MoveToBeginningOfLine", { executeMoveToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1682         { "MoveToBeginningOfLineAndModifySelection", { executeMoveToBeginningOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1683         { "MoveToBeginningOfParagraph", { executeMoveToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1684         { "MoveToBeginningOfParagraphAndModifySelection", { executeMoveToBeginningOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1685         { "MoveToBeginningOfSentence", { executeMoveToBeginningOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1686         { "MoveToBeginningOfSentenceAndModifySelection", { executeMoveToBeginningOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1687         { "MoveToEndOfDocument", { executeMoveToEndOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1688         { "MoveToEndOfDocumentAndModifySelection", { executeMoveToEndOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1689         { "MoveToEndOfLine", { executeMoveToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1690         { "MoveToEndOfLineAndModifySelection", { executeMoveToEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1691         { "MoveToEndOfParagraph", { executeMoveToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1692         { "MoveToEndOfParagraphAndModifySelection", { executeMoveToEndOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1693         { "MoveToEndOfSentence", { executeMoveToEndOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1694         { "MoveToEndOfSentenceAndModifySelection", { executeMoveToEndOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1695         { "MoveToLeftEndOfLine", { executeMoveToLeftEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1696         { "MoveToLeftEndOfLineAndModifySelection", { executeMoveToLeftEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1697         { "MoveToRightEndOfLine", { executeMoveToRightEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1698         { "MoveToRightEndOfLineAndModifySelection", { executeMoveToRightEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1699         { "MoveUp", { executeMoveUp, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1700         { "MoveUpAndModifySelection", { executeMoveUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1701         { "MoveWordBackward", { executeMoveWordBackward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1702         { "MoveWordBackwardAndModifySelection", { executeMoveWordBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1703         { "MoveWordForward", { executeMoveWordForward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1704         { "MoveWordForwardAndModifySelection", { executeMoveWordForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1705         { "MoveWordLeft", { executeMoveWordLeft, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1706         { "MoveWordLeftAndModifySelection", { executeMoveWordLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1707         { "MoveWordRight", { executeMoveWordRight, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1708         { "MoveWordRightAndModifySelection", { executeMoveWordRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1709         { "Outdent", { executeOutdent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1710         { "OverWrite", { executeToggleOverwrite, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1711         { "Paste", { executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
    1712         { "PasteAndMatchStyle", { executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
    1713         { "PasteAsPlainText", { executePasteAsPlainText, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
    1714         { "PasteAsQuotation", { executePasteAsQuotation, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
    1715         { "Print", { executePrint, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1716         { "Redo", { executeRedo, supported, enabledRedo, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1717         { "RemoveFormat", { executeRemoveFormat, supported, enabledRangeInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1718         { "ScrollPageBackward", { executeScrollPageBackward, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1719         { "ScrollPageForward", { executeScrollPageForward, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1720         { "ScrollLineUp", { executeScrollLineUp, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1721         { "ScrollLineDown", { executeScrollLineDown, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1722         { "ScrollToBeginningOfDocument", { executeScrollToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1723         { "ScrollToEndOfDocument", { executeScrollToEndOfDocument, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1724         { "SelectAll", { executeSelectAll, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1725         { "SelectLine", { executeSelectLine, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1726         { "SelectParagraph", { executeSelectParagraph, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1727         { "SelectSentence", { executeSelectSentence, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1728         { "SelectToMark", { executeSelectToMark, supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1729         { "SelectWord", { executeSelectWord, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1730         { "SetMark", { executeSetMark, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1731         { "Strikethrough", { executeStrikethrough, supported, enabledInRichlyEditableText, stateStrikethrough, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1732         { "StyleWithCSS", { executeStyleWithCSS, supported, enabled, stateStyleWithCSS, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1733         { "Subscript", { executeSubscript, supported, enabledInRichlyEditableText, stateSubscript, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1734         { "Superscript", { executeSuperscript, supported, enabledInRichlyEditableText, stateSuperscript, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1735         { "SwapWithMark", { executeSwapWithMark, supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1736         { "ToggleBold", { executeToggleBold, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1737         { "ToggleItalic", { executeToggleItalic, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1738         { "ToggleUnderline", { executeUnderline, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1739         { "Transpose", { executeTranspose, supported, enableCaretInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1740         { "Underline", { executeUnderline, supported, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1741         { "Undo", { executeUndo, supported, enabledUndo, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1742         { "Unlink", { executeUnlink, supported, enabledRangeInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1743         { "Unscript", { executeUnscript, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1744         { "Unselect", { executeUnselect, supported, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1745         { "UseCSS", { executeUseCSS, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1746         { "Yank", { executeYank, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    1747         { "YankAndSelect", { executeYankAndSelect, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1608        { "AlignCenter"_s, { executeJustifyCenter, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1609        { "AlignJustified"_s, { executeJustifyFull, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1610        { "AlignLeft"_s, { executeJustifyLeft, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1611        { "AlignRight"_s, { executeJustifyRight, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1612        { "BackColor"_s, { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueBackColor, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1613        { "Bold"_s, { executeToggleBold, supported, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1614        { "ClearText"_s, { executeClearText, supported, enabledClearText, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
     1615        { "Copy"_s, { executeCopy, supportedCopyCut, enabledCopy, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledCopyCut } },
     1616        { "CreateLink"_s, { executeCreateLink, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1617        { "Cut"_s, { executeCut, supportedCopyCut, enabledCut, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledCopyCut } },
     1618        { "DefaultParagraphSeparator"_s, { executeDefaultParagraphSeparator, supported, enabled, stateNone, valueDefaultParagraphSeparator, notTextInsertion, doNotAllowExecutionWhenDisabled} },
     1619        { "Delete"_s, { executeDelete, supported, enabledDelete, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1620        { "DeleteBackward"_s, { executeDeleteBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1621        { "DeleteBackwardByDecomposingPreviousCharacter"_s, { executeDeleteBackwardByDecomposingPreviousCharacter, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1622        { "DeleteForward"_s, { executeDeleteForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1623        { "DeleteToBeginningOfLine"_s, { executeDeleteToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1624        { "DeleteToBeginningOfParagraph"_s, { executeDeleteToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1625        { "DeleteToEndOfLine"_s, { executeDeleteToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1626        { "DeleteToEndOfParagraph"_s, { executeDeleteToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1627        { "DeleteToMark"_s, { executeDeleteToMark, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1628        { "DeleteWordBackward"_s, { executeDeleteWordBackward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1629        { "DeleteWordForward"_s, { executeDeleteWordForward, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1630        { "FindString"_s, { executeFindString, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1631        { "FontName"_s, { executeFontName, supported, enabledInEditableText, stateNone, valueFontName, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1632        { "FontSize"_s, { executeFontSize, supported, enabledInEditableText, stateNone, valueFontSize, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1633        { "FontSizeDelta"_s, { executeFontSizeDelta, supported, enabledInEditableText, stateNone, valueFontSizeDelta, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1634        { "ForeColor"_s, { executeForeColor, supported, enabledInRichlyEditableText, stateNone, valueForeColor, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1635        { "FormatBlock"_s, { executeFormatBlock, supported, enabledInRichlyEditableText, stateNone, valueFormatBlock, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1636        { "ForwardDelete"_s, { executeForwardDelete, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1637        { "HiliteColor"_s, { executeBackColor, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1638        { "IgnoreSpelling"_s, { executeIgnoreSpelling, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1639        { "Indent"_s, { executeIndent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1640        { "InsertBacktab"_s, { executeInsertBacktab, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
     1641        { "InsertHTML"_s, { executeInsertHTML, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1642        { "InsertHorizontalRule"_s, { executeInsertHorizontalRule, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1643        { "InsertImage"_s, { executeInsertImage, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1644        { "InsertLineBreak"_s, { executeInsertLineBreak, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
     1645        { "InsertNewline"_s, { executeInsertNewline, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },   
     1646        { "InsertNewlineInQuotedContent"_s, { executeInsertNewlineInQuotedContent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1647        { "InsertOrderedList"_s, { executeInsertOrderedList, supported, enabledInRichlyEditableText, stateOrderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1648        { "InsertNestedOrderedList"_s, { executeInsertNestedOrderedList, supported, enabledInRichlyEditableText, stateOrderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1649        { "InsertParagraph"_s, { executeInsertParagraph, supported, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1650        { "InsertTab"_s, { executeInsertTab, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
     1651        { "InsertText"_s, { executeInsertText, supported, enabledInEditableText, stateNone, valueNull, isTextInsertion, doNotAllowExecutionWhenDisabled } },
     1652        { "InsertUnorderedList"_s, { executeInsertUnorderedList, supported, enabledInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1653        { "InsertNestedUnorderedList"_s, { executeInsertNestedUnorderedList, supported, enabledInRichlyEditableText, stateUnorderedList, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1654        { "Italic"_s, { executeToggleItalic, supported, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1655        { "JustifyCenter"_s, { executeJustifyCenter, supported, enabledInRichlyEditableText, stateJustifyCenter, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1656        { "JustifyFull"_s, { executeJustifyFull, supported, enabledInRichlyEditableText, stateJustifyFull, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1657        { "JustifyLeft"_s, { executeJustifyLeft, supported, enabledInRichlyEditableText, stateJustifyLeft, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1658        { "JustifyNone"_s, { executeJustifyLeft, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1659        { "JustifyRight"_s, { executeJustifyRight, supported, enabledInRichlyEditableText, stateJustifyRight, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1660        { "MakeTextWritingDirectionLeftToRight"_s, { executeMakeTextWritingDirectionLeftToRight, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateTextWritingDirectionLeftToRight, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1661        { "MakeTextWritingDirectionNatural"_s, { executeMakeTextWritingDirectionNatural, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateTextWritingDirectionNatural, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1662        { "MakeTextWritingDirectionRightToLeft"_s, { executeMakeTextWritingDirectionRightToLeft, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateTextWritingDirectionRightToLeft, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1663        { "MoveBackward"_s, { executeMoveBackward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1664        { "MoveBackwardAndModifySelection"_s, { executeMoveBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1665        { "MoveDown"_s, { executeMoveDown, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1666        { "MoveDownAndModifySelection"_s, { executeMoveDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1667        { "MoveForward"_s, { executeMoveForward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1668        { "MoveForwardAndModifySelection"_s, { executeMoveForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1669        { "MoveLeft"_s, { executeMoveLeft, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1670        { "MoveLeftAndModifySelection"_s, { executeMoveLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1671        { "MovePageDown"_s, { executeMovePageDown, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1672        { "MovePageDownAndModifySelection"_s, { executeMovePageDownAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1673        { "MovePageUp"_s, { executeMovePageUp, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1674        { "MovePageUpAndModifySelection"_s, { executeMovePageUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1675        { "MoveParagraphBackwardAndModifySelection"_s, { executeMoveParagraphBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1676        { "MoveParagraphForwardAndModifySelection"_s, { executeMoveParagraphForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1677        { "MoveRight"_s, { executeMoveRight, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1678        { "MoveRightAndModifySelection"_s, { executeMoveRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1679        { "MoveToBeginningOfDocument"_s, { executeMoveToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1680        { "MoveToBeginningOfDocumentAndModifySelection"_s, { executeMoveToBeginningOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1681        { "MoveToBeginningOfLine"_s, { executeMoveToBeginningOfLine, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1682        { "MoveToBeginningOfLineAndModifySelection"_s, { executeMoveToBeginningOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1683        { "MoveToBeginningOfParagraph"_s, { executeMoveToBeginningOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1684        { "MoveToBeginningOfParagraphAndModifySelection"_s, { executeMoveToBeginningOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1685        { "MoveToBeginningOfSentence"_s, { executeMoveToBeginningOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1686        { "MoveToBeginningOfSentenceAndModifySelection"_s, { executeMoveToBeginningOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1687        { "MoveToEndOfDocument"_s, { executeMoveToEndOfDocument, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1688        { "MoveToEndOfDocumentAndModifySelection"_s, { executeMoveToEndOfDocumentAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1689        { "MoveToEndOfLine"_s, { executeMoveToEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1690        { "MoveToEndOfLineAndModifySelection"_s, { executeMoveToEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1691        { "MoveToEndOfParagraph"_s, { executeMoveToEndOfParagraph, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1692        { "MoveToEndOfParagraphAndModifySelection"_s, { executeMoveToEndOfParagraphAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1693        { "MoveToEndOfSentence"_s, { executeMoveToEndOfSentence, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1694        { "MoveToEndOfSentenceAndModifySelection"_s, { executeMoveToEndOfSentenceAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1695        { "MoveToLeftEndOfLine"_s, { executeMoveToLeftEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1696        { "MoveToLeftEndOfLineAndModifySelection"_s, { executeMoveToLeftEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1697        { "MoveToRightEndOfLine"_s, { executeMoveToRightEndOfLine, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1698        { "MoveToRightEndOfLineAndModifySelection"_s, { executeMoveToRightEndOfLineAndModifySelection, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1699        { "MoveUp"_s, { executeMoveUp, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1700        { "MoveUpAndModifySelection"_s, { executeMoveUpAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1701        { "MoveWordBackward"_s, { executeMoveWordBackward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1702        { "MoveWordBackwardAndModifySelection"_s, { executeMoveWordBackwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1703        { "MoveWordForward"_s, { executeMoveWordForward, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1704        { "MoveWordForwardAndModifySelection"_s, { executeMoveWordForwardAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1705        { "MoveWordLeft"_s, { executeMoveWordLeft, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1706        { "MoveWordLeftAndModifySelection"_s, { executeMoveWordLeftAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1707        { "MoveWordRight"_s, { executeMoveWordRight, supportedFromMenuOrKeyBinding, enabledInEditableTextOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1708        { "MoveWordRightAndModifySelection"_s, { executeMoveWordRightAndModifySelection, supportedFromMenuOrKeyBinding, enabledVisibleSelectionOrCaretBrowsing, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1709        { "Outdent"_s, { executeOutdent, supported, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1710        { "OverWrite"_s, { executeToggleOverwrite, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1711        { "Paste"_s, { executePaste, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
     1712        { "PasteAndMatchStyle"_s, { executePasteAndMatchStyle, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
     1713        { "PasteAsPlainText"_s, { executePasteAsPlainText, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
     1714        { "PasteAsQuotation"_s, { executePasteAsQuotation, supportedPaste, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabledPaste } },
     1715        { "Print"_s, { executePrint, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1716        { "Redo"_s, { executeRedo, supported, enabledRedo, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1717        { "RemoveFormat"_s, { executeRemoveFormat, supported, enabledRangeInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1718        { "ScrollPageBackward"_s, { executeScrollPageBackward, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1719        { "ScrollPageForward"_s, { executeScrollPageForward, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1720        { "ScrollLineUp"_s, { executeScrollLineUp, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1721        { "ScrollLineDown"_s, { executeScrollLineDown, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1722        { "ScrollToBeginningOfDocument"_s, { executeScrollToBeginningOfDocument, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1723        { "ScrollToEndOfDocument"_s, { executeScrollToEndOfDocument, supportedFromMenuOrKeyBinding, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1724        { "SelectAll"_s, { executeSelectAll, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1725        { "SelectLine"_s, { executeSelectLine, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1726        { "SelectParagraph"_s, { executeSelectParagraph, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1727        { "SelectSentence"_s, { executeSelectSentence, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1728        { "SelectToMark"_s, { executeSelectToMark, supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1729        { "SelectWord"_s, { executeSelectWord, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1730        { "SetMark"_s, { executeSetMark, supportedFromMenuOrKeyBinding, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1731        { "Strikethrough"_s, { executeStrikethrough, supported, enabledInRichlyEditableText, stateStrikethrough, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1732        { "StyleWithCSS"_s, { executeStyleWithCSS, supported, enabled, stateStyleWithCSS, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1733        { "Subscript"_s, { executeSubscript, supported, enabledInRichlyEditableText, stateSubscript, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1734        { "Superscript"_s, { executeSuperscript, supported, enabledInRichlyEditableText, stateSuperscript, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1735        { "SwapWithMark"_s, { executeSwapWithMark, supportedFromMenuOrKeyBinding, enabledVisibleSelectionAndMark, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1736        { "ToggleBold"_s, { executeToggleBold, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateBold, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1737        { "ToggleItalic"_s, { executeToggleItalic, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateItalic, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1738        { "ToggleUnderline"_s, { executeUnderline, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1739        { "Transpose"_s, { executeTranspose, supported, enableCaretInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1740        { "Underline"_s, { executeUnderline, supported, enabledInRichlyEditableText, stateUnderline, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1741        { "Undo"_s, { executeUndo, supported, enabledUndo, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1742        { "Unlink"_s, { executeUnlink, supported, enabledRangeInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1743        { "Unscript"_s, { executeUnscript, supportedFromMenuOrKeyBinding, enabledInRichlyEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1744        { "Unselect"_s, { executeUnselect, supported, enabledVisibleSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1745        { "UseCSS"_s, { executeUseCSS, supported, enabled, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1746        { "Yank"_s, { executeYank, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1747        { "YankAndSelect"_s, { executeYankAndSelect, supportedFromMenuOrKeyBinding, enabledInEditableText, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    17481748
    17491749#if PLATFORM(GTK)
    1750         { "PasteGlobalSelection", { executePasteGlobalSelection, supportedFromMenuOrKeyBinding, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
     1750        { "PasteGlobalSelection"_s, { executePasteGlobalSelection, supportedFromMenuOrKeyBinding, enabledPaste, stateNone, valueNull, notTextInsertion, allowExecutionWhenDisabled } },
    17511751#endif
    17521752
    17531753#if PLATFORM(COCOA)
    1754         { "TakeFindStringFromSelection", { executeTakeFindStringFromSelection, supportedFromMenuOrKeyBinding, enabledTakeFindStringFromSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
     1754        { "TakeFindStringFromSelection"_s, { executeTakeFindStringFromSelection, supportedFromMenuOrKeyBinding, enabledTakeFindStringFromSelection, stateNone, valueNull, notTextInsertion, doNotAllowExecutionWhenDisabled } },
    17551755#endif
    17561756    };
  • trunk/Source/WebCore/html/Autofill.cpp

    r275410 r275457  
    5454    static const auto map = makeNeverDestroyed([] {
    5555        struct MapEntry {
    56             const char* name;
     56            ASCIILiteral name;
    5757            AutofillInfo value;
    5858        };
    5959        static const MapEntry entries[] = {
    60             { "off", { AutofillFieldName::None, AutofillCategory::Off } },
    61             { "on", { AutofillFieldName::None,  AutofillCategory::Automatic } },
    62             { "name", { AutofillFieldName::Name, AutofillCategory::Normal } },
    63             { "honorific-prefix", { AutofillFieldName::HonorificPrefix, AutofillCategory::Normal } },
    64             { "given-name", { AutofillFieldName::GivenName, AutofillCategory::Normal } },
    65             { "additional-name", { AutofillFieldName::AdditionalName, AutofillCategory::Normal } },
    66             { "family-name", { AutofillFieldName::FamilyName, AutofillCategory::Normal } },
    67             { "honorific-suffix", { AutofillFieldName::HonorificSuffix, AutofillCategory::Normal } },
    68             { "nickname", { AutofillFieldName::Nickname, AutofillCategory::Normal } },
    69             { "username", { AutofillFieldName::Username, AutofillCategory::Normal } },
    70             { "new-password", { AutofillFieldName::NewPassword, AutofillCategory::Normal } },
    71             { "current-password", { AutofillFieldName::CurrentPassword, AutofillCategory::Normal } },
    72             { "organization-title", { AutofillFieldName::OrganizationTitle, AutofillCategory::Normal } },
    73             { "organization", { AutofillFieldName::Organization, AutofillCategory::Normal } },
    74             { "street-address", { AutofillFieldName::StreetAddress, AutofillCategory::Normal } },
    75             { "address-line1", { AutofillFieldName::AddressLine1, AutofillCategory::Normal } },
    76             { "address-line2", { AutofillFieldName::AddressLine2, AutofillCategory::Normal } },
    77             { "address-line3", { AutofillFieldName::AddressLine3, AutofillCategory::Normal } },
    78             { "address-level4", { AutofillFieldName::AddressLevel4, AutofillCategory::Normal } },
    79             { "address-level3", { AutofillFieldName::AddressLevel3, AutofillCategory::Normal } },
    80             { "address-level2", { AutofillFieldName::AddressLevel2, AutofillCategory::Normal } },
    81             { "address-level1", { AutofillFieldName::AddressLevel1, AutofillCategory::Normal } },
    82             { "country", { AutofillFieldName::Country, AutofillCategory::Normal } },
    83             { "country-name", { AutofillFieldName::CountryName, AutofillCategory::Normal } },
    84             { "postal-code", { AutofillFieldName::PostalCode, AutofillCategory::Normal } },
    85             { "cc-name", { AutofillFieldName::CcName, AutofillCategory::Normal } },
    86             { "cc-given-name", { AutofillFieldName::CcGivenName, AutofillCategory::Normal } },
    87             { "cc-additional-name", { AutofillFieldName::CcAdditionalName, AutofillCategory::Normal } },
    88             { "cc-family-name", { AutofillFieldName::CcFamilyName, AutofillCategory::Normal } },
    89             { "cc-number", { AutofillFieldName::CcNumber, AutofillCategory::Normal } },
    90             { "cc-exp", { AutofillFieldName::CcExp, AutofillCategory::Normal } },
    91             { "cc-exp-month", { AutofillFieldName::CcExpMonth, AutofillCategory::Normal } },
    92             { "cc-exp-year", { AutofillFieldName::CcExpYear, AutofillCategory::Normal } },
    93             { "cc-csc", { AutofillFieldName::CcCsc, AutofillCategory::Normal } },
    94             { "cc-type", { AutofillFieldName::CcType, AutofillCategory::Normal } },
    95             { "transaction-currency", { AutofillFieldName::TransactionCurrency, AutofillCategory::Normal } },
    96             { "transaction-amount", { AutofillFieldName::TransactionAmount, AutofillCategory::Normal } },
    97             { "language", { AutofillFieldName::Language, AutofillCategory::Normal } },
    98             { "bday", { AutofillFieldName::Bday, AutofillCategory::Normal } },
    99             { "bday-day", { AutofillFieldName::BdayDay, AutofillCategory::Normal } },
    100             { "bday-month", { AutofillFieldName::BdayMonth, AutofillCategory::Normal } },
    101             { "bday-year", { AutofillFieldName::BdayYear, AutofillCategory::Normal } },
    102             { "sex", { AutofillFieldName::Sex, AutofillCategory::Normal } },
    103             { "url", { AutofillFieldName::URL, AutofillCategory::Normal } },
    104             { "photo", { AutofillFieldName::Photo, AutofillCategory::Normal } },
    105 
    106             { "tel", { AutofillFieldName::Tel, AutofillCategory::Contact } },
    107             { "tel-country-code", { AutofillFieldName::TelCountryCode, AutofillCategory::Contact } },
    108             { "tel-national", { AutofillFieldName::TelNational, AutofillCategory::Contact } },
    109             { "tel-area-code", { AutofillFieldName::TelAreaCode, AutofillCategory::Contact } },
    110             { "tel-local", { AutofillFieldName::TelLocal, AutofillCategory::Contact } },
    111             { "tel-local-prefix", { AutofillFieldName::TelLocalPrefix, AutofillCategory::Contact } },
    112             { "tel-local-suffix", { AutofillFieldName::TelLocalSuffix, AutofillCategory::Contact } },
    113             { "tel-extension", { AutofillFieldName::TelExtension, AutofillCategory::Contact } },
    114             { "email", { AutofillFieldName::Email, AutofillCategory::Contact } },
    115             { "impp", { AutofillFieldName::Impp, AutofillCategory::Contact } },
     60            { "off"_s, { AutofillFieldName::None, AutofillCategory::Off } },
     61            { "on"_s, { AutofillFieldName::None,  AutofillCategory::Automatic } },
     62            { "name"_s, { AutofillFieldName::Name, AutofillCategory::Normal } },
     63            { "honorific-prefix"_s, { AutofillFieldName::HonorificPrefix, AutofillCategory::Normal } },
     64            { "given-name"_s, { AutofillFieldName::GivenName, AutofillCategory::Normal } },
     65            { "additional-name"_s, { AutofillFieldName::AdditionalName, AutofillCategory::Normal } },
     66            { "family-name"_s, { AutofillFieldName::FamilyName, AutofillCategory::Normal } },
     67            { "honorific-suffix"_s, { AutofillFieldName::HonorificSuffix, AutofillCategory::Normal } },
     68            { "nickname"_s, { AutofillFieldName::Nickname, AutofillCategory::Normal } },
     69            { "username"_s, { AutofillFieldName::Username, AutofillCategory::Normal } },
     70            { "new-password"_s, { AutofillFieldName::NewPassword, AutofillCategory::Normal } },
     71            { "current-password"_s, { AutofillFieldName::CurrentPassword, AutofillCategory::Normal } },
     72            { "organization-title"_s, { AutofillFieldName::OrganizationTitle, AutofillCategory::Normal } },
     73            { "organization"_s, { AutofillFieldName::Organization, AutofillCategory::Normal } },
     74            { "street-address"_s, { AutofillFieldName::StreetAddress, AutofillCategory::Normal } },
     75            { "address-line1"_s, { AutofillFieldName::AddressLine1, AutofillCategory::Normal } },
     76            { "address-line2"_s, { AutofillFieldName::AddressLine2, AutofillCategory::Normal } },
     77            { "address-line3"_s, { AutofillFieldName::AddressLine3, AutofillCategory::Normal } },
     78            { "address-level4"_s, { AutofillFieldName::AddressLevel4, AutofillCategory::Normal } },
     79            { "address-level3"_s, { AutofillFieldName::AddressLevel3, AutofillCategory::Normal } },
     80            { "address-level2"_s, { AutofillFieldName::AddressLevel2, AutofillCategory::Normal } },
     81            { "address-level1"_s, { AutofillFieldName::AddressLevel1, AutofillCategory::Normal } },
     82            { "country"_s, { AutofillFieldName::Country, AutofillCategory::Normal } },
     83            { "country-name"_s, { AutofillFieldName::CountryName, AutofillCategory::Normal } },
     84            { "postal-code"_s, { AutofillFieldName::PostalCode, AutofillCategory::Normal } },
     85            { "cc-name"_s, { AutofillFieldName::CcName, AutofillCategory::Normal } },
     86            { "cc-given-name"_s, { AutofillFieldName::CcGivenName, AutofillCategory::Normal } },
     87            { "cc-additional-name"_s, { AutofillFieldName::CcAdditionalName, AutofillCategory::Normal } },
     88            { "cc-family-name"_s, { AutofillFieldName::CcFamilyName, AutofillCategory::Normal } },
     89            { "cc-number"_s, { AutofillFieldName::CcNumber, AutofillCategory::Normal } },
     90            { "cc-exp"_s, { AutofillFieldName::CcExp, AutofillCategory::Normal } },
     91            { "cc-exp-month"_s, { AutofillFieldName::CcExpMonth, AutofillCategory::Normal } },
     92            { "cc-exp-year"_s, { AutofillFieldName::CcExpYear, AutofillCategory::Normal } },
     93            { "cc-csc"_s, { AutofillFieldName::CcCsc, AutofillCategory::Normal } },
     94            { "cc-type"_s, { AutofillFieldName::CcType, AutofillCategory::Normal } },
     95            { "transaction-currency"_s, { AutofillFieldName::TransactionCurrency, AutofillCategory::Normal } },
     96            { "transaction-amount"_s, { AutofillFieldName::TransactionAmount, AutofillCategory::Normal } },
     97            { "language"_s, { AutofillFieldName::Language, AutofillCategory::Normal } },
     98            { "bday"_s, { AutofillFieldName::Bday, AutofillCategory::Normal } },
     99            { "bday-day"_s, { AutofillFieldName::BdayDay, AutofillCategory::Normal } },
     100            { "bday-month"_s, { AutofillFieldName::BdayMonth, AutofillCategory::Normal } },
     101            { "bday-year"_s, { AutofillFieldName::BdayYear, AutofillCategory::Normal } },
     102            { "sex"_s, { AutofillFieldName::Sex, AutofillCategory::Normal } },
     103            { "url"_s, { AutofillFieldName::URL, AutofillCategory::Normal } },
     104            { "photo"_s, { AutofillFieldName::Photo, AutofillCategory::Normal } },
     105
     106            { "tel"_s, { AutofillFieldName::Tel, AutofillCategory::Contact } },
     107            { "tel-country-code"_s, { AutofillFieldName::TelCountryCode, AutofillCategory::Contact } },
     108            { "tel-national"_s, { AutofillFieldName::TelNational, AutofillCategory::Contact } },
     109            { "tel-area-code"_s, { AutofillFieldName::TelAreaCode, AutofillCategory::Contact } },
     110            { "tel-local"_s, { AutofillFieldName::TelLocal, AutofillCategory::Contact } },
     111            { "tel-local-prefix"_s, { AutofillFieldName::TelLocalPrefix, AutofillCategory::Contact } },
     112            { "tel-local-suffix"_s, { AutofillFieldName::TelLocalSuffix, AutofillCategory::Contact } },
     113            { "tel-extension"_s, { AutofillFieldName::TelExtension, AutofillCategory::Contact } },
     114            { "email"_s, { AutofillFieldName::Email, AutofillCategory::Contact } },
     115            { "impp"_s, { AutofillFieldName::Impp, AutofillCategory::Contact } },
    116116        };
    117117        MemoryCompactLookupOnlyRobinHoodHashMap<AtomString, AutofillInfo> map;
  • trunk/Source/WebCore/platform/LegacySchemeRegistry.cpp

    r272469 r275457  
    114114    ASSERT(schemeRegistryLock.isHeld());
    115115    static const auto schemes = makeNeverDestroyed(URLSchemesMap {
    116         "file",
     116        "file"_s,
    117117#if PLATFORM(COCOA)
    118         "applewebdata",
     118        "applewebdata"_s,
    119119#endif
    120120    });
     
    140140    ASSERT(schemeRegistryLock.isHeld());
    141141    static const auto schemes = makeNeverDestroyed(Vector<String> {
    142         "https",
    143         "about",
    144         "data",
    145         "wss",
     142        "https"_s,
     143        "about"_s,
     144        "data"_s,
     145        "wss"_s,
    146146#if PLATFORM(GTK) || PLATFORM(WPE)
    147         "resource",
     147        "resource"_s,
    148148#endif
    149149    });
     
    162162    ASSERT(schemeRegistryLock.isHeld());
    163163    static const auto schemes = makeNeverDestroyed(Vector<String> {
    164         "about",
    165         "javascript",
     164        "about"_s,
     165        "javascript"_s,
    166166        // This is an intentional difference from the behavior the HTML specification calls for.
    167167        // See https://bugs.webkit.org/show_bug.cgi?id=11885
    168         "data",
     168        "data"_s,
    169169    });
    170170    return schemes;
     
    181181{
    182182    ASSERT(isMainThread());
    183     static const auto schemes = makeNeverDestroyed(Vector<String> { "about" });
     183    static const auto schemes = makeNeverDestroyed(Vector<String> { "about"_s });
    184184    return schemes;
    185185}
     
    202202{
    203203    ASSERT(schemeRegistryLock.isHeld());
    204     static const auto schemes = makeNeverDestroyed(Vector<String> { "blob" });
     204    static const auto schemes = makeNeverDestroyed(Vector<String> { "blob"_s });
    205205    return schemes;
    206206}
     
    268268{
    269269    ASSERT(isMainThread());
    270     static const auto schemes = makeNeverDestroyed(Vector<String> { "http", "https" });
     270    static const auto schemes = makeNeverDestroyed(Vector<String> { "http"_s, "https"_s });
    271271    return schemes;
    272272}
  • trunk/Source/WebCore/platform/MIMETypeRegistry.cpp

    r273970 r275457  
    686686    static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> systemPreviewMIMETypes = std::initializer_list<String> {
    687687        // The official type: https://www.iana.org/assignments/media-types/model/vnd.usdz+zip
    688         "model/vnd.usdz+zip",
     688        "model/vnd.usdz+zip"_s,
    689689        // Unofficial, but supported because we documented them.
    690         "model/usd",
    691         "model/vnd.pixar.usd",
     690        "model/usd"_s,
     691        "model/vnd.pixar.usd"_s,
    692692        // Reality files.
    693         "model/vnd.reality"
     693        "model/vnd.reality"_s,
    694694    };
    695695    return systemPreviewMIMETypes;
  • trunk/Source/WebCore/platform/graphics/FontCascade.cpp

    r275420 r275457  
    385385
    386386    static const auto map = makeNeverDestroyed(MemoryCompactLookupOnlyRobinHoodHashSet<AtomString> {
    387         "American Typewriter",
    388         "Arial Hebrew",
    389         "Chalkboard",
    390         "Cochin",
    391         "Corsiva Hebrew",
    392         "Courier",
    393         "Euphemia UCAS",
    394         "Geneva",
    395         "Gill Sans",
    396         "Hei",
    397         "Helvetica",
    398         "Hoefler Text",
    399         "InaiMathi",
    400         "Kai",
    401         "Lucida Grande",
    402         "Marker Felt",
    403         "Monaco",
    404         "Mshtakan",
    405         "New Peninim MT",
    406         "Osaka",
    407         "Raanana",
    408         "STHeiti",
    409         "Symbol",
    410         "Times",
    411         "Apple Braille",
    412         "Apple LiGothic",
    413         "Apple LiSung",
    414         "Apple Symbols",
    415         "AppleGothic",
    416         "AppleMyungjo",
    417         "#GungSeo",
    418         "#HeadLineA",
    419         "#PCMyungjo",
    420         "#PilGi",
     387        "American Typewriter"_s,
     388        "Arial Hebrew"_s,
     389        "Chalkboard"_s,
     390        "Cochin"_s,
     391        "Corsiva Hebrew"_s,
     392        "Courier"_s,
     393        "Euphemia UCAS"_s,
     394        "Geneva"_s,
     395        "Gill Sans"_s,
     396        "Hei"_s,
     397        "Helvetica"_s,
     398        "Hoefler Text"_s,
     399        "InaiMathi"_s,
     400        "Kai"_s,
     401        "Lucida Grande"_s,
     402        "Marker Felt"_s,
     403        "Monaco"_s,
     404        "Mshtakan"_s,
     405        "New Peninim MT"_s,
     406        "Osaka"_s,
     407        "Raanana"_s,
     408        "STHeiti"_s,
     409        "Symbol"_s,
     410        "Times"_s,
     411        "Apple Braille"_s,
     412        "Apple LiGothic"_s,
     413        "Apple LiSung"_s,
     414        "Apple Symbols"_s,
     415        "AppleGothic"_s,
     416        "AppleMyungjo"_s,
     417        "#GungSeo"_s,
     418        "#HeadLineA"_s,
     419        "#PCMyungjo"_s,
     420        "#PilGi"_s,
    421421    });
    422422    return !map.get().contains(family);
  • trunk/Source/WebCore/platform/graphics/HEVCUtilities.cpp

    r251436 r275457  
    2727#include "HEVCUtilities.h"
    2828
    29 #include <wtf/HashMap.h>
    30 #include <wtf/HashSet.h>
    3129#include <wtf/NeverDestroyed.h>
     30#include <wtf/RobinHoodHashMap.h>
     31#include <wtf/RobinHoodHashSet.h>
    3232#include <wtf/text/StringHash.h>
    3333#include <wtf/text/StringToIntegerConversion.h>
     
    117117static String codecStringForDoViCodecType(const String& codec)
    118118{
    119     using MapType = HashMap<String, String>;
     119    using MapType = MemoryCompactLookupOnlyRobinHoodHashMap<String, String>;
    120120    static NeverDestroyed<MapType> types = std::initializer_list<MapType::KeyValuePairType>({
    121         { "dvhe", "hev1" },
    122         { "dvh1", "hvc1" },
    123         { "dvav", "avc3" },
    124         { "dva1", "avc1" }
     121        { "dvhe"_s, "hev1"_s },
     122        { "dvh1"_s, "hvc1"_s },
     123        { "dvav"_s, "avc3"_s },
     124        { "dva1"_s, "avc1"_s }
    125125    });
    126126
     
    134134{
    135135    // See Table 7 of "Dolby Vision Profiles and Levels Version 1.3.2"
    136     using MapType = HashMap<String, unsigned short>;
     136    using MapType = MemoryCompactLookupOnlyRobinHoodHashMap<String, unsigned short>;
    137137    static NeverDestroyed<MapType> map = std::initializer_list<MapType::KeyValuePairType>({
    138         { "dvhe.dtr", 4 },
    139         { "dvhe.stn", 5 },
    140         { "dvhe.dtb", 7 },
    141         { "dvhe.st", 8 },
    142         { "dvav.se", 9 }
     138        { "dvhe.dtr"_s, 4 },
     139        { "dvhe.stn"_s, 5 },
     140        { "dvhe.dtb"_s, 7 },
     141        { "dvhe.st"_s, 8 },
     142        { "dvav.se"_s, 9 }
    143143    });
    144144
  • trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp

    r274589 r275457  
    10661066{
    10671067    static const auto cache = makeNeverDestroyed(HashSet<String, ASCIICaseInsensitiveHash> {
    1068         "application/vnd.apple.mpegurl",
    1069         "application/x-mpegurl",
    1070         "audio/3gpp",
    1071         "audio/aac",
    1072         "audio/aacp",
    1073         "audio/aiff",
    1074         "audio/basic",
    1075         "audio/mp3",
    1076         "audio/mp4",
    1077         "audio/mpeg",
    1078         "audio/mpeg3",
    1079         "audio/mpegurl",
    1080         "audio/mpg",
    1081         "audio/vnd.wave",
    1082         "audio/wav",
    1083         "audio/wave",
    1084         "audio/x-aac",
    1085         "audio/x-aiff",
    1086         "audio/x-m4a",
    1087         "audio/x-mpegurl",
    1088         "audio/x-wav",
    1089         "video/3gpp",
    1090         "video/3gpp2",
    1091         "video/mp4",
    1092         "video/mpeg",
    1093         "video/mpeg2",
    1094         "video/mpg",
    1095         "video/quicktime",
    1096         "video/x-m4v",
    1097         "video/x-mpeg",
    1098         "video/x-mpg",
     1068        "application/vnd.apple.mpegurl"_s,
     1069        "application/x-mpegurl"_s,
     1070        "audio/3gpp"_s,
     1071        "audio/aac"_s,
     1072        "audio/aacp"_s,
     1073        "audio/aiff"_s,
     1074        "audio/basic"_s,
     1075        "audio/mp3"_s,
     1076        "audio/mp4"_s,
     1077        "audio/mpeg"_s,
     1078        "audio/mpeg3"_s,
     1079        "audio/mpegurl"_s,
     1080        "audio/mpg"_s,
     1081        "audio/vnd.wave"_s,
     1082        "audio/wav"_s,
     1083        "audio/wave"_s,
     1084        "audio/x-aac"_s,
     1085        "audio/x-aiff"_s,
     1086        "audio/x-m4a"_s,
     1087        "audio/x-mpegurl"_s,
     1088        "audio/x-wav"_s,
     1089        "video/3gpp"_s,
     1090        "video/3gpp2"_s,
     1091        "video/mp4"_s,
     1092        "video/mpeg"_s,
     1093        "video/mpeg2"_s,
     1094        "video/mpg"_s,
     1095        "video/quicktime"_s,
     1096        "video/x-m4v"_s,
     1097        "video/x-mpeg"_s,
     1098        "video/x-mpg"_s,
    10991099    });
    11001100    return cache;
  • trunk/Source/WebCore/platform/graphics/avfoundation/objc/AVAssetMIMETypeCache.mm

    r274034 r275457  
    9696{
    9797    static const auto cache = makeNeverDestroyed(HashSet<String, ASCIICaseInsensitiveHash> {
    98         "application/vnd.apple.mpegurl",
    99         "application/x-mpegurl",
    100         "audio/3gpp",
    101         "audio/aac",
    102         "audio/aacp",
    103         "audio/aiff",
    104         "audio/basic",
    105         "audio/mp3",
    106         "audio/mp4",
    107         "audio/mpeg",
    108         "audio/mpeg3",
    109         "audio/mpegurl",
    110         "audio/mpg",
    111         "audio/vnd.wave",
    112         "audio/wav",
    113         "audio/wave",
    114         "audio/x-aac",
    115         "audio/x-aiff",
    116         "audio/x-m4a",
    117         "audio/x-mpegurl",
    118         "audio/x-wav",
    119         "video/3gpp",
    120         "video/3gpp2",
    121         "video/mp4",
    122         "video/mpeg",
    123         "video/mpeg2",
    124         "video/mpg",
    125         "video/quicktime",
    126         "video/x-m4v",
    127         "video/x-mpeg",
    128         "video/x-mpg",
     98        "application/vnd.apple.mpegurl"_s,
     99        "application/x-mpegurl"_s,
     100        "audio/3gpp"_s,
     101        "audio/aac"_s,
     102        "audio/aacp"_s,
     103        "audio/aiff"_s,
     104        "audio/basic"_s,
     105        "audio/mp3"_s,
     106        "audio/mp4"_s,
     107        "audio/mpeg"_s,
     108        "audio/mpeg3"_s,
     109        "audio/mpegurl"_s,
     110        "audio/mpg"_s,
     111        "audio/vnd.wave"_s,
     112        "audio/wav"_s,
     113        "audio/wave"_s,
     114        "audio/x-aac"_s,
     115        "audio/x-aiff"_s,
     116        "audio/x-m4a"_s,
     117        "audio/x-mpegurl"_s,
     118        "audio/x-wav"_s,
     119        "video/3gpp"_s,
     120        "video/3gpp2"_s,
     121        "video/mp4"_s,
     122        "video/mpeg"_s,
     123        "video/mpeg2"_s,
     124        "video/mpg"_s,
     125        "video/quicktime"_s,
     126        "video/x-m4v"_s,
     127        "video/x-mpeg"_s,
     128        "video/x-mpg"_s,
    129129    });
    130130    return cache;
  • trunk/Source/WebCore/platform/graphics/cg/ImageSourceCGWin.cpp

    r249938 r275457  
    5353
    5454    static const auto map = makeNeverDestroyed(HashMap<String, String, ASCIICaseInsensitiveHash> {
    55         { "public.html", "html" },
    56         { "public.jpeg", "jpeg" },
    57         { "public.jpeg-2000", "jp2" },
    58         { "public.plain-text", "txt" },
    59         { "public.png", "png" },
    60         { "public.tiff", "tiff" },
    61         { "public.xbitmap-image", "xbm" },
    62         { "public.xml", "xml" },
    63         { "com.adobe.illustrator.ai-image", "ai" },
    64         { "com.adobe.pdf", "pdf" },
    65         { "com.adobe.photoshop-image", "psd" },
    66         { "com.adobe.postscript", "ps" },
    67         { "com.apple.icns", "icns" },
    68         { "com.apple.macpaint-image", "pntg" },
    69         { "com.apple.pict", "pict" },
    70         { "com.apple.quicktime-image", "qtif" },
    71         { "com.apple.webarchive", "webarchive" },
    72         { "com.compuserve.gif", "gif" },
    73         { "com.ilm.openexr-image", "exr" },
    74         { "com.kodak.flashpix-image", "fpx" },
    75         { "com.microsoft.bmp", "bmp" },
    76         { "com.microsoft.ico", "ico" },
    77         { "com.netscape.javascript-source", "js" },
    78         { "com.sgi.sgi-image", "sgi" },
    79         { "com.truevision.tga-image", "tga" },
     55        { "public.html"_s, "html"_s },
     56        { "public.jpeg"_s, "jpeg"_s },
     57        { "public.jpeg-2000"_s, "jp2"_s },
     58        { "public.plain-text"_s, "txt"_s },
     59        { "public.png"_s, "png"_s },
     60        { "public.tiff"_s, "tiff"_s },
     61        { "public.xbitmap-image"_s, "xbm"_s },
     62        { "public.xml"_s, "xml"_s },
     63        { "com.adobe.illustrator.ai-image"_s, "ai"_s },
     64        { "com.adobe.pdf"_s, "pdf"_s },
     65        { "com.adobe.photoshop-image"_s, "psd"_s },
     66        { "com.adobe.postscript"_s, "ps"_s },
     67        { "com.apple.icns"_s, "icns"_s },
     68        { "com.apple.macpaint-image"_s, "pntg"_s },
     69        { "com.apple.pict"_s, "pict"_s },
     70        { "com.apple.quicktime-image"_s, "qtif"_s },
     71        { "com.apple.webarchive"_s, "webarchive"_s },
     72        { "com.compuserve.gif"_s, "gif"_s },
     73        { "com.ilm.openexr-image"_s, "exr"_s },
     74        { "com.kodak.flashpix-image"_s, "fpx"_s },
     75        { "com.microsoft.bmp"_s, "bmp"_s },
     76        { "com.microsoft.ico"_s, "ico"_s },
     77        { "com.netscape.javascript-source"_s, "js"_s },
     78        { "com.sgi.sgi-image"_s, "sgi"_s },
     79        { "com.truevision.tga-image"_s, "tga"_s },
    8080    });
    8181    return map.get().get(type);
  • trunk/Source/WebCore/svg/SVGTests.cpp

    r275410 r275457  
    4141static const HashSet<String, ASCIICaseInsensitiveHash>& supportedSVGFeatures()
    4242{
     43#define PREFIX_W3C "org.w3c."
     44#define PREFIX_SVG11 "http://www.w3.org/tr/svg11/feature#"
    4345    static NeverDestroyed<HashSet<String, ASCIICaseInsensitiveHash>> features = [] {
    44         static const char* const features10[] = {
    45             "dom",
    46             "dom.svg",
    47             "dom.svg.static",
    48             "svg",
    49             "svg.static",
     46        static const ASCIILiteral features10[] = {
     47            PREFIX_W3C "dom"_s,
     48            PREFIX_W3C "dom.svg"_s,
     49            PREFIX_W3C "dom.svg.static"_s,
     50            PREFIX_W3C "svg"_s,
     51            PREFIX_W3C "svg.static"_s,
    5052        };
    51         static const char* const features11[] = {
    52             "animation",
    53             "basegraphicsattribute",
    54             "basicclip",
    55             "basicfilter",
    56             "basicpaintattribute",
    57             "basicstructure",
    58             "basictext",
    59             "clip",
    60             "conditionalprocessing",
    61             "containerattribute",
    62             "coreattribute",
    63             "cursor",
    64             "documenteventsattribute",
    65             "extensibility",
    66             "externalresourcesrequired",
    67             "filter",
    68             "gradient",
    69             "graphicaleventsattribute",
    70             "graphicsattribute",
    71             "hyperlinking",
    72             "image",
    73             "marker",
    74             "mask",
    75             "opacityattribute",
    76             "paintattribute",
    77             "pattern",
    78             "script",
    79             "shape",
    80             "structure",
    81             "style",
    82             "svg-animation",
    83             "svgdom-animation",
    84             "text",
    85             "view",
    86             "viewportattribute",
    87             "xlinkattribute",
    88             "basicfont",
    89             "font",
    90             "svg",
    91             "svg-static",
    92             "svgdom",
    93             "svgdom-static",
     53        static const ASCIILiteral features11[] = {
     54            PREFIX_SVG11 "animation"_s,
     55            PREFIX_SVG11 "basegraphicsattribute"_s,
     56            PREFIX_SVG11 "basicclip"_s,
     57            PREFIX_SVG11 "basicfilter"_s,
     58            PREFIX_SVG11 "basicpaintattribute"_s,
     59            PREFIX_SVG11 "basicstructure"_s,
     60            PREFIX_SVG11 "basictext"_s,
     61            PREFIX_SVG11 "clip"_s,
     62            PREFIX_SVG11 "conditionalprocessing"_s,
     63            PREFIX_SVG11 "containerattribute"_s,
     64            PREFIX_SVG11 "coreattribute"_s,
     65            PREFIX_SVG11 "cursor"_s,
     66            PREFIX_SVG11 "documenteventsattribute"_s,
     67            PREFIX_SVG11 "extensibility"_s,
     68            PREFIX_SVG11 "externalresourcesrequired"_s,
     69            PREFIX_SVG11 "filter"_s,
     70            PREFIX_SVG11 "gradient"_s,
     71            PREFIX_SVG11 "graphicaleventsattribute"_s,
     72            PREFIX_SVG11 "graphicsattribute"_s,
     73            PREFIX_SVG11 "hyperlinking"_s,
     74            PREFIX_SVG11 "image"_s,
     75            PREFIX_SVG11 "marker"_s,
     76            PREFIX_SVG11 "mask"_s,
     77            PREFIX_SVG11 "opacityattribute"_s,
     78            PREFIX_SVG11 "paintattribute"_s,
     79            PREFIX_SVG11 "pattern"_s,
     80            PREFIX_SVG11 "script"_s,
     81            PREFIX_SVG11 "shape"_s,
     82            PREFIX_SVG11 "structure"_s,
     83            PREFIX_SVG11 "style"_s,
     84            PREFIX_SVG11 "svg-animation"_s,
     85            PREFIX_SVG11 "svgdom-animation"_s,
     86            PREFIX_SVG11 "text"_s,
     87            PREFIX_SVG11 "view"_s,
     88            PREFIX_SVG11 "viewportattribute"_s,
     89            PREFIX_SVG11 "xlinkattribute"_s,
     90            PREFIX_SVG11 "basicfont"_s,
     91            PREFIX_SVG11 "font"_s,
     92            PREFIX_SVG11 "svg"_s,
     93            PREFIX_SVG11 "svg-static"_s,
     94            PREFIX_SVG11 "svgdom"_s,
     95            PREFIX_SVG11 "svgdom-static"_s,
    9496        };
    9597        HashSet<String, ASCIICaseInsensitiveHash> set;
    9698        for (auto& feature : features10)
    97             set.add(makeString("org.w3c.", feature));
     99            set.add(feature);
    98100        for (auto& feature : features11)
    99             set.add(makeString("http://www.w3.org/tr/svg11/feature#", feature));
     101            set.add(feature);
    100102        return set;
    101103    }();
     104#undef PREFIX_W3C
     105#undef PREFIX_SVG11
    102106    return features;
    103107}
Note: See TracChangeset for help on using the changeset viewer.