Diff
Modified: trunk/Source/WebCore/ChangeLog (273946 => 273947)
--- trunk/Source/WebCore/ChangeLog 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/ChangeLog 2021-03-05 04:48:49 UTC (rev 273947)
@@ -1,3 +1,27 @@
+2021-03-04 Aditya Keerthi <akeer...@apple.com>
+
+ [iOS] Add legacy prefix to the form controls UA stylesheet
+ https://bugs.webkit.org/show_bug.cgi?id=222741
+ <rdar://problem/75039764>
+
+ Reviewed by Ryosuke Niwa.
+
+ Followup to r273839. Rename the iOS form controls UA stylesheet to
+ indicate it contains outdated styles.
+
+ * DerivedSources-input.xcfilelist:
+ * DerivedSources.make:
+ * WebCore.xcodeproj/project.pbxproj:
+ * css/legacyFormControlsIOS.css: Renamed from Source/WebCore/css/formControlsIOS.css.
+
+ Removed redundant comment after the rename.
+
+ * style/InspectorCSSOMWrappers.cpp:
+ (WebCore::Style::InspectorCSSOMWrappers::collectDocumentWrappers):
+ * style/UserAgentStyle.cpp:
+ (WebCore::Style::UserAgentStyle::ensureDefaultStyleSheetsForElement):
+ * style/UserAgentStyle.h:
+
2021-03-04 Chris Dumez <cdu...@apple.com>
Make RegistrableDomain() private constructor take the String as an rvalue reference
Modified: trunk/Source/WebCore/DerivedSources-input.xcfilelist (273946 => 273947)
--- trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/DerivedSources-input.xcfilelist 2021-03-05 04:48:49 UTC (rev 273947)
@@ -682,9 +682,9 @@
$(PROJECT_DIR)/css/WebKitCSSViewportRule.idl
$(PROJECT_DIR)/css/WebKitFontFamilyNames.in
$(PROJECT_DIR)/css/dialog.css
-$(PROJECT_DIR)/css/formControlsIOS.css
$(PROJECT_DIR)/css/fullscreen.css
$(PROJECT_DIR)/css/html.css
+$(PROJECT_DIR)/css/legacyFormControlsIOS.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 (273946 => 273947)
--- trunk/Source/WebCore/DerivedSources.make 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/DerivedSources.make 2021-03-05 04:48:49 UTC (rev 273947)
@@ -1526,9 +1526,9 @@
USER_AGENT_STYLE_SHEETS = \
$(WebCore)/css/dialog.css \
- $(WebCore)/css/formControlsIOS.css \
$(WebCore)/css/fullscreen.css \
$(WebCore)/css/html.css \
+ $(WebCore)/css/legacyFormControlsIOS.css \
$(WebCore)/css/mathml.css \
$(WebCore)/css/mediaControls.css \
$(WebCore)/css/plugIns.css \
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (273946 => 273947)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-03-05 04:48:49 UTC (rev 273947)
@@ -16529,7 +16529,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 /* formControlsIOS.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = formControlsIOS.css; sourceTree = "<group>"; };
+ E54CA6DD255DE2D500F901A3 /* legacyFormControlsIOS.css */ = {isa = PBXFileReference; lastKnownFileType = text.css; path = legacyFormControlsIOS.css; sourceTree = "<group>"; };
E55F4979151B888000BB67DB /* LengthFunctions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LengthFunctions.cpp; sourceTree = "<group>"; };
E57A740125CA05740050046B /* DataListButtonElement.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DataListButtonElement.cpp; sourceTree = "<group>"; };
E58B45B820AD07DD00991025 /* DataListButtonElement.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DataListButtonElement.h; sourceTree = "<group>"; };
@@ -29638,11 +29638,11 @@
C2AB0B031E6DE92C001348C5 /* FontSelectionValueInlines.h */,
1C3249101C6D6A3B007EDB32 /* FontVariantBuilder.cpp */,
C2015C091BE6FE2C00822389 /* FontVariantBuilder.h */,
- E54CA6DD255DE2D500F901A3 /* formControlsIOS.css */,
CD4E0AFA11F7BC27009D3811 /* fullscreen.css */,
93CA4C9909DF93FA00DF8677 /* html.css */,
E55F4979151B888000BB67DB /* LengthFunctions.cpp */,
E5BA7D62151437CA00FE1E3F /* LengthFunctions.h */,
+ E54CA6DD255DE2D500F901A3 /* legacyFormControlsIOS.css */,
93CA4C9A09DF93FA00DF8677 /* make-css-file-arrays.pl */,
93CA4C9B09DF93FA00DF8677 /* makeprop.pl */,
43B85ED018CBEACE00E31AF4 /* makeSelectorPseudoClassAndCompatibilityElementMap.py */,
Deleted: trunk/Source/WebCore/css/formControlsIOS.css (273946 => 273947)
--- trunk/Source/WebCore/css/formControlsIOS.css 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/css/formControlsIOS.css 2021-03-05 04:48:49 UTC (rev 273947)
@@ -1,124 +0,0 @@
-/*
- * 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
-
-/* Legacy styles for iOS form controls. */
-
-textarea,
-input {
- border: 1px solid #4c4c4c;
- font: 11px Helvetica, -webkit-pictograph;
-}
-
-input:matches([type="checkbox"], [type="radio"]) {
- border: 1px solid #4c4c4c;
-}
-
-input::-webkit-list-button {
- width: 16px;
- content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" stroke="black" fill="black" width="16" height="16"><polygon points="8 11.031, 4.5 4.969, 11.5 4.969"/></svg>');
-}
-
-input[type="search"] {
- border: 1px solid #4c4c4c;
- background-color: initial;
-}
-
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-results-decoration {
- margin: auto 0;
-}
-
-input[type="search"]::-webkit-search-results-button {
- align-self: initial;
- margin: initial;
-}
-
-input[type="search"]::-webkit-search-decoration,
-input[type="search"]::-webkit-search-results-decoration,
-input[type="search"]::-webkit-search-results-button {
- background-color: initial;
- height: initial;
- width: initial;
- -webkit-mask-image: initial;
-}
-
-input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::file-selector-button, button {
- color: ButtonText;
- border: 1px solid #4c4c4c;
- /* We want to be as close to background-color:transparent as possible without actually being transparent. */
- background-color: rgba(255, 255, 255, 0.01);
- font: 11px Helvetica;
-}
-
-input[type="submit"] {
- font-weight: initial;
-}
-
-input[type="range"]::-webkit-slider-thumb {
- background-color: white;
-}
-
-input[type="range"]::-webkit-slider-thumb:active {
- background-color: black;
-}
-
-input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-slider-thumb:active {
- box-shadow: initial;
- border: 1px solid rgb(66, 66, 66);
- padding: 0px;
-}
-
-input[type="color"]::-webkit-color-swatch-wrapper {
- border-radius: initial;
-}
-
-input[type="color"]::-webkit-color-swatch {
- border-radius: 2px;
-}
-
-input:matches([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]) {
- border: 1px solid #4c4c4c;
- font-family: Helvetica;
- color: initial;
-}
-
-input::-webkit-date-and-time-value {
- margin-right: 18px;
- text-align: inherit;
- width: initial;
-}
-
-select {
- color: initial;
- font-weight: initial;
- font: 11px Helvetica;
- border: 1px solid #4c4c4c;
- border-radius: 5px;
- /* We want to be as close to background:transparent as possible without actually being transparent */
- background-color: rgba(255, 255, 255, 0.01);
-}
-
-#endif
Copied: trunk/Source/WebCore/css/legacyFormControlsIOS.css (from rev 273946, trunk/Source/WebCore/css/formControlsIOS.css) (0 => 273947)
--- trunk/Source/WebCore/css/legacyFormControlsIOS.css (rev 0)
+++ trunk/Source/WebCore/css/legacyFormControlsIOS.css 2021-03-05 04:48:49 UTC (rev 273947)
@@ -0,0 +1,122 @@
+/*
+ * 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
+
+textarea,
+input {
+ border: 1px solid #4c4c4c;
+ font: 11px Helvetica, -webkit-pictograph;
+}
+
+input:matches([type="checkbox"], [type="radio"]) {
+ border: 1px solid #4c4c4c;
+}
+
+input::-webkit-list-button {
+ width: 16px;
+ content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" stroke="black" fill="black" width="16" height="16"><polygon points="8 11.031, 4.5 4.969, 11.5 4.969"/></svg>');
+}
+
+input[type="search"] {
+ border: 1px solid #4c4c4c;
+ background-color: initial;
+}
+
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-results-decoration {
+ margin: auto 0;
+}
+
+input[type="search"]::-webkit-search-results-button {
+ align-self: initial;
+ margin: initial;
+}
+
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-results-decoration,
+input[type="search"]::-webkit-search-results-button {
+ background-color: initial;
+ height: initial;
+ width: initial;
+ -webkit-mask-image: initial;
+}
+
+input:matches([type="button"], [type="submit"], [type="reset"]), input[type="file"]::file-selector-button, button {
+ color: ButtonText;
+ border: 1px solid #4c4c4c;
+ /* We want to be as close to background-color:transparent as possible without actually being transparent. */
+ background-color: rgba(255, 255, 255, 0.01);
+ font: 11px Helvetica;
+}
+
+input[type="submit"] {
+ font-weight: initial;
+}
+
+input[type="range"]::-webkit-slider-thumb {
+ background-color: white;
+}
+
+input[type="range"]::-webkit-slider-thumb:active {
+ background-color: black;
+}
+
+input[type="range"]::-webkit-slider-thumb, input[type="range"]::-webkit-slider-thumb:active {
+ box-shadow: initial;
+ border: 1px solid rgb(66, 66, 66);
+ padding: 0px;
+}
+
+input[type="color"]::-webkit-color-swatch-wrapper {
+ border-radius: initial;
+}
+
+input[type="color"]::-webkit-color-swatch {
+ border-radius: 2px;
+}
+
+input:matches([type="date"], [type="time"], [type="datetime-local"], [type="month"], [type="week"]) {
+ border: 1px solid #4c4c4c;
+ font-family: Helvetica;
+ color: initial;
+}
+
+input::-webkit-date-and-time-value {
+ margin-right: 18px;
+ text-align: inherit;
+ width: initial;
+}
+
+select {
+ color: initial;
+ font-weight: initial;
+ font: 11px Helvetica;
+ border: 1px solid #4c4c4c;
+ border-radius: 5px;
+ /* We want to be as close to background:transparent as possible without actually being transparent */
+ background-color: rgba(255, 255, 255, 0.01);
+}
+
+#endif
Modified: trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp (273946 => 273947)
--- trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/style/InspectorCSSOMWrappers.cpp 2021-03-05 04:48:49 UTC (rev 273947)
@@ -118,7 +118,7 @@
collectFromStyleSheetContents(UserAgentStyle::colorInputStyleSheet);
#endif
#if ENABLE(IOS_FORM_CONTROL_REFRESH)
- collectFromStyleSheetContents(UserAgentStyle::formControlsIOSStyleSheet);
+ collectFromStyleSheetContents(UserAgentStyle::legacyFormControlsIOSStyleSheet);
#endif
collectFromStyleSheetContents(UserAgentStyle::plugInsStyleSheet);
collectFromStyleSheetContents(UserAgentStyle::mediaQueryStyleSheet);
Modified: trunk/Source/WebCore/style/UserAgentStyle.cpp (273946 => 273947)
--- trunk/Source/WebCore/style/UserAgentStyle.cpp 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/style/UserAgentStyle.cpp 2021-03-05 04:48:49 UTC (rev 273947)
@@ -83,7 +83,7 @@
StyleSheetContents* UserAgentStyle::colorInputStyleSheet;
#endif
#if ENABLE(IOS_FORM_CONTROL_REFRESH)
-StyleSheetContents* UserAgentStyle::formControlsIOSStyleSheet;
+StyleSheetContents* UserAgentStyle::legacyFormControlsIOSStyleSheet;
#endif
static const MediaQueryEvaluator& screenEval()
@@ -227,9 +227,9 @@
#endif // ENABLE(FULLSCREEN_API)
#if ENABLE(IOS_FORM_CONTROL_REFRESH)
- if (!formControlsIOSStyleSheet && !element.document().settings().iOSFormControlRefreshEnabled()) {
- formControlsIOSStyleSheet = parseUASheet(formControlsIOSUserAgentStyleSheet, sizeof(formControlsIOSUserAgentStyleSheet));
- addToDefaultStyle(*formControlsIOSStyleSheet);
+ if (!legacyFormControlsIOSStyleSheet && !element.document().settings().iOSFormControlRefreshEnabled()) {
+ legacyFormControlsIOSStyleSheet = parseUASheet(legacyFormControlsIOSUserAgentStyleSheet, sizeof(legacyFormControlsIOSUserAgentStyleSheet));
+ addToDefaultStyle(*legacyFormControlsIOSStyleSheet);
}
#endif
Modified: trunk/Source/WebCore/style/UserAgentStyle.h (273946 => 273947)
--- trunk/Source/WebCore/style/UserAgentStyle.h 2021-03-05 04:41:06 UTC (rev 273946)
+++ trunk/Source/WebCore/style/UserAgentStyle.h 2021-03-05 04:48:49 UTC (rev 273947)
@@ -53,7 +53,7 @@
static StyleSheetContents* colorInputStyleSheet;
#endif
#if ENABLE(IOS_FORM_CONTROL_REFRESH)
- static StyleSheetContents* formControlsIOSStyleSheet;
+ static StyleSheetContents* legacyFormControlsIOSStyleSheet;
#endif
static StyleSheetContents* mediaQueryStyleSheet;