Diff
Modified: trunk/Source/WTF/ChangeLog (269774 => 269775)
--- trunk/Source/WTF/ChangeLog 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WTF/ChangeLog 2020-11-13 15:30:59 UTC (rev 269775)
@@ -1,3 +1,18 @@
+2020-11-13 Aditya Keerthi <[email protected]>
+
+ [iOS][FCR] Add an internal feature flag to enable the new appearance
+ https://bugs.webkit.org/show_bug.cgi?id=218873
+ <rdar://problem/71345270>
+
+ Reviewed by Tim Horton.
+
+ Enable the feature at build time on PLATFORM(IOS_FAMILY) and disable
+ the feature at runtime.
+
+ * Scripts/Preferences/WebPreferencesInternal.yaml:
+ * wtf/PlatformEnable.h:
+ * wtf/PlatformEnableCocoa.h:
+
2020-11-12 Youenn Fablet <[email protected]>
Add infrastructure for WebRTC transforms
Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml (269774 => 269775)
--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesInternal.yaml 2020-11-13 15:30:59 UTC (rev 269775)
@@ -306,6 +306,19 @@
WebCore:
default: true
+IOSFormControlRefreshEnabled:
+ type: bool
+ humanReadableName: "iOS Form Control Refresh"
+ humanReadableDescription: "Enable the new appearance for form controls on iOS"
+ condition: ENABLE(IOS_FORM_CONTROL_REFRESH)
+ defaultValue:
+ WebKitLegacy:
+ default: false
+ WebKit:
+ default: false
+ WebCore:
+ default: false
+
IPCTestingAPIEnabled:
type: bool
humanReadableName: "IPC Testing API"
Modified: trunk/Source/WTF/wtf/PlatformEnable.h (269774 => 269775)
--- trunk/Source/WTF/wtf/PlatformEnable.h 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WTF/wtf/PlatformEnable.h 2020-11-13 15:30:59 UTC (rev 269775)
@@ -311,6 +311,10 @@
#define ENABLE_INPUT_TYPE_WEEK 0
#endif
+#if !defined(ENABLE_IOS_FORM_CONTROL_REFRESH)
+#define ENABLE_IOS_FORM_CONTROL_REFRESH 0
+#endif
+
#if !defined(ENABLE_IPC_TESTING_API)
/* Enable IPC testing on all ASAN builds and debug builds. */
#if (ASAN_ENABLED || !defined(NDEBUG)) && PLATFORM(COCOA)
Modified: trunk/Source/WTF/wtf/PlatformEnableCocoa.h (269774 => 269775)
--- trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WTF/wtf/PlatformEnableCocoa.h 2020-11-13 15:30:59 UTC (rev 269775)
@@ -284,6 +284,10 @@
#define ENABLE_INTERSECTION_OBSERVER 1
#endif
+#if !defined(ENABLE_IOS_FORM_CONTROL_REFRESH) && PLATFORM(IOS_FAMILY)
+#define ENABLE_IOS_FORM_CONTROL_REFRESH 1
+#endif
+
#if !defined(ENABLE_IOS_GESTURE_EVENTS) && PLATFORM(IOS_FAMILY) && USE(APPLE_INTERNAL_SDK)
#define ENABLE_IOS_GESTURE_EVENTS 1
#endif
Modified: trunk/Source/WebCore/ChangeLog (269774 => 269775)
--- trunk/Source/WebCore/ChangeLog 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/ChangeLog 2020-11-13 15:30:59 UTC (rev 269775)
@@ -1,3 +1,28 @@
+2020-11-13 Aditya Keerthi <[email protected]>
+
+ [iOS][FCR] Add an internal feature flag to enable the new appearance
+ https://bugs.webkit.org/show_bug.cgi?id=218873
+ <rdar://problem/71345270>
+
+ Reviewed by Tim Horton.
+
+ Add a feature flag for the iOS form control refresh, so that the
+ feature can be tested.
+
+ A new user-agent stylesheet is introduced for the refresh so that
+ the new styles can be opted in to at runtime. Only styles which
+ differ from the existing stylesheet will be added to the new one.
+
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/iOSFormControlRefresh.css: Added.
+ * style/InspectorCSSOMWrappers.cpp:
+ (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
+ * style/UserAgentStyle.cpp:
+ (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
+ * style/UserAgentStyle.h:
+
2020-11-13 Antoine Quint <[email protected]>
Support more properties on ::marker
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (269774 => 269775)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2020-11-13 15:30:59 UTC (rev 269775)
@@ -675,6 +675,7 @@
$(PROJECT_DIR)/css/dialog.css
$(PROJECT_DIR)/css/fullscreen.css
$(PROJECT_DIR)/css/html.css
+$(PROJECT_DIR)/css/iOSFormControlRefresh.css
$(PROJECT_DIR)/css/make-css-file-arrays.pl
$(PROJECT_DIR)/css/makeSelectorPseudoClassAndCompatibilityElementMap.py
$(PROJECT_DIR)/css/makeSelectorPseudoElementsMap.py
Modified: trunk/Source/WebCore/DerivedSources.make (269774 => 269775)
--- trunk/Source/WebCore/DerivedSources.make 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/DerivedSources.make 2020-11-13 15:30:59 UTC (rev 269775)
@@ -1498,6 +1498,7 @@
$(WebCore)/css/dialog.css \
$(WebCore)/css/fullscreen.css \
$(WebCore)/css/html.css \
+ $(WebCore)/css/iOSFormControlRefresh.css \
$(WebCore)/css/mathml.css \
$(WebCore)/css/mediaControls.css \
$(WebCore)/css/plugIns.css \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (269774 => 269775)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2020-11-13 15:30:59 UTC (rev 269775)
@@ -16276,6 +16276,7 @@
E52CF54E20A35A2800DADA27 /* DataListSuggestionPicker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListSuggestionPicker.h; sourceTree = "<group>"; };
E52EFDF22112875A00AD282A /* InputMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = InputMode.h; sourceTree = "<group>"; };
E52EFDF32112875A00AD282A /* InputMode.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = InputMode.cpp; sourceTree = "<group>"; };
+ E54CA6DD255DE2D500F901A3 /* iOSFormControlRefresh.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = iOSFormControlRefresh.css; sourceTree = "<group>"; };
E55F4979151B888000BB67DB /* LengthFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthFunctions.cpp; sourceTree = "<group>"; };
E58B45B820AD07DD00991025 /* DataListButtonElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListButtonElement.h; sourceTree = "<group>"; };
E596DD26251903D100C275A7 /* NavigatorContacts.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NavigatorContacts.h; sourceTree = "<group>"; };
@@ -29220,6 +29221,7 @@
C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */,
CD4E0AFA11F7BC27009D3811 /* fullscreen.css */,
93CA4C9909DF93FA00DF8677 /* html.css */,
+ E54CA6DD255DE2D500F901A3 /* iOSFormControlRefresh.css */,
E55F4979151B888000BB67DB /* LengthFunctions.cpp */,
E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */,
93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */,
Added: trunk/Source/WebCore/css/iOSFormControlRefresh.css (0 => 269775)
--- trunk/Source/WebCore/css/iOSFormControlRefresh.css (rev 0)
+++ trunk/Source/WebCore/css/iOSFormControlRefresh.css 2020-11-13 15:30:59 UTC (rev 269775)
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2020 Apple Inc. All rights reserved.
+ *
+ * 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. ``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
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * 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.
+ */
+
+#if defined(ENABLE_IOS_FORM_CONTROL_REFRESH) && ENABLE_IOS_FORM_CONTROL_REFRESH
+#endif
Modified: trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp (269774 => 269775)
--- trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp 2020-11-13 15:30:59 UTC (rev 269775)
@@ -118,6 +118,9 @@
#if ENABLE(INPUT_TYPE_COLOR)
collectFromStyleSheetContents(UserAgentStyle::colorInputStyleSheet);
#endif
+#if ENABLE(IOS_FORM_CONTROL_REFRESH)
+ collectFromStyleSheetContents(UserAgentStyle::iOSFormControlRefreshStyleSheet);
+#endif
collectFromStyleSheetContents(UserAgentStyle::plugInsStyleSheet);
collectFromStyleSheetContents(UserAgentStyle::mediaQueryStyleSheet);
Modified: trunk/Source/WebCore/style/UserAgentStyle.cpp (269774 => 269775)
--- trunk/Source/WebCore/style/UserAgentStyle.cpp 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/style/UserAgentStyle.cpp 2020-11-13 15:30:59 UTC (rev 269775)
@@ -84,6 +84,9 @@
#if ENABLE(INPUT_TYPE_COLOR)
StyleSheetContents* UserAgentStyle::colorInputStyleSheet;
#endif
+#if ENABLE(IOS_FORM_CONTROL_REFRESH)
+StyleSheetContents* UserAgentStyle::iOSFormControlRefreshStyleSheet;
+#endif
#if PLATFORM(IOS_FAMILY)
#define DEFAULT_OUTLINE_WIDTH "3px"
@@ -296,6 +299,13 @@
}
#endif // ENABLE(FULLSCREEN_API)
+#if ENABLE(IOS_FORM_CONTROL_REFRESH)
+ if (!iOSFormControlRefreshStyleSheet && element.document().settings().iOSFormControlRefreshEnabled()) {
+ iOSFormControlRefreshStyleSheet = parseUASheet(iOSFormControlRefreshUserAgentStyleSheet, sizeof(iOSFormControlRefreshUserAgentStyleSheet));
+ addToDefaultStyle(*iOSFormControlRefreshStyleSheet);
+ }
+#endif
+
ASSERT(defaultStyle->features().idsInRules.isEmpty());
ASSERT(mathMLStyleSheet || defaultStyle->features().siblingRules.isEmpty());
}
Modified: trunk/Source/WebCore/style/UserAgentStyle.h (269774 => 269775)
--- trunk/Source/WebCore/style/UserAgentStyle.h 2020-11-13 14:32:15 UTC (rev 269774)
+++ trunk/Source/WebCore/style/UserAgentStyle.h 2020-11-13 15:30:59 UTC (rev 269775)
@@ -54,6 +54,9 @@
#if ENABLE(INPUT_TYPE_COLOR)
static StyleSheetContents* colorInputStyleSheet;
#endif
+#if ENABLE(IOS_FORM_CONTROL_REFRESH)
+ static StyleSheetContents* iOSFormControlRefreshStyleSheet;
+#endif
static StyleSheetContents* mediaQueryStyleSheet;