Title: [276448] trunk
Revision
276448
Author
[email protected]
Date
2021-04-22 11:09:53 -0700 (Thu, 22 Apr 2021)

Log Message

[GTK] Turn on editable <input type=date> and <input type=time> fields
https://bugs.webkit.org/show_bug.cgi?id=224921

Reviewed by Carlos Garcia Campos.

.:

Turn on editable date and time inputs for GTK

* Source/cmake/OptionsGTK.cmake: Add new source file to the list.

Source/WebCore:

Turn on editable date and time inputs for GTK.

No new tests. This is covered by enabling existing <input type=date>
and <input type=time> tests.

* Headers.cmake: Add headers to the list.
* loader/EmptyClients.cpp: Add missing header include.

Source/WebKit:

Turn on editable date and time inputs for GTK.

* SourcesGTK.txt: Add source file.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDateTimePicker): Added.
* UIProcess/API/gtk/PageClientImpl.h: Added method declaration.
* UIProcess/gtk/WebDateTimePickerGtk.cpp: Added. Stub for date/time picker which
doesn't have any user interface. This will allow clients to use the editable shadow
DOM date/time input editable fields.
(WebKit::WebDateTimePickerGtk::create):
(WebKit::WebDateTimePickerGtk::~WebDateTimePickerGtk):
(WebKit::WebDateTimePickerGtk::WebDateTimePickerGtk):
(WebKit::WebDateTimePickerGtk::endPicker):
(WebKit::WebDateTimePickerGtk::showDateTimePicker):
* UIProcess/gtk/WebDateTimePickerGtk.h: Added.

Source/WTF:

Turn on editable date and time inputs for GTK.

* Scripts/Preferences/WebPreferencesInternal.yaml: Set editable date/time inputs
on by default for GTK as well.

LayoutTests:

Turn on editable date and time inputs for GTK.

* platform/gtk/TestExpectations: Enable new forms test for WebKitGTK.
* platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt: Added.
* platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt: Added.
* platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/ChangeLog (276447 => 276448)


--- trunk/ChangeLog	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/ChangeLog	2021-04-22 18:09:53 UTC (rev 276448)
@@ -1,3 +1,14 @@
+2021-04-22  Martin Robinson  <[email protected]>
+
+        [GTK] Turn on editable <input type=date> and <input type=time> fields
+        https://bugs.webkit.org/show_bug.cgi?id=224921
+
+        Reviewed by Carlos Garcia Campos.
+
+        Turn on editable date and time inputs for GTK
+
+        * Source/cmake/OptionsGTK.cmake: Add new source file to the list.
+
 2021-04-22  Imanol Fernandez  <[email protected]>
 
         Implement WebXR Input Sources

Modified: trunk/LayoutTests/ChangeLog (276447 => 276448)


--- trunk/LayoutTests/ChangeLog	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/LayoutTests/ChangeLog	2021-04-22 18:09:53 UTC (rev 276448)
@@ -1,3 +1,17 @@
+2021-04-22  Martin Robinson  <[email protected]>
+
+        [GTK] Turn on editable <input type=date> and <input type=time> fields
+        https://bugs.webkit.org/show_bug.cgi?id=224921
+
+        Reviewed by Carlos Garcia Campos.
+
+        Turn on editable date and time inputs for GTK.
+
+        * platform/gtk/TestExpectations: Enable new forms test for WebKitGTK.
+        * platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt: Added.
+        * platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt: Added.
+        * platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt: Added.
+
 2021-04-22  Ziran Sun  <[email protected]>
 
         [css-grid] WPT Tests css/css-grid/grid-items/grid-item-percentage-sizes-*.html fail

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (276447 => 276448)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2021-04-22 18:09:53 UTC (rev 276448)
@@ -335,12 +335,9 @@
 fast/history/page-cache-notification-showing.html
 fast/history/page-cache-notification-suspendable.html
 
-# ENABLE_INPUT_TYPE_* are not enabled.
-webkit.org/b/98936 fast/forms/date [ Skip ]
-webkit.org/b/98936 fast/forms/datetimelocal [ Skip ]
-webkit.org/b/98936 fast/forms/month [ Skip ]
-webkit.org/b/98936 fast/forms/time [ Skip ]
-webkit.org/b/98936 fast/forms/week [ Skip ]
+# UI pickers are not implemented for date and time inputs.
+webkit.org/b/224924 fast/forms/date/date-show-hide-picker.html [ Skip ]
+webkit.org/b/224924 fast/forms/datetimelocal/datetimelocal-show-hide-picker.html [ Skip ]
 
 # Requires WebP support.
 webkit.org/b/98939 fast/canvas/canvas-toDataURL-webp.html [ Skip ]

Added: trunk/LayoutTests/platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt (0 => 276448)


--- trunk/LayoutTests/platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/fast/forms/date/date-input-rendering-basic-expected.txt	2021-04-22 18:09:53 UTC (rev 276448)
@@ -0,0 +1,46 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {INPUT} at (2,2) size 94x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (98,13) size 4x17
+        text run at (98,13) width 4: " "
+      RenderBlock {INPUT} at (104,2) size 94x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (0,0) size 0x0
+layer at (13,13) size 88x22
+  RenderBlock {DIV} at (3,3) size 88x22
+    RenderBlock {DIV} at (1,1) size 86x20
+      RenderBlock {DIV} at (0,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "04"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (20,1) size 4x17
+          text run at (20,1) width 4: "/"
+      RenderBlock {DIV} at (24,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "01"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (44,1) size 4x17
+          text run at (44,1) width 4: "/"
+      RenderBlock {DIV} at (48,0) size 38x20
+        RenderText {#text} at (1,1) size 36x17
+          text run at (1,1) width 36: "1976"
+layer at (115,13) size 88x22
+  RenderBlock {DIV} at (3,3) size 88x22
+    RenderBlock {DIV} at (1,1) size 86x20
+      RenderBlock {DIV} at (66,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "04"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (62,1) size 4x17
+          text run at (62,1) width 4 RTL: "/"
+      RenderBlock {DIV} at (42,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "01"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (38,1) size 4x17
+          text run at (38,1) width 4 RTL: "/"
+      RenderBlock {DIV} at (0,0) size 38x20
+        RenderText {#text} at (1,1) size 36x17
+          text run at (1,1) width 36: "1976"

Added: trunk/LayoutTests/platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt (0 => 276448)


--- trunk/LayoutTests/platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/fast/forms/date/date-pseudo-elements-expected.txt	2021-04-22 18:09:53 UTC (rev 276448)
@@ -0,0 +1,46 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {INPUT} at (2,2) size 106x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (110,14) size 4x17
+        text run at (110,14) width 4: " "
+      RenderBlock {INPUT} at (116,2) size 106x29 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (0,0) size 0x0
+layer at (13,13) size 100x23 clip at (14,14) size 98x21
+  RenderBlock {DIV} at (3,3) size 100x23 [border: (1px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 96x19
+      RenderBlock {DIV} at (0,0) size 20x19 [color=#FF0000]
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "04"
+      RenderInline {DIV} at (0,0) size 9x17 [color=#FFFF00]
+        RenderText {#text} at (20,1) size 9x17
+          text run at (20,1) width 9: "/"
+      RenderBlock {DIV} at (29,0) size 20x19 [color=#008000]
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "01"
+      RenderInline {DIV} at (0,0) size 9x17 [color=#FFFF00]
+        RenderText {#text} at (49,1) size 9x17
+          text run at (49,1) width 9: "/"
+      RenderBlock {DIV} at (58,0) size 38x19 [color=#0000FF]
+        RenderText {#text} at (1,1) size 36x17
+          text run at (1,1) width 36: "1976"
+layer at (127,13) size 100x23 clip at (128,14) size 98x21
+  RenderBlock {DIV} at (3,3) size 100x23 [border: (1px solid #FF0000)]
+    RenderBlock {DIV} at (2,2) size 96x19
+      RenderBlock {DIV} at (76,0) size 20x19 [color=#FF0000]
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "04"
+      RenderInline {DIV} at (0,0) size 9x17 [color=#FFFF00]
+        RenderText {#text} at (67,1) size 9x17
+          text run at (67,1) width 9 RTL: "/"
+      RenderBlock {DIV} at (47,0) size 20x19 [color=#008000]
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "01"
+      RenderInline {DIV} at (0,0) size 9x17 [color=#FFFF00]
+        RenderText {#text} at (38,1) size 9x17
+          text run at (38,1) width 9 RTL: "/"
+      RenderBlock {DIV} at (0,0) size 38x19 [color=#0000FF]
+        RenderText {#text} at (1,1) size 36x17
+          text run at (1,1) width 36: "1976"

Added: trunk/LayoutTests/platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt (0 => 276448)


--- trunk/LayoutTests/platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/gtk/fast/forms/time/time-input-rendering-basic-expected.txt	2021-04-22 18:09:53 UTC (rev 276448)
@@ -0,0 +1,46 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {INPUT} at (2,2) size 80x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (84,13) size 4x17
+        text run at (84,13) width 4: " "
+      RenderBlock {INPUT} at (90,2) size 80x28 [bgcolor=#FFFFFF] [border: (2px inset #000000)]
+      RenderText {#text} at (0,0) size 0x0
+layer at (13,13) size 74x22
+  RenderBlock {DIV} at (3,3) size 74x22
+    RenderBlock {DIV} at (1,1) size 72x20
+      RenderBlock {DIV} at (0,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "09"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (20,1) size 4x17
+          text run at (20,1) width 4: ":"
+      RenderBlock {DIV} at (24,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "41"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (43,1) size 4x17
+          text run at (43,1) width 4: " "
+      RenderBlock {DIV} at (46,0) size 26x20
+        RenderText {#text} at (1,1) size 24x17
+          text run at (1,1) width 24: "AM"
+layer at (101,13) size 74x22
+  RenderBlock {DIV} at (3,3) size 74x22
+    RenderBlock {DIV} at (1,1) size 72x20
+      RenderBlock {DIV} at (52,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "09"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (48,1) size 4x17
+          text run at (48,1) width 4 RTL: ":"
+      RenderBlock {DIV} at (28,0) size 20x20
+        RenderText {#text} at (1,1) size 18x17
+          text run at (1,1) width 18: "41"
+      RenderInline {DIV} at (0,0) size 4x17
+        RenderText {#text} at (25,1) size 4x17
+          text run at (25,1) width 4 RTL: " "
+      RenderBlock {DIV} at (0,0) size 26x20
+        RenderText {#text} at (1,1) size 24x17
+          text run at (1,1) width 24: "AM"

Modified: trunk/Source/WTF/ChangeLog (276447 => 276448)


--- trunk/Source/WTF/ChangeLog	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WTF/ChangeLog	2021-04-22 18:09:53 UTC (rev 276448)
@@ -1,3 +1,15 @@
+2021-04-22  Martin Robinson  <[email protected]>
+
+        [GTK] Turn on editable <input type=date> and <input type=time> fields
+        https://bugs.webkit.org/show_bug.cgi?id=224921
+
+        Reviewed by Carlos Garcia Campos.
+
+        Turn on editable date and time inputs for GTK.
+
+        * Scripts/Preferences/WebPreferencesInternal.yaml: Set editable date/time inputs
+        on by default for GTK as well.
+
 2021-04-22  Aditya Keerthi  <[email protected]>
 
         Fix the tvOS build after r276325

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (276447 => 276448)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml	2021-04-22 18:09:53 UTC (rev 276448)
@@ -202,7 +202,7 @@
     WebKitLegacy:
       default: false
     WebKit:
-      "PLATFORM(MAC)": true
+      "PLATFORM(MAC) || PLATFORM(GTK)": true
       default: false
     WebCore:
       default: false

Modified: trunk/Source/WebCore/ChangeLog (276447 => 276448)


--- trunk/Source/WebCore/ChangeLog	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebCore/ChangeLog	2021-04-22 18:09:53 UTC (rev 276448)
@@ -1,3 +1,18 @@
+2021-04-22  Martin Robinson  <[email protected]>
+
+        [GTK] Turn on editable <input type=date> and <input type=time> fields
+        https://bugs.webkit.org/show_bug.cgi?id=224921
+
+        Reviewed by Carlos Garcia Campos.
+
+        Turn on editable date and time inputs for GTK.
+
+        No new tests. This is covered by enabling existing <input type=date>
+        and <input type=time> tests.
+
+        * Headers.cmake: Add headers to the list.
+        * loader/EmptyClients.cpp: Add missing header include.
+
 2021-04-22  Ziran Sun  <[email protected]>
 
         [css-grid] WPT Tests css/css-grid/grid-items/grid-item-percentage-sizes-*.html fail

Modified: trunk/Source/WebCore/Headers.cmake (276447 => 276448)


--- trunk/Source/WebCore/Headers.cmake	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebCore/Headers.cmake	2021-04-22 18:09:53 UTC (rev 276448)
@@ -1014,6 +1014,9 @@
     platform/DataListSuggestionsClient.h
     platform/DataOwnerType.h
     platform/DateComponents.h
+    platform/DateTimeChooser.h
+    platform/DateTimeChooserClient.h
+    platform/DateTimeChooserParameters.h
     platform/Decimal.h
     platform/DeferrableTask.h
     platform/DocumentIdentifier.h

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (276447 => 276448)


--- trunk/Source/WebCore/loader/EmptyClients.cpp	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp	2021-04-22 18:09:53 UTC (rev 276448)
@@ -86,6 +86,10 @@
 #include "LegacyPreviewLoaderClient.h"
 #endif
 
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+#include "DateTimeChooser.h"
+#endif
+
 namespace WebCore {
 
 class UserMessageHandlerDescriptor;

Modified: trunk/Source/WebKit/ChangeLog (276447 => 276448)


--- trunk/Source/WebKit/ChangeLog	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebKit/ChangeLog	2021-04-22 18:09:53 UTC (rev 276448)
@@ -1,3 +1,26 @@
+2021-04-22  Martin Robinson  <[email protected]>
+
+        [GTK] Turn on editable <input type=date> and <input type=time> fields
+        https://bugs.webkit.org/show_bug.cgi?id=224921
+
+        Reviewed by Carlos Garcia Campos.
+
+        Turn on editable date and time inputs for GTK.
+
+        * SourcesGTK.txt: Add source file.
+        * UIProcess/API/gtk/PageClientImpl.cpp:
+        (WebKit::PageClientImpl::createDateTimePicker): Added.
+        * UIProcess/API/gtk/PageClientImpl.h: Added method declaration.
+        * UIProcess/gtk/WebDateTimePickerGtk.cpp: Added. Stub for date/time picker which
+        doesn't have any user interface. This will allow clients to use the editable shadow
+        DOM date/time input editable fields.
+        (WebKit::WebDateTimePickerGtk::create):
+        (WebKit::WebDateTimePickerGtk::~WebDateTimePickerGtk):
+        (WebKit::WebDateTimePickerGtk::WebDateTimePickerGtk):
+        (WebKit::WebDateTimePickerGtk::endPicker):
+        (WebKit::WebDateTimePickerGtk::showDateTimePicker):
+        * UIProcess/gtk/WebDateTimePickerGtk.h: Added.
+
 2021-04-22  Aditya Keerthi  <[email protected]>
 
         Fix the tvOS build after r276325

Modified: trunk/Source/WebKit/SourcesGTK.txt (276447 => 276448)


--- trunk/Source/WebKit/SourcesGTK.txt	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebKit/SourcesGTK.txt	2021-04-22 18:09:53 UTC (rev 276448)
@@ -251,6 +251,7 @@
 UIProcess/gtk/Clipboard.cpp
 UIProcess/gtk/ClipboardGtk3.cpp @no-unify
 UIProcess/gtk/ClipboardGtk4.cpp @no-unify
+UIProcess/gtk/WebDateTimePickerGtk.cpp
 UIProcess/gtk/GestureController.cpp
 UIProcess/gtk/HardwareAccelerationManager.cpp
 UIProcess/gtk/KeyBindingTranslator.cpp

Modified: trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp (276447 => 276448)


--- trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp	2021-04-22 18:09:53 UTC (rev 276448)
@@ -54,6 +54,10 @@
 #include <wtf/text/CString.h>
 #include <wtf/text/WTFString.h>
 
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+#include "WebDateTimePickerGtk.h"
+#endif
+
 namespace WebKit {
 using namespace WebCore;
 
@@ -270,6 +274,13 @@
     return WebColorPickerGtk::create(*page, color, rect);
 }
 
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+RefPtr<WebDateTimePicker> PageClientImpl::createDateTimePicker(WebPageProxy& page)
+{
+    return WebDateTimePickerGtk::create(page);
+}
+#endif
+
 #if ENABLE(DATALIST_ELEMENT)
 RefPtr<WebDataListSuggestionsDropdown> PageClientImpl::createDataListSuggestionsDropdown(WebPageProxy& page)
 {

Modified: trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h (276447 => 276448)


--- trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/WebKit/UIProcess/API/gtk/PageClientImpl.h	2021-04-22 18:09:53 UTC (rev 276448)
@@ -94,6 +94,9 @@
 #if ENABLE(INPUT_TYPE_COLOR)
     RefPtr<WebColorPicker> createColorPicker(WebPageProxy*, const WebCore::Color& initialColor, const WebCore::IntRect&, Vector<WebCore::Color>&&) override;
 #endif
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+    RefPtr<WebDateTimePicker> createDateTimePicker(WebPageProxy&) override;
+#endif
 #if ENABLE(DATALIST_ELEMENT)
     RefPtr<WebDataListSuggestionsDropdown> createDataListSuggestionsDropdown(WebPageProxy&) override;
 #endif

Added: trunk/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp (0 => 276448)


--- trunk/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp	                        (rev 0)
+++ trunk/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.cpp	2021-04-22 18:09:53 UTC (rev 276448)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebDateTimePickerGtk.h"
+
+#include <wtf/StackTrace.h>
+#include <wtf/StringPrintStream.h>
+
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+
+namespace WebKit {
+
+Ref<WebDateTimePickerGtk> WebDateTimePickerGtk::create(WebPageProxy& page)
+{
+    return adoptRef(*new WebDateTimePickerGtk(page));
+}
+
+WebDateTimePickerGtk::~WebDateTimePickerGtk()
+{
+    endPicker();
+}
+
+WebDateTimePickerGtk::WebDateTimePickerGtk(WebPageProxy& page)
+    : WebDateTimePicker(page)
+{
+}
+
+void WebDateTimePickerGtk::endPicker()
+{
+}
+
+void WebDateTimePickerGtk::showDateTimePicker(WebCore::DateTimeChooserParameters&& params)
+{
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(DATE_AND_TIME_INPUT_TYPES)

Added: trunk/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.h (0 => 276448)


--- trunk/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.h	                        (rev 0)
+++ trunk/Source/WebKit/UIProcess/gtk/WebDateTimePickerGtk.h	2021-04-22 18:09:53 UTC (rev 276448)
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ * Copyright (C) 2021 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if ENABLE(DATE_AND_TIME_INPUT_TYPES)
+
+#include "WebDateTimePicker.h"
+#include <WebCore/DateTimeChooserParameters.h>
+
+namespace WebKit {
+
+class WebDateTimePickerGtk final : public WebDateTimePicker {
+public:
+    static Ref<WebDateTimePickerGtk> create(WebPageProxy&);
+    ~WebDateTimePickerGtk();
+
+private:
+    WebDateTimePickerGtk(WebPageProxy&);
+
+    void endPicker() final;
+    void showDateTimePicker(WebCore::DateTimeChooserParameters&&) final;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(DATE_AND_TIME_INPUT_TYPES)

Modified: trunk/Source/cmake/OptionsGTK.cmake (276447 => 276448)


--- trunk/Source/cmake/OptionsGTK.cmake	2021-04-22 18:05:23 UTC (rev 276447)
+++ trunk/Source/cmake/OptionsGTK.cmake	2021-04-22 18:09:53 UTC (rev 276448)
@@ -157,6 +157,11 @@
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FTPDIR PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_GPU_PROCESS PRIVATE OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_COLOR PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_DATE PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_DATETIMELOCAL PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_MONTH PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_TIME PRIVATE ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_INPUT_TYPE_WEEK PRIVATE ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_LAYOUT_FORMATTING_CONTEXT PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MEDIA_STREAM PRIVATE ${ENABLE_EXPERIMENTAL_FEATURES})
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_MHTML PRIVATE ON)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to