Diff
Modified: trunk/Source/WebCore/ChangeLog (272096 => 272097)
--- trunk/Source/WebCore/ChangeLog 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/ChangeLog 2021-01-30 03:10:02 UTC (rev 272097)
@@ -1,3 +1,140 @@
+2021-01-29 Simon Fraser <[email protected]>
+
+ Devirtualize some functions on InputType
+ https://bugs.webkit.org/show_bug.cgi?id=221121
+
+ Reviewed by Yusuke Suzuki .
+
+ Virtual functions on InputType show up in Speedometer profiles. We can make
+ many of these virtual functions non-virtual by just switching on the input type.
+
+ * dom/Element.cpp:
+ * html/BaseCheckableInputType.cpp:
+ (WebCore::BaseCheckableInputType::isCheckable): Deleted.
+ * html/BaseCheckableInputType.h:
+ * html/BaseTextInputType.cpp:
+ (WebCore::BaseTextInputType::isTextType const): Deleted.
+ * html/BaseTextInputType.h:
+ * html/ButtonInputType.cpp:
+ (WebCore::ButtonInputType::isTextButton const): Deleted.
+ * html/ButtonInputType.h:
+ * html/CheckboxInputType.cpp:
+ (WebCore::CheckboxInputType::isCheckbox const): Deleted.
+ * html/CheckboxInputType.h:
+ * html/ColorInputType.cpp:
+ (WebCore::ColorInputType::isColorControl const): Deleted.
+ * html/ColorInputType.h:
+ * html/DateInputType.cpp:
+ (WebCore::DateInputType::isDateField const): Deleted.
+ * html/DateInputType.h:
+ * html/DateTimeLocalInputType.cpp:
+ (WebCore::DateTimeLocalInputType::isDateTimeLocalField const): Deleted.
+ * html/DateTimeLocalInputType.h:
+ * html/EmailInputType.cpp:
+ (WebCore::EmailInputType::isEmailField const): Deleted.
+ * html/EmailInputType.h:
+ * html/FileInputType.cpp:
+ (WebCore::FileInputType::isFileUpload const): Deleted.
+ * html/FileInputType.h:
+ * html/FormAssociatedElement.h:
+ * html/HTMLFormControlElement.h:
+ * html/HiddenInputType.cpp:
+ (WebCore::HiddenInputType::isHiddenType const): Deleted.
+ * html/HiddenInputType.h:
+ * html/ImageInputType.cpp:
+ (WebCore::ImageInputType::isImageButton const): Deleted.
+ (WebCore::ImageInputType::isEnumeratable): Deleted.
+ * html/ImageInputType.h:
+ * html/InputType.cpp:
+ (WebCore::InputType::isTextType const):
+ (WebCore::InputType::isTextField const):
+ (WebCore::InputType::isTextButton const):
+ (WebCore::InputType::isInteractiveContent const):
+ (WebCore::InputType::supportLabels const):
+ (WebCore::InputType::isEnumeratable):
+ (WebCore::InputType::isCheckable):
+ (WebCore::InputType::isRangeControl const): Deleted.
+ (WebCore::InputType::isRadioButton const): Deleted.
+ (WebCore::InputType::isSearchField const): Deleted.
+ (WebCore::InputType::isHiddenType const): Deleted.
+ (WebCore::InputType::isPasswordField const): Deleted.
+ (WebCore::InputType::isCheckbox const): Deleted.
+ (WebCore::InputType::isEmailField const): Deleted.
+ (WebCore::InputType::isFileUpload const): Deleted.
+ (WebCore::InputType::isImageButton const): Deleted.
+ (WebCore::InputType::isNumberField const): Deleted.
+ (WebCore::InputType::isSubmitButton const): Deleted.
+ (WebCore::InputType::isTelephoneField const): Deleted.
+ (WebCore::InputType::isURLField const): Deleted.
+ (WebCore::InputType::isDateField const): Deleted.
+ (WebCore::InputType::isDateTimeField const): Deleted.
+ (WebCore::InputType::isDateTimeLocalField const): Deleted.
+ (WebCore::InputType::isMonthField const): Deleted.
+ (WebCore::InputType::isTimeField const): Deleted.
+ (WebCore::InputType::isWeekField const): Deleted.
+ (WebCore::InputType::isColorControl const): Deleted.
+ * html/InputType.h:
+ (WebCore::InputType::isCheckbox const):
+ (WebCore::InputType::isColorControl const):
+ (WebCore::InputType::isDateField const):
+ (WebCore::InputType::isDateTimeField const):
+ (WebCore::InputType::isDateTimeLocalField const):
+ (WebCore::InputType::isEmailField const):
+ (WebCore::InputType::isFileUpload const):
+ (WebCore::InputType::isHiddenType const):
+ (WebCore::InputType::isImageButton const):
+ (WebCore::InputType::isMonthField const):
+ (WebCore::InputType::isNumberField const):
+ (WebCore::InputType::isPasswordField const):
+ (WebCore::InputType::isRadioButton const):
+ (WebCore::InputType::isRangeControl const):
+ (WebCore::InputType::isSearchField const):
+ (WebCore::InputType::isSubmitButton const):
+ (WebCore::InputType::isTelephoneField const):
+ (WebCore::InputType::isTimeField const):
+ (WebCore::InputType::isURLField const):
+ (WebCore::InputType::isWeekField const):
+ * html/MonthInputType.cpp:
+ (WebCore::MonthInputType::isMonthField const): Deleted.
+ * html/MonthInputType.h:
+ * html/NumberInputType.cpp:
+ (WebCore::NumberInputType::isNumberField const): Deleted.
+ * html/NumberInputType.h:
+ * html/PasswordInputType.cpp:
+ (WebCore::PasswordInputType::isPasswordField const): Deleted.
+ * html/PasswordInputType.h:
+ * html/RadioInputType.cpp:
+ (WebCore::RadioInputType::isRadioButton const): Deleted.
+ * html/RadioInputType.h:
+ * html/RangeInputType.cpp:
+ (WebCore::RangeInputType::isRangeControl const): Deleted.
+ * html/RangeInputType.h:
+ * html/ResetInputType.cpp:
+ (WebCore::ResetInputType::isTextButton const): Deleted.
+ * html/ResetInputType.h:
+ * html/SearchInputType.cpp:
+ (WebCore::SearchInputType::isSearchField const): Deleted.
+ * html/SearchInputType.h:
+ * html/SubmitInputType.cpp:
+ (WebCore::SubmitInputType::isSubmitButton const): Deleted.
+ (WebCore::SubmitInputType::isTextButton const): Deleted.
+ * html/SubmitInputType.h:
+ * html/TelephoneInputType.cpp:
+ (WebCore::TelephoneInputType::isTelephoneField const): Deleted.
+ * html/TelephoneInputType.h:
+ * html/TextFieldInputType.cpp:
+ (WebCore::TextFieldInputType::isTextField const): Deleted.
+ * html/TextFieldInputType.h:
+ * html/TimeInputType.cpp:
+ (WebCore::TimeInputType::isTimeField const): Deleted.
+ * html/TimeInputType.h:
+ * html/URLInputType.cpp:
+ (WebCore::URLInputType::isURLField const): Deleted.
+ * html/URLInputType.h:
+ * html/WeekInputType.cpp:
+ (WebCore::WeekInputType::isWeekField const): Deleted.
+ * html/WeekInputType.h:
+
2021-01-29 Megan Gardner <[email protected]>
Add plumbing to allow AppHighlights to be restored.
Modified: trunk/Source/WebCore/dom/Element.cpp (272096 => 272097)
--- trunk/Source/WebCore/dom/Element.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/dom/Element.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -3220,7 +3220,6 @@
return { };
}
-
ExceptionOr<void> Element::setInnerHTML(const String& html)
{
auto fragment = createFragmentForInnerOuterHTML(*this, html, AllowScriptingContent);
Modified: trunk/Source/WebCore/html/BaseCheckableInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/BaseCheckableInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/BaseCheckableInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -114,11 +114,6 @@
element()->setAttributeWithoutSynchronization(valueAttr, sanitizedValue);
}
-bool BaseCheckableInputType::isCheckable()
-{
- return true;
-}
-
void BaseCheckableInputType::fireInputAndChangeEvents()
{
if (!element()->isConnected())
Modified: trunk/Source/WebCore/html/BaseCheckableInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/BaseCheckableInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/BaseCheckableInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -51,7 +51,6 @@
String fallbackValue() const override;
bool storesValueSeparateFromAttribute() override;
void setValue(const String&, bool, TextFieldEventBehavior) override;
- bool isCheckable() override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/BaseDateAndTimeInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/BaseDateAndTimeInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/BaseDateAndTimeInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -167,11 +167,6 @@
return Decimal::fromDouble(ms + (offset * msPerMinute));
}
-bool BaseDateAndTimeInputType::isSteppableSlow() const
-{
- return true;
-}
-
Decimal BaseDateAndTimeInputType::parseToNumber(const String& source, const Decimal& defaultValue) const
{
auto date = parseToDateComponents(source);
Modified: trunk/Source/WebCore/html/BaseDateAndTimeInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/BaseDateAndTimeInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/BaseDateAndTimeInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -100,7 +100,6 @@
double valueAsDouble() const final;
ExceptionOr<void> setValueAsDecimal(const Decimal&, TextFieldEventBehavior) const final;
Decimal defaultValueForStepUp() const override;
- bool isSteppableSlow() const final;
String localizeValue(const String&) const final;
bool supportsReadOnly() const final;
bool shouldRespectListAttribute() final;
Modified: trunk/Source/WebCore/html/BaseTextInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/BaseTextInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/BaseTextInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -33,11 +33,6 @@
using namespace HTMLNames;
-bool BaseTextInputType::isTextType() const
-{
- return true;
-}
-
bool BaseTextInputType::patternMismatch(const String& value) const
{
ASSERT(element());
Modified: trunk/Source/WebCore/html/BaseTextInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/BaseTextInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/BaseTextInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -40,7 +40,6 @@
protected:
explicit BaseTextInputType(Type type, HTMLInputElement& element) : TextFieldInputType(type, element) { }
- bool isTextType() const override;
bool patternMismatch(const String&) const override;
bool supportsPlaceholder() const override;
bool supportsSelectionAPI() const override;
Modified: trunk/Source/WebCore/html/ButtonInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/ButtonInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ButtonInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -45,9 +45,4 @@
return false;
}
-bool ButtonInputType::isTextButton() const
-{
- return true;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/html/ButtonInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/ButtonInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ButtonInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -42,7 +42,6 @@
private:
const AtomString& formControlType() const override;
bool supportsValidation() const override;
- bool isTextButton() const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/CheckboxInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/CheckboxInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/CheckboxInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -92,11 +92,6 @@
event.setDefaultHandled();
}
-bool CheckboxInputType::isCheckbox() const
-{
- return true;
-}
-
bool CheckboxInputType::matchesIndeterminatePseudoClass() const
{
return shouldAppearIndeterminate();
Modified: trunk/Source/WebCore/html/CheckboxInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/CheckboxInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/CheckboxInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -46,7 +46,6 @@
void handleKeyupEvent(KeyboardEvent&) final;
void willDispatchClick(InputElementClickState&) final;
void didDispatchClick(Event&, const InputElementClickState&) final;
- bool isCheckbox() const final;
bool matchesIndeterminatePseudoClass() const final;
bool shouldAppearIndeterminate() const final;
};
Modified: trunk/Source/WebCore/html/ColorInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/ColorInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ColorInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -100,11 +100,6 @@
#endif
}
-bool ColorInputType::isColorControl() const
-{
- return true;
-}
-
bool ColorInputType::isPresentingAttachedView() const
{
return !!m_chooser;
Modified: trunk/Source/WebCore/html/ColorInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/ColorInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ColorInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -52,7 +52,6 @@
Vector<Color> suggestedColors() const final;
bool isMouseFocusable() const final;
bool isKeyboardFocusable(KeyboardEvent*) const final;
- bool isColorControl() const final;
bool isPresentingAttachedView() const final;
const AtomString& formControlType() const final;
bool supportsRequired() const final;
Modified: trunk/Source/WebCore/html/DateInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/DateInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/DateInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -84,11 +84,6 @@
return DateComponents::fromMillisecondsSinceEpochForDate(value);
}
-bool DateInputType::isDateField() const
-{
- return true;
-}
-
bool DateInputType::isValidFormat(OptionSet<DateTimeFormatValidationResults> results) const
{
return results.containsAll({ DateTimeFormatValidationResults::HasYear, DateTimeFormatValidationResults::HasMonth, DateTimeFormatValidationResults::HasDay });
Modified: trunk/Source/WebCore/html/DateInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/DateInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/DateInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -47,7 +47,6 @@
StepRange createStepRange(AnyStepHandling) const override;
Optional<DateComponents> parseToDateComponents(const StringView&) const override;
Optional<DateComponents> setMillisecondToDateComponents(double) const override;
- bool isDateField() const override;
bool isValidFormat(OptionSet<DateTimeFormatValidationResults>) const final;
String formatDateTimeFieldsState(const DateTimeFieldsState&) const final;
Modified: trunk/Source/WebCore/html/DateTimeLocalInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/DateTimeLocalInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/DateTimeLocalInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -93,11 +93,6 @@
return DateComponents::fromMillisecondsSinceEpochForDateTimeLocal(value);
}
-bool DateTimeLocalInputType::isDateTimeLocalField() const
-{
- return true;
-}
-
bool DateTimeLocalInputType::isValidFormat(OptionSet<DateTimeFormatValidationResults> results) const
{
return results.containsAll({ DateTimeFormatValidationResults::HasYear, DateTimeFormatValidationResults::HasMonth, DateTimeFormatValidationResults::HasDay, DateTimeFormatValidationResults::HasHour, DateTimeFormatValidationResults::HasMinute, DateTimeFormatValidationResults::HasMeridiem });
Modified: trunk/Source/WebCore/html/DateTimeLocalInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/DateTimeLocalInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/DateTimeLocalInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -52,7 +52,6 @@
StepRange createStepRange(AnyStepHandling) const final;
Optional<DateComponents> parseToDateComponents(const StringView&) const final;
Optional<DateComponents> setMillisecondToDateComponents(double) const final;
- bool isDateTimeLocalField() const final;
bool isValidFormat(OptionSet<DateTimeFormatValidationResults>) const final;
String formatDateTimeFieldsState(const DateTimeFieldsState&) const final;
Modified: trunk/Source/WebCore/html/EmailInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/EmailInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/EmailInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -83,11 +83,6 @@
return element()->multiple() ? validationMessageTypeMismatchForMultipleEmailText() : validationMessageTypeMismatchForEmailText();
}
-bool EmailInputType::isEmailField() const
-{
- return true;
-}
-
bool EmailInputType::supportsSelectionAPI() const
{
return false;
Modified: trunk/Source/WebCore/html/EmailInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/EmailInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/EmailInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -44,7 +44,6 @@
bool typeMismatchFor(const String&) const override;
bool typeMismatch() const override;
String typeMismatchText() const override;
- bool isEmailField() const override;
bool supportsSelectionAPI() const override;
String sanitizeValue(const String&) const override;
};
Modified: trunk/Source/WebCore/html/FileInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/FileInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/FileInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -273,11 +273,6 @@
element()->invalidateStyleForSubtree();
}
-bool FileInputType::isFileUpload() const
-{
- return true;
-}
-
void FileInputType::createShadowSubtreeAndUpdateInnerTextElementEditability(ContainerNode::ChildChange::Source source, bool)
{
ASSERT(element());
Modified: trunk/Source/WebCore/html/FileInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/FileInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/FileInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -77,7 +77,6 @@
#endif
Icon* icon() const final;
- bool isFileUpload() const final;
void createShadowSubtreeAndUpdateInnerTextElementEditability(ContainerNode::ChildChange::Source, bool) final;
void disabledStateChanged() final;
void attributeChanged(const QualifiedName&) final;
Modified: trunk/Source/WebCore/html/FormAssociatedElement.h (272096 => 272097)
--- trunk/Source/WebCore/html/FormAssociatedElement.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/FormAssociatedElement.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -110,6 +110,7 @@
String customValidationMessage() const;
private:
+ // "willValidate" means "is a candidate for constraint validation".
virtual bool willValidate() const = 0;
virtual void refFormAssociatedElement() = 0;
virtual void derefFormAssociatedElement() = 0;
Modified: trunk/Source/WebCore/html/HTMLFormControlElement.h (272096 => 272097)
--- trunk/Source/WebCore/html/HTMLFormControlElement.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/HTMLFormControlElement.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -99,6 +99,7 @@
WEBCORE_EXPORT AutocapitalizeType autocapitalizeType() const final;
#endif
+ // "willValidate" means "is a candidate for constraint validation".
WEBCORE_EXPORT bool willValidate() const final;
void updateVisibleValidationMessage();
void hideVisibleValidationMessage();
Modified: trunk/Source/WebCore/html/HiddenInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/HiddenInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/HiddenInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -94,11 +94,6 @@
element()->setAttributeWithoutSynchronization(valueAttr, sanitizedValue);
}
-bool HiddenInputType::isHiddenType() const
-{
- return true;
-}
-
bool HiddenInputType::appendFormData(DOMFormData& formData, bool isMultipartForm) const
{
ASSERT(element());
Modified: trunk/Source/WebCore/html/HiddenInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/HiddenInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/HiddenInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -48,9 +48,6 @@
bool accessKeyAction(bool sendMouseEvents) override;
bool rendererIsNeeded() override;
bool storesValueSeparateFromAttribute() override;
- bool isHiddenType() const override;
- bool supportLabels() const override { return false; }
- bool isInteractiveContent() const final { return false; }
bool shouldRespectHeightAndWidthAttributes() override;
void setValue(const String&, bool, TextFieldEventBehavior) override;
bool appendFormData(DOMFormData&, bool) const override;
Modified: trunk/Source/WebCore/html/ImageInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/ImageInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ImageInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -171,16 +171,6 @@
return true;
}
-bool ImageInputType::isImageButton() const
-{
- return true;
-}
-
-bool ImageInputType::isEnumeratable()
-{
- return false;
-}
-
bool ImageInputType::shouldRespectHeightAndWidthAttributes()
{
return true;
Modified: trunk/Source/WebCore/html/ImageInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/ImageInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ImageInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -53,8 +53,6 @@
void attach() final;
bool shouldRespectAlignAttribute() final;
bool canBeSuccessfulSubmitButton() final;
- bool isImageButton() const final;
- bool isEnumeratable() final;
bool shouldRespectHeightAndWidthAttributes() final;
unsigned height() const final;
unsigned width() const final;
Modified: trunk/Source/WebCore/html/InputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/InputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/InputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -166,21 +166,6 @@
return RenderTheme::singleton().supportsDataListUI(type->formControlType());
}
-bool InputType::isTextField() const
-{
- return false;
-}
-
-bool InputType::isTextType() const
-{
- return false;
-}
-
-bool InputType::isRangeControl() const
-{
- return false;
-}
-
bool InputType::shouldSaveAndRestoreFormControlState() const
{
return true;
@@ -816,145 +801,21 @@
return false;
}
-bool InputType::isTextButton() const
-{
- return false;
-}
-
-bool InputType::isRadioButton() const
-{
- return false;
-}
-
-bool InputType::isSearchField() const
-{
- return false;
-}
-
-bool InputType::isHiddenType() const
-{
- return false;
-}
-
-bool InputType::isPasswordField() const
-{
- return false;
-}
-
-bool InputType::isCheckbox() const
-{
- return false;
-}
-
-bool InputType::isEmailField() const
-{
- return false;
-}
-
-bool InputType::isFileUpload() const
-{
- return false;
-}
-
-bool InputType::isImageButton() const
-{
- return false;
-}
-
bool InputType::isInteractiveContent() const
{
- return true;
+ return m_type != Type::Hidden;
}
bool InputType::supportLabels() const
{
- return true;
+ return m_type != Type::Hidden;
}
-bool InputType::isNumberField() const
+bool InputType::isEnumeratable() const
{
- return false;
+ return m_type != Type::Image;
}
-bool InputType::isSubmitButton() const
-{
- return false;
-}
-
-bool InputType::isTelephoneField() const
-{
- return false;
-}
-
-bool InputType::isURLField() const
-{
- return false;
-}
-
-bool InputType::isDateField() const
-{
- return false;
-}
-
-bool InputType::isDateTimeField() const
-{
- return false;
-}
-
-bool InputType::isDateTimeLocalField() const
-{
- return false;
-}
-
-bool InputType::isMonthField() const
-{
- return false;
-}
-
-bool InputType::isTimeField() const
-{
- return false;
-}
-
-bool InputType::isWeekField() const
-{
- return false;
-}
-
-bool InputType::isEnumeratable()
-{
- return true;
-}
-
-bool InputType::isCheckable()
-{
- return false;
-}
-
-// Do not use virtual function for performance reason.
-bool InputType::isSteppable() const
-{
- switch (m_type) {
- case Type::Date:
- case Type::DateTimeLocal:
- case Type::Month:
- case Type::Time:
- case Type::Week:
- case Type::Number:
- case Type::Range:
- ASSERT(isSteppableSlow());
- return true;
- default:
- ASSERT(!isSteppableSlow());
- return false;
- }
-}
-
-bool InputType::isColorControl() const
-{
- return false;
-}
-
bool InputType::shouldRespectHeightAndWidthAttributes()
{
return false;
Modified: trunk/Source/WebCore/html/InputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/InputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/InputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -37,6 +37,7 @@
#include "RenderPtr.h"
#include <wtf/FastMalloc.h>
#include <wtf/Forward.h>
+#include <wtf/OptionSet.h>
#include <wtf/RefCounted.h>
#include <wtf/RefPtr.h>
@@ -71,31 +72,71 @@
class InputType : public RefCounted<InputType> {
WTF_MAKE_FAST_ALLOCATED;
public:
- enum class Type : uint8_t {
- Button,
- Checkbox,
- Color,
- Date,
- DateTimeLocal,
- Email,
- File,
- Hidden,
- Image,
- Month,
- Number,
- Password,
- Radio,
- Range,
- Reset,
- Search,
- Submit,
- Telephone,
- Time,
- URL,
- Week,
- Text,
+ enum class Type : uint32_t {
+ Button = 1 << 0,
+ Checkbox = 1 << 1,
+ Color = 1 << 2,
+ Date = 1 << 3,
+ DateTimeLocal = 1 << 4,
+ Email = 1 << 5,
+ File = 1 << 6,
+ Hidden = 1 << 7,
+ Image = 1 << 8,
+ Month = 1 << 9,
+ Number = 1 << 10,
+ Password = 1 << 11,
+ Radio = 1 << 12,
+ Range = 1 << 13,
+ Reset = 1 << 14,
+ Search = 1 << 15,
+ Submit = 1 << 16,
+ Telephone = 1 << 17,
+ Time = 1 << 18,
+ URL = 1 << 19,
+ Week = 1 << 20,
+ Text = 1 << 21,
};
+
+ static constexpr OptionSet<Type> textTypes = {
+ Type::Email,
+ Type::Password,
+ Type::Search,
+ Type::Telephone,
+ Type::Text,
+ Type::URL,
+ };
+ static constexpr OptionSet<Type> textFieldTypes = {
+ Type::Email,
+ Type::Number,
+ Type::Password,
+ Type::Search,
+ Type::Telephone,
+ Type::Text,
+ Type::URL,
+ };
+
+ static constexpr OptionSet<Type> textButtonTypes = {
+ Type::Button,
+ Type::Reset,
+ Type::Submit,
+ };
+
+ static constexpr OptionSet<Type> checkableTypes = {
+ Type::Checkbox,
+ Type::Radio,
+ };
+
+ static constexpr OptionSet<Type> steppableTypes = {
+ Type::Date,
+ Type::DateTimeLocal,
+ Type::Month,
+ Type::Time,
+ Type::Week,
+ Type::Number,
+ Type::Range,
+ };
+
static Ref<InputType> create(HTMLInputElement&, const AtomString&);
static Ref<InputType> createText(HTMLInputElement&);
virtual ~InputType();
@@ -115,32 +156,37 @@
// inflexible because it's harder to add new input types if there is
// scattered code with special cases for various types.
- virtual bool isCheckbox() const;
- virtual bool isColorControl() const;
- virtual bool isDateField() const;
- virtual bool isDateTimeField() const;
- virtual bool isDateTimeLocalField() const;
- virtual bool isEmailField() const;
- virtual bool isFileUpload() const;
- virtual bool isHiddenType() const;
- virtual bool isImageButton() const;
- virtual bool isInteractiveContent() const;
- virtual bool supportLabels() const;
- virtual bool isMonthField() const;
- virtual bool isNumberField() const;
- virtual bool isPasswordField() const;
- virtual bool isRadioButton() const;
- virtual bool isRangeControl() const;
- virtual bool isSearchField() const;
- virtual bool isSubmitButton() const;
- virtual bool isTelephoneField() const;
- virtual bool isTextButton() const;
- virtual bool isTextField() const;
- virtual bool isTextType() const;
- virtual bool isTimeField() const;
- virtual bool isURLField() const;
- virtual bool isWeekField() const;
+ bool isCheckbox() const { return m_type == Type::Checkbox; }
+ bool isColorControl() const { return m_type == Type::Color; }
+ bool isDateField() const { return m_type == Type::Date; }
+ bool isDateTimeLocalField() const { return m_type == Type::DateTimeLocal; }
+ bool isEmailField() const { return m_type == Type::Email; }
+ bool isFileUpload() const { return m_type == Type::File; }
+ bool isHiddenType() const { return m_type == Type::Hidden; }
+ bool isImageButton() const { return m_type == Type::Image; }
+ bool isMonthField() const { return m_type == Type::Month; }
+ bool isNumberField() const { return m_type == Type::Number; }
+ bool isPasswordField() const { return m_type == Type::Password; }
+ bool isRadioButton() const { return m_type == Type::Radio; }
+ bool isRangeControl() const { return m_type == Type::Range; }
+ bool isSearchField() const { return m_type == Type::Search; }
+ bool isSubmitButton() const { return m_type == Type::Submit; }
+ bool isTelephoneField() const { return m_type == Type::Telephone; }
+ bool isTimeField() const { return m_type == Type::Time; }
+ bool isURLField() const { return m_type == Type::URL; }
+ bool isWeekField() const { return m_type == Type::Week; }
+ bool isTextButton() const { return textButtonTypes.contains(m_type); }
+ bool isTextField() const { return textFieldTypes.contains(m_type); }
+ bool isTextType() const { return textTypes.contains(m_type); }
+
+ bool isCheckable() const { return checkableTypes.contains(m_type); }
+ bool isSteppable() const { return steppableTypes.contains(m_type); }
+
+ bool isInteractiveContent() const;
+ bool supportLabels() const;
+ bool isEnumeratable() const;
+
// Form value functions.
virtual bool shouldSaveAndRestoreFormControlState() const;
@@ -276,8 +322,6 @@
virtual void setValue(const String&, bool valueChanged, TextFieldEventBehavior);
virtual bool shouldResetOnDocumentActivation();
virtual bool shouldRespectListAttribute();
- virtual bool isEnumeratable();
- virtual bool isCheckable();
virtual bool shouldRespectHeightAndWidthAttributes();
virtual bool supportsPlaceholder() const;
virtual bool supportsReadOnly() const;
@@ -298,8 +342,6 @@
virtual void selectColor(StringView);
virtual Vector<Color> suggestedColors() const;
- bool isSteppable() const;
-
// Parses the specified string for the type, and return
// the Decimal value for the parsing result if the parsing
// succeeds; Returns defaultValue otherwise. This function can
@@ -340,7 +382,6 @@
HTMLInputElement* element() const { return m_element.get(); }
Chrome* chrome() const;
Decimal parseToNumberOrNaN(const String&) const;
- virtual bool isSteppableSlow() const { return false; }
private:
// Helper for stepUp()/stepDown(). Adds step value * count to the current value.
Modified: trunk/Source/WebCore/html/MonthInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/MonthInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/MonthInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -127,11 +127,6 @@
return DateComponents::fromMonthsSinceEpoch(value);
}
-bool MonthInputType::isMonthField() const
-{
- return true;
-}
-
void MonthInputType::handleDOMActivateEvent(Event&)
{
}
Modified: trunk/Source/WebCore/html/MonthInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/MonthInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/MonthInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -54,7 +54,6 @@
StepRange createStepRange(AnyStepHandling) const override;
Optional<DateComponents> parseToDateComponents(const StringView&) const override;
Optional<DateComponents> setMillisecondToDateComponents(double) const override;
- bool isMonthField() const override;
void handleDOMActivateEvent(Event&) override;
bool isValidFormat(OptionSet<DateTimeFormatValidationResults>) const final;
Modified: trunk/Source/WebCore/html/NumberInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/NumberInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/NumberInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -210,11 +210,6 @@
return width;
}
-bool NumberInputType::isSteppableSlow() const
-{
- return true;
-}
-
auto NumberInputType::handleKeydownEvent(KeyboardEvent& event) -> ShouldCallBaseEventHandler
{
handleKeydownEventForSpinButton(event);
@@ -292,11 +287,6 @@
return true;
}
-bool NumberInputType::isNumberField() const
-{
- return true;
-}
-
void NumberInputType::attributeChanged(const QualifiedName& name)
{
ASSERT(element());
Modified: trunk/Source/WebCore/html/NumberInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/NumberInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/NumberInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -50,7 +50,6 @@
bool typeMismatch() const final;
bool sizeShouldIncludeDecoration(int defaultSize, int& preferredSize) const final;
float decorationWidth() const final;
- bool isSteppableSlow() const final;
StepRange createStepRange(AnyStepHandling) const final;
ShouldCallBaseEventHandler handleKeydownEvent(KeyboardEvent&) final;
Decimal parseToNumber(const String&, const Decimal&) const final;
@@ -62,7 +61,6 @@
bool hasBadInput() const final;
String badInputText() const final;
bool supportsPlaceholder() const final;
- bool isNumberField() const final;
void attributeChanged(const QualifiedName&) final;
};
Modified: trunk/Source/WebCore/html/PasswordInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/PasswordInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/PasswordInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -86,9 +86,4 @@
return false;
}
-bool PasswordInputType::isPasswordField() const
-{
- return true;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/html/PasswordInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/PasswordInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/PasswordInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -47,7 +47,6 @@
bool shouldUseInputMethod() const override;
bool shouldResetOnDocumentActivation() override;
bool shouldRespectListAttribute() override;
- bool isPasswordField() const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/RadioInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/RadioInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/RadioInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -180,11 +180,6 @@
event.setDefaultHandled();
}
-bool RadioInputType::isRadioButton() const
-{
- return true;
-}
-
bool RadioInputType::matchesIndeterminatePseudoClass() const
{
ASSERT(element());
Modified: trunk/Source/WebCore/html/RadioInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/RadioInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/RadioInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -51,7 +51,6 @@
bool shouldSendChangeEventAfterCheckedChanged() final;
void willDispatchClick(InputElementClickState&) final;
void didDispatchClick(Event&, const InputElementClickState&) final;
- bool isRadioButton() const final;
bool matchesIndeterminatePseudoClass() const final;
};
Modified: trunk/Source/WebCore/html/RangeInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/RangeInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/RangeInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -84,11 +84,6 @@
{
}
-bool RangeInputType::isRangeControl() const
-{
- return true;
-}
-
const AtomString& RangeInputType::formControlType() const
{
return InputTypeNames::range();
@@ -133,11 +128,6 @@
return StepRange(minimum, RangeLimitations::Valid, minimum, maximum, step, rangeStepDescription);
}
-bool RangeInputType::isSteppableSlow() const
-{
- return true;
-}
-
void RangeInputType::handleMouseDownEvent(MouseEvent& event)
{
ASSERT(element());
Modified: trunk/Source/WebCore/html/RangeInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/RangeInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/RangeInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -43,7 +43,6 @@
explicit RangeInputType(HTMLInputElement&);
private:
- bool isRangeControl() const final;
const AtomString& formControlType() const final;
double valueAsDouble() const final;
ExceptionOr<void> setValueAsDecimal(const Decimal&, TextFieldEventBehavior) const final;
@@ -50,7 +49,6 @@
bool typeMismatchFor(const String&) const final;
bool supportsRequired() const final;
StepRange createStepRange(AnyStepHandling) const final;
- bool isSteppableSlow() const final;
void handleMouseDownEvent(MouseEvent&) final;
ShouldCallBaseEventHandler handleKeydownEvent(KeyboardEvent&) final;
RenderPtr<RenderElement> createInputRenderer(RenderStyle&&) final;
Modified: trunk/Source/WebCore/html/ResetInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/ResetInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ResetInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -64,9 +64,4 @@
return resetButtonDefaultLabel();
}
-bool ResetInputType::isTextButton() const
-{
- return true;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/html/ResetInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/ResetInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/ResetInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -44,7 +44,6 @@
bool supportsValidation() const override;
void handleDOMActivateEvent(Event&) override;
String defaultValue() const override;
- bool isTextButton() const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/SearchInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/SearchInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/SearchInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -97,11 +97,6 @@
return InputTypeNames::search();
}
-bool SearchInputType::isSearchField() const
-{
- return true;
-}
-
bool SearchInputType::needsContainer() const
{
return true;
Modified: trunk/Source/WebCore/html/SearchInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/SearchInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/SearchInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -50,7 +50,6 @@
void attributeChanged(const QualifiedName&) final;
RenderPtr<RenderElement> createInputRenderer(RenderStyle&&) final;
const AtomString& formControlType() const final;
- bool isSearchField() const final;
bool needsContainer() const final;
void createShadowSubtreeAndUpdateInnerTextElementEditability(ContainerNode::ChildChange::Source, bool) final;
void destroyShadowSubtree() final;
Modified: trunk/Source/WebCore/html/SubmitInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/SubmitInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/SubmitInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -90,14 +90,4 @@
return submitButtonDefaultLabel();
}
-bool SubmitInputType::isSubmitButton() const
-{
- return true;
-}
-
-bool SubmitInputType::isTextButton() const
-{
- return true;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/html/SubmitInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/SubmitInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/SubmitInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -46,8 +46,6 @@
void handleDOMActivateEvent(Event&) override;
bool canBeSuccessfulSubmitButton() override;
String defaultValue() const override;
- bool isSubmitButton() const override;
- bool isTextButton() const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/TelephoneInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/TelephoneInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/TelephoneInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -41,9 +41,4 @@
return InputTypeNames::telephone();
}
-bool TelephoneInputType::isTelephoneField() const
-{
- return true;
-}
-
} // namespace WebCore
Modified: trunk/Source/WebCore/html/TelephoneInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/TelephoneInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/TelephoneInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -41,7 +41,6 @@
private:
const AtomString& formControlType() const override;
- bool isTelephoneField() const override;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/TextFieldInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/TextFieldInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/TextFieldInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -101,11 +101,6 @@
return element()->isTextFormControlFocusable();
}
-bool TextFieldInputType::isTextField() const
-{
- return true;
-}
-
bool TextFieldInputType::isEmptyValue() const
{
auto innerText = innerTextElement();
Modified: trunk/Source/WebCore/html/TextFieldInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/TextFieldInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/TextFieldInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -89,7 +89,6 @@
private:
bool isKeyboardFocusable(KeyboardEvent*) const final;
bool isMouseFocusable() const final;
- bool isTextField() const final;
bool isEmptyValue() const final;
void handleBeforeTextInsertedEvent(BeforeTextInsertedEvent&) final;
void forwardEvent(Event&) final;
Modified: trunk/Source/WebCore/html/TimeInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/TimeInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/TimeInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -102,11 +102,6 @@
return DateComponents::fromMillisecondsSinceMidnight(value);
}
-bool TimeInputType::isTimeField() const
-{
- return true;
-}
-
void TimeInputType::handleDOMActivateEvent(Event&)
{
}
Modified: trunk/Source/WebCore/html/TimeInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/TimeInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/TimeInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -48,7 +48,6 @@
StepRange createStepRange(AnyStepHandling) const override;
Optional<DateComponents> parseToDateComponents(const StringView&) const override;
Optional<DateComponents> setMillisecondToDateComponents(double) const override;
- bool isTimeField() const override;
void handleDOMActivateEvent(Event&) override;
bool isValidFormat(OptionSet<DateTimeFormatValidationResults>) const final;
Modified: trunk/Source/WebCore/html/URLInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/URLInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/URLInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -61,11 +61,6 @@
return validationMessageTypeMismatchForURLText();
}
-bool URLInputType::isURLField() const
-{
- return true;
-}
-
String URLInputType::sanitizeValue(const String& proposedValue) const
{
return stripLeadingAndTrailingHTMLSpaces(BaseTextInputType::sanitizeValue(proposedValue));
Modified: trunk/Source/WebCore/html/URLInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/URLInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/URLInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -44,7 +44,6 @@
bool typeMismatchFor(const String&) const override;
bool typeMismatch() const override;
String typeMismatchText() const override;
- bool isURLField() const override;
String sanitizeValue(const String&) const override;
};
Modified: trunk/Source/WebCore/html/WeekInputType.cpp (272096 => 272097)
--- trunk/Source/WebCore/html/WeekInputType.cpp 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/WeekInputType.cpp 2021-01-30 03:10:02 UTC (rev 272097)
@@ -78,11 +78,6 @@
return DateComponents::fromMillisecondsSinceEpochForWeek(value);
}
-bool WeekInputType::isWeekField() const
-{
- return true;
-}
-
void WeekInputType::handleDOMActivateEvent(Event&)
{
}
Modified: trunk/Source/WebCore/html/WeekInputType.h (272096 => 272097)
--- trunk/Source/WebCore/html/WeekInputType.h 2021-01-30 02:39:22 UTC (rev 272096)
+++ trunk/Source/WebCore/html/WeekInputType.h 2021-01-30 03:10:02 UTC (rev 272097)
@@ -50,7 +50,6 @@
StepRange createStepRange(AnyStepHandling) const override;
Optional<DateComponents> parseToDateComponents(const StringView&) const override;
Optional<DateComponents> setMillisecondToDateComponents(double) const override;
- bool isWeekField() const override;
void handleDOMActivateEvent(Event&) override;
bool isValidFormat(OptionSet<DateTimeFormatValidationResults>) const final;