[GTK] Datalist element support for TextFieldInputType
authorcarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jul 2019 08:02:09 +0000 (08:02 +0000)
committercarlosgc@webkit.org <carlosgc@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Jul 2019 08:02:09 +0000 (08:02 +0000)
commit76c1f2301c907bd6329b18cb68edbe2b8fcc6d71
treee548d9e8b394cf6a560d02008e483af501767ee2
parentc00b1e76269e7ab995ea8615eab2de9668b63693
[GTK] Datalist element support for TextFieldInputType
https://bugs.webkit.org/show_bug.cgi?id=98934

Reviewed by Michael Catanzaro.

.:

Enable DATALIST_ELEMENT.

* Source/cmake/OptionsGTK.cmake:

Source/WebCore:

Add support for rendering the arrow indicator of text fields having data list.

* rendering/RenderThemeGtk.cpp:
(WebCore::RenderThemeGtk::paintTextField):
(WebCore::RenderThemeGtk::adjustListButtonStyle const):
(WebCore::RenderThemeGtk::paintListButtonForInput):
(WebCore::RenderThemeGtk::adjustSearchFieldStyle const):
* rendering/RenderThemeGtk.h:

Source/WebKit:

Add a WebDataListSuggestionsDropdown implementation for the GTK port using a popup window with a tree view list.

* Sources.txt:
* SourcesGTK.txt:
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDataListSuggestionsDropdown):
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp: Added.
(WebKit::firstTimeItemSelectedCallback):
(WebKit::WebDataListSuggestionsDropdownGtk::WebDataListSuggestionsDropdownGtk):
(WebKit::WebDataListSuggestionsDropdownGtk::~WebDataListSuggestionsDropdownGtk):
(WebKit::WebDataListSuggestionsDropdownGtk::treeViewRowActivatedCallback):
(WebKit::WebDataListSuggestionsDropdownGtk::didSelectOption):
(WebKit::WebDataListSuggestionsDropdownGtk::show):
(WebKit::WebDataListSuggestionsDropdownGtk::handleKeydownWithIdentifier):
(WebKit::WebDataListSuggestionsDropdownGtk::close):
* UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h: Copied from Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.h.

Tools:

Implement UIScriptControllerGtk::isShowingDataListSuggestions.

* WebKitTestRunner/gtk/UIScriptControllerGtk.cpp:
(WTR::UIScriptControllerGtk::isShowingDataListSuggestions const):
* WebKitTestRunner/gtk/UIScriptControllerGtk.h:

LayoutTests:

Unskip datalist tests for GTK port.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248033 268f45cc-cd09-0410-ab3c-d52691b4dbfc
18 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/platform/gtk/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderThemeGtk.cpp
Source/WebCore/rendering/RenderThemeGtk.h
Source/WebKit/ChangeLog
Source/WebKit/Sources.txt
Source/WebKit/SourcesCocoa.txt
Source/WebKit/SourcesGTK.txt
Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp
Source/WebKit/UIProcess/API/gtk/PageClientImpl.h
Source/WebKit/UIProcess/gtk/WebDataListSuggestionsDropdownGtk.cpp [new file with mode: 0644]
Source/WebKit/UIProcess/gtk/WebDataListSuggestionsDropdownGtk.h [new file with mode: 0644]
Source/cmake/OptionsGTK.cmake
Tools/ChangeLog
Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.cpp
Tools/WebKitTestRunner/gtk/UIScriptControllerGtk.h