Changeset 234105 in webkit


Ignore:
Timestamp:
Jul 23, 2018 12:13:08 PM (6 years ago)
Author:
commit-queue@webkit.org
Message:

[iOS] Add support for input[type=color]
https://bugs.webkit.org/show_bug.cgi?id=187871

Patch by Aditya Keerthi <Aditya Keerthi> on 2018-07-23
Reviewed by Tim Horton.

Source/WebCore:

  • css/html.css: Remove unwanted styling for color inputs with a list attribute.
  • html/ColorInputType.cpp: Make the element focusable.

(WebCore::ColorInputType::isMouseFocusable const):
(WebCore::ColorInputType::isKeyboardFocusable const):

  • html/ColorInputType.h:
  • html/HTMLInputElement.h: Expose isColorControl() to WebKit.
  • page/Chrome.cpp:

(WebCore::Chrome::createColorChooser):

Source/WebKit:

Created WKFormColorControl to display a color picker once a color input gains
focus. The control is presented as an inputView on iPhone and as a popover on
iPad. The picker itself consists of two color matrices. The first is a set of 12
default colors, displayed on the top row of the picker. In a subsequent patch,
this top row will be made customizable through the use of the datalist element.
The second matrix is a grid of 120 colors, provided by the system. Colors can be
selected from either matrix by tapping or with a pan gesture.

WKColorMatrixView represents a single color matrix and is comprised of
WKColorButtons that represent each color in the matrix.

  • Shared/AssistedNodeInformation.h:
  • UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm:

(WebKit::PageClientImpl::createColorPicker):

  • UIProcess/ios/WKContentViewInteraction.mm:

(-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(isAssistableInputType):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
(-[WKContentView actionNameForFocusedFormControlView:]):

  • UIProcess/ios/forms/WKFormColorControl.h: Added.
  • UIProcess/ios/forms/WKFormColorControl.mm: Added.

(-[WKColorPopover initWithView:]):
(-[WKColorPopover controlView]):
(-[WKColorPopover controlBeginEditing]):
(-[WKColorPopover controlEndEditing]):
(-[WKFormColorControl initWithView:]):
(-[WKFormColorControl assistantView]):
(-[WKFormColorControl beginEditing]):
(-[WKFormColorControl endEditing]):

  • UIProcess/ios/forms/WKFormColorPicker.h: Added.
  • UIProcess/ios/forms/WKFormColorPicker.mm: Added.

(+[WKColorButton colorButtonWithColor:]):
(-[WKColorMatrixView initWithFrame:]):
(-[WKColorMatrixView initWithFrame:colorMatrix:]):
(-[WKColorMatrixView layoutSubviews]):
(-[WKColorMatrixView colorButtonTapped:]):
(+[WKColorPicker defaultTopColorMatrix]):
(-[WKColorPicker initWithView:]):
(-[WKColorPicker setControlValueFromUIColor:]):
(-[WKColorPicker controlView]):
(-[WKColorPicker controlBeginEditing]):
(-[WKColorPicker controlEndEditing]):
(-[WKColorPicker colorMatrixView:didTapColorButton:]):
(-[WKColorPicker didPanColors:]):

  • WebKit.xcodeproj/project.pbxproj:
  • WebProcess/WebPage/ios/WebPageIOS.mm:

(WebKit::isAssistableElement):
(WebKit::WebPage::getAssistedNodeInformation):

Location:
trunk/Source
Files:
4 added
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r234098 r234105  
     12018-07-23  Aditya Keerthi  <akeerthi@apple.com>
     2
     3        [iOS] Add support for input[type=color]
     4        https://bugs.webkit.org/show_bug.cgi?id=187871
     5
     6        Reviewed by Tim Horton.
     7
     8        * css/html.css: Remove unwanted styling for color inputs with a list attribute.
     9        * html/ColorInputType.cpp: Make the element focusable.
     10        (WebCore::ColorInputType::isMouseFocusable const):
     11        (WebCore::ColorInputType::isKeyboardFocusable const):
     12        * html/ColorInputType.h:
     13        * html/HTMLInputElement.h: Expose isColorControl() to WebKit.
     14        * page/Chrome.cpp:
     15        (WebCore::Chrome::createColorChooser):
     16
    1172018-07-22  Dean Jackson  <dino@apple.com>
    218
  • trunk/Source/WebCore/css/html.css

    r232806 r234105  
    864864
    865865input[type="color"] {
     866#if !(defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS)
    866867    -webkit-appearance: square-button;
     868#endif
    867869    width: 44px;
    868870    height: 23px;
     
    881883    border: 1px solid #777777;
    882884    flex: 1;
    883 }
    884 
    885 #if defined(ENABLE_DATALIST_ELEMENT) && ENABLE_DATALIST_ELEMENT
    886 
    887 input[type="color"][list] {
    888     -webkit-appearance: menulist;
    889     width: 88px;
    890     height: 23px;
    891 }
    892 
    893 input[type="color"][list]::-webkit-color-swatch-wrapper {
    894     padding-left: 8px;
    895     padding-right: 24px;
    896 }
    897 
    898 input[type="color"][list]::-webkit-color-swatch {
    899     border-color: #000000;
    900885}
    901886
  • trunk/Source/WebCore/html/ColorInputType.cpp

    r233122 r234105  
    8282}
    8383
     84bool ColorInputType::isMouseFocusable() const
     85{
     86    ASSERT(element());
     87    return element()->isTextFormControlFocusable();
     88}
     89
     90bool ColorInputType::isKeyboardFocusable(KeyboardEvent*) const
     91{
     92    ASSERT(element());
     93#if PLATFORM(IOS)
     94    if (element()->isReadOnly())
     95        return false;
     96
     97    return element()->isTextFormControlFocusable();
     98#endif
     99    return false;
     100}
     101
    84102bool ColorInputType::isColorControl() const
    85103{
  • trunk/Source/WebCore/html/ColorInputType.h

    r225680 r234105  
    5252    bool shouldShowSuggestions() const final;
    5353    Vector<Color> suggestions() const final;
     54    bool isMouseFocusable() const final;
     55    bool isKeyboardFocusable(KeyboardEvent*) const final;
    5456    bool isColorControl() const final;
    5557    const AtomicString& formControlType() const final;
  • trunk/Source/WebCore/html/HTMLInputElement.h

    r233578 r234105  
    108108
    109109#if ENABLE(INPUT_TYPE_COLOR)
    110     bool isColorControl() const;
     110    WEBCORE_EXPORT bool isColorControl() const;
    111111#endif
    112112
  • trunk/Source/WebCore/page/Chrome.cpp

    r234074 r234105  
    425425std::unique_ptr<ColorChooser> Chrome::createColorChooser(ColorChooserClient& client, const Color& initialColor)
    426426{
     427#if PLATFORM(IOS)
     428    return nullptr;
     429#endif
    427430    notifyPopupOpeningObservers();
    428431    return m_client.createColorChooser(client, initialColor);
  • trunk/Source/WebKit/ChangeLog

    r234103 r234105  
     12018-07-23  Aditya Keerthi  <akeerthi@apple.com>
     2
     3        [iOS] Add support for input[type=color]
     4        https://bugs.webkit.org/show_bug.cgi?id=187871
     5
     6        Reviewed by Tim Horton.
     7
     8        Created WKFormColorControl to display a color picker once a color input gains
     9        focus. The control is presented as an inputView on iPhone and as a popover on
     10        iPad. The picker itself consists of two color matrices. The first is a set of 12
     11        default colors, displayed on the top row of the picker. In a subsequent patch,
     12        this top row will be made customizable through the use of the datalist element.
     13        The second matrix is a grid of 120 colors, provided by the system. Colors can be
     14        selected from either matrix by tapping or with a pan gesture.
     15
     16        WKColorMatrixView represents a single color matrix and is comprised of
     17        WKColorButtons that represent each color in the matrix.
     18
     19        * Shared/AssistedNodeInformation.h:
     20        * UIProcess/API/Cocoa/_WKFocusedElementInfo.h:
     21        * UIProcess/ios/PageClientImplIOS.h:
     22        * UIProcess/ios/PageClientImplIOS.mm:
     23        (WebKit::PageClientImpl::createColorPicker):
     24        * UIProcess/ios/WKContentViewInteraction.mm:
     25        (-[WKFocusedElementInfo initWithAssistedNodeInformation:isUserInitiated:userObject:]):
     26        (-[WKContentView _requiresKeyboardWhenFirstResponder]):
     27        (-[WKContentView inputView]):
     28        (-[WKContentView requiresAccessoryView]):
     29        (isAssistableInputType):
     30        (-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:changingActivityState:userObject:]):
     31        (-[WKContentView actionNameForFocusedFormControlView:]):
     32        * UIProcess/ios/forms/WKFormColorControl.h: Added.
     33        * UIProcess/ios/forms/WKFormColorControl.mm: Added.
     34        (-[WKColorPopover initWithView:]):
     35        (-[WKColorPopover controlView]):
     36        (-[WKColorPopover controlBeginEditing]):
     37        (-[WKColorPopover controlEndEditing]):
     38        (-[WKFormColorControl initWithView:]):
     39        (-[WKFormColorControl assistantView]):
     40        (-[WKFormColorControl beginEditing]):
     41        (-[WKFormColorControl endEditing]):
     42        * UIProcess/ios/forms/WKFormColorPicker.h: Added.
     43        * UIProcess/ios/forms/WKFormColorPicker.mm: Added.
     44        (+[WKColorButton colorButtonWithColor:]):
     45        (-[WKColorMatrixView initWithFrame:]):
     46        (-[WKColorMatrixView initWithFrame:colorMatrix:]):
     47        (-[WKColorMatrixView layoutSubviews]):
     48        (-[WKColorMatrixView colorButtonTapped:]):
     49        (+[WKColorPicker defaultTopColorMatrix]):
     50        (-[WKColorPicker initWithView:]):
     51        (-[WKColorPicker setControlValueFromUIColor:]):
     52        (-[WKColorPicker controlView]):
     53        (-[WKColorPicker controlBeginEditing]):
     54        (-[WKColorPicker controlEndEditing]):
     55        (-[WKColorPicker colorMatrixView:didTapColorButton:]):
     56        (-[WKColorPicker didPanColors:]):
     57        * WebKit.xcodeproj/project.pbxproj:
     58        * WebProcess/WebPage/ios/WebPageIOS.mm:
     59        (WebKit::isAssistableElement):
     60        (WebKit::WebPage::getAssistedNodeInformation):
     61
    1622018-07-23  Stephan Szabo  <stephan.szabo@sony.com>
    263
  • trunk/Source/WebKit/Shared/AssistedNodeInformation.h

    r232968 r234105  
    5353    Week,
    5454    Time,
    55     Select
     55    Select,
     56#if ENABLE(INPUT_TYPE_COLOR)
     57    Color
     58#endif
    5659};
    5760
  • trunk/Source/WebKit/UIProcess/API/Cocoa/_WKFocusedElementInfo.h

    r230121 r234105  
    5353    WKInputTypeWeek,
    5454    WKInputTypeTime,
    55     WKInputTypeSelect
     55    WKInputTypeSelect,
     56    WKInputTypeColor
    5657};
    5758
  • trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.h

    r233866 r234105  
    101101    Ref<WebCore::ValidationBubble> createValidationBubble(const String& message, const WebCore::ValidationBubble::Settings&) final;
    102102
     103#if ENABLE(INPUT_TYPE_COLOR)
     104    RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&) final;
     105#endif
     106
    103107#if ENABLE(DATALIST_ELEMENT)
    104108    RefPtr<WebDataListSuggestionsDropdown> createDataListSuggestionsDropdown(WebPageProxy&) final;
  • trunk/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm

    r233866 r234105  
    765765}
    766766
     767#if ENABLE(INPUT_TYPE_COLOR)
     768RefPtr<WebColorPicker> PageClientImpl::createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&)
     769{
     770    return nullptr;
     771}
     772#endif
     773
    767774#if ENABLE(DATALIST_ELEMENT)
    768775RefPtr<WebDataListSuggestionsDropdown> PageClientImpl::createDataListSuggestionsDropdown(WebPageProxy& page)
  • trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r234067 r234105  
    112112#endif
    113113
     114#if ENABLE(INPUT_TYPE_COLOR)
     115#import "WKFormColorControl.h"
     116#endif
     117
    114118@interface UIEvent(UIEventInternal)
    115119@property (nonatomic, assign) UIKeyboardInputFlags _inputFlags;
     
    478482        _type = WKInputTypeSelect;
    479483        break;
     484#if ENABLE(INPUT_TYPE_COLOR)
     485    case WebKit::InputType::Color:
     486        _type = WKInputTypeColor;
     487        break;
     488#endif
    480489    case WebKit::InputType::None:
    481490        _type = WKInputTypeNone;
     
    12571266        return NO;
    12581267    case InputType::Select:
     1268#if ENABLE(INPUT_TYPE_COLOR)
     1269    case InputType::Color:
     1270#endif
    12591271        return !currentUserInterfaceIdiomIsPad();
    12601272    case InputType::Date:
     
    12971309        return nil;
    12981310
    1299     if (!_inputPeripheral)
    1300         _inputPeripheral = adoptNS(_assistedNodeInformation.elementType == InputType::Select ? [[WKFormSelectControl alloc] initWithView:self] : [[WKFormInputControl alloc] initWithView:self]);
    1301     else
     1311    if (!_inputPeripheral) {
     1312        switch (_assistedNodeInformation.elementType) {
     1313        case InputType::Select:
     1314            _inputPeripheral = adoptNS([[WKFormSelectControl alloc] initWithView:self]);
     1315            break;
     1316#if ENABLE(INPUT_TYPE_COLOR)
     1317        case InputType::Color:
     1318            _inputPeripheral = adoptNS([[WKFormColorControl alloc] initWithView:self]);
     1319            break;
     1320#endif
     1321        default:
     1322            _inputPeripheral = adoptNS([[WKFormInputControl alloc] initWithView:self]);
     1323            break;
     1324        }
     1325    } else
    13021326        [self _displayFormNodeInputView];
    13031327
     
    20352059    case InputType::Week:
    20362060    case InputType::Time:
     2061#if ENABLE(INPUT_TYPE_COLOR)
     2062    case InputType::Color:
     2063#endif
    20372064        return !currentUserInterfaceIdiomIsPad();
    20382065    }
     
    40364063    case InputType::Time:
    40374064    case InputType::Select:
     4065#if ENABLE(INPUT_TYPE_COLOR)
     4066    case InputType::Color:
     4067#endif
    40384068        return true;
    40394069
     
    41414171    case InputType::Month:
    41424172    case InputType::Date:
     4173#if ENABLE(INPUT_TYPE_COLOR)
     4174    case InputType::Color:
     4175#endif
    41434176        break;
    41444177    default:
     
    43974430    case InputType::Time:
    43984431    case InputType::Date:
     4432#if ENABLE(INPUT_TYPE_COLOR)
     4433    case InputType::Color:
     4434#endif
    43994435        return nil;
    44004436    case InputType::Search:
  • trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj

    r234009 r234105  
    21842184                E52CF55220A35C3A00DADA27 /* WebDataListSuggestionPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = E52CF55020A35C3A00DADA27 /* WebDataListSuggestionPicker.h */; };
    21852185                E52CF55320A35C3A00DADA27 /* WebDataListSuggestionPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E52CF55120A35C3A00DADA27 /* WebDataListSuggestionPicker.cpp */; };
     2186                E548EBD121015F0E00BE3C32 /* WKFormColorPicker.h in Headers */ = {isa = PBXBuildFile; fileRef = E548EBCF21015F0E00BE3C32 /* WKFormColorPicker.h */; };
     2187                E548EBD221015F0E00BE3C32 /* WKFormColorPicker.mm in Sources */ = {isa = PBXBuildFile; fileRef = E548EBD021015F0E00BE3C32 /* WKFormColorPicker.mm */; };
    21862188                E54A14CF20FCFB7B007E13D8 /* WebDataListSuggestionsDropdown.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E54A14CE20FCFB7B007E13D8 /* WebDataListSuggestionsDropdown.cpp */; };
    21872189                E568B91F20A3AB2F00E3C856 /* WebDataListSuggestionsDropdown.h in Headers */ = {isa = PBXBuildFile; fileRef = E568B91E20A3AB2F00E3C856 /* WebDataListSuggestionsDropdown.h */; };
    21882190                E568B92220A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.h in Headers */ = {isa = PBXBuildFile; fileRef = E568B92020A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.h */; };
    21892191                E568B92320A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */; };
     2192                E5CB07DC20E1678F0022C183 /* WKFormColorControl.h in Headers */ = {isa = PBXBuildFile; fileRef = E5CB07DA20E1678F0022C183 /* WKFormColorControl.h */; };
     2193                E5CB07DD20E1678F0022C183 /* WKFormColorControl.mm in Sources */ = {isa = PBXBuildFile; fileRef = E5CB07DB20E1678F0022C183 /* WKFormColorControl.mm */; };
    21902194                ECA680D81E690E2500731D20 /* WebProcessCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = ECA680D71E690DF800731D20 /* WebProcessCocoa.h */; settings = {ATTRIBUTES = (Private, ); }; };
    21912195                ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    48254829                E52CF55020A35C3A00DADA27 /* WebDataListSuggestionPicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebDataListSuggestionPicker.h; sourceTree = "<group>"; };
    48264830                E52CF55120A35C3A00DADA27 /* WebDataListSuggestionPicker.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebDataListSuggestionPicker.cpp; sourceTree = "<group>"; };
     4831                E548EBCF21015F0E00BE3C32 /* WKFormColorPicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFormColorPicker.h; path = ios/forms/WKFormColorPicker.h; sourceTree = "<group>"; };
     4832                E548EBD021015F0E00BE3C32 /* WKFormColorPicker.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFormColorPicker.mm; path = ios/forms/WKFormColorPicker.mm; sourceTree = "<group>"; };
    48274833                E54A14CE20FCFB7B007E13D8 /* WebDataListSuggestionsDropdown.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = WebDataListSuggestionsDropdown.cpp; sourceTree = "<group>"; };
    48284834                E568B91E20A3AB2F00E3C856 /* WebDataListSuggestionsDropdown.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebDataListSuggestionsDropdown.h; sourceTree = "<group>"; };
    48294835                E568B92020A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebDataListSuggestionsDropdownMac.h; sourceTree = "<group>"; };
    48304836                E568B92120A3AC6A00E3C856 /* WebDataListSuggestionsDropdownMac.mm */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.objcpp; path = WebDataListSuggestionsDropdownMac.mm; sourceTree = "<group>"; };
     4837                E5CB07DA20E1678F0022C183 /* WKFormColorControl.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKFormColorControl.h; path = ios/forms/WKFormColorControl.h; sourceTree = "<group>"; };
     4838                E5CB07DB20E1678F0022C183 /* WKFormColorControl.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKFormColorControl.mm; path = ios/forms/WKFormColorControl.mm; sourceTree = "<group>"; };
    48314839                ECA680D31E6904B500731D20 /* ExtraPrivateSymbolsForTAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExtraPrivateSymbolsForTAPI.h; sourceTree = "<group>"; };
    48324840                ECA680D71E690DF800731D20 /* WebProcessCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebProcessCocoa.h; sourceTree = "<group>"; };
     
    86548662                                2E16B6CD2017B7AC008996D6 /* WKFocusedFormControlView.h */,
    86558663                                2E16B6CC2017B7AB008996D6 /* WKFocusedFormControlView.mm */,
     8664                                E5CB07DA20E1678F0022C183 /* WKFormColorControl.h */,
     8665                                E5CB07DB20E1678F0022C183 /* WKFormColorControl.mm */,
     8666                                E548EBCF21015F0E00BE3C32 /* WKFormColorPicker.h */,
     8667                                E548EBD021015F0E00BE3C32 /* WKFormColorPicker.mm */,
    86568668                                C54256AF18BEC18B00DE4179 /* WKFormInputControl.h */,
    86578669                                C54256B018BEC18B00DE4179 /* WKFormInputControl.mm */,
     
    97299741                                37F623B812A57B6200E3FDF6 /* WKFindOptions.h in Headers */,
    97309742                                2E16B6CF2017B7AD008996D6 /* WKFocusedFormControlView.h in Headers */,
     9743                                E5CB07DC20E1678F0022C183 /* WKFormColorControl.h in Headers */,
     9744                                E548EBD121015F0E00BE3C32 /* WKFormColorPicker.h in Headers */,
    97319745                                C54256B518BEC18C00DE4179 /* WKFormInputControl.h in Headers */,
    97329746                                C54256B718BEC18C00DE4179 /* WKFormPeripheral.h in Headers */,
     
    1153811552                                A58B6F0918FCA733008CBA53 /* WKFileUploadPanel.mm in Sources */,
    1153911553                                2E16B6CE2017B7AD008996D6 /* WKFocusedFormControlView.mm in Sources */,
     11554                                E5CB07DD20E1678F0022C183 /* WKFormColorControl.mm in Sources */,
     11555                                E548EBD221015F0E00BE3C32 /* WKFormColorPicker.mm in Sources */,
    1154011556                                C54256B618BEC18C00DE4179 /* WKFormInputControl.mm in Sources */,
    1154111557                                C54256B918BEC18C00DE4179 /* WKFormPopover.mm in Sources */,
  • trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r234023 r234105  
    20192019        HTMLInputElement& inputElement = downcast<HTMLInputElement>(node);
    20202020        // FIXME: This laundry list of types is not a good way to factor this. Need a suitable function on HTMLInputElement itself.
     2021#if ENABLE(INPUT_TYPE_COLOR)
     2022        if (inputElement.isColorControl())
     2023            return true;
     2024#endif
    20212025        return inputElement.isTextField() || inputElement.isDateField() || inputElement.isDateTimeLocalField() || inputElement.isMonthField() || inputElement.isTimeField();
    20222026    }
     
    24452449            }
    24462450        }
     2451#if ENABLE(INPUT_TYPE_COLOR)
     2452        else if (element.isColorControl())
     2453            information.elementType = InputType::Color;
     2454#endif
    24472455
    24482456        information.isReadOnly = element.isReadOnly();
Note: See TracChangeset for help on using the changeset viewer.