[webkit-changes] [WebKit/WebKit] 8ab7fb: Implement form-associated custom elements

Commit Queue noreply at github.com
Fri Jan 6 14:20:47 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8ab7fbc063ef25be4e7d4901f3c399bc43a736da
      https://github.com/WebKit/WebKit/commit/8ab7fbc063ef25be4e7d4901f3c399bc43a736da
  Author: Alexey Shvayka <ashvayka at apple.com>
  Date:   2023-01-06 (Fri, 06 Jan 2023)

  Changed paths:
    A LayoutTests/fast/forms/state-restore-form-associated-custom-elements-expected.txt
    A LayoutTests/fast/forms/state-restore-form-associated-custom-elements.html
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-NotSupportedError-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-form-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-labels-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-labels.html
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-setFormValue-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/fieldset-elements-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-associated-callback-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-disabled-callback-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-elements-namedItem-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-reset-callback-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/label-delegatesFocus-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-constructor-disabled.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-constructor-disabled.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-constructor-readonly.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-constructor-readonly.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-parser-disabled.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-parser-disabled.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-parser-readonly.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/attr-parser-readonly.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-form-fieldset-elements.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-form-fieldset-elements.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-form.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-form.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-move-inside-form.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-move-inside-form.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-set-form-attr.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-set-form-attr.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-setValidity.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/constructor-setValidity.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-datalist.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-datalist.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-disabled-fieldset.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-disabled-fieldset.tentative.html
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-label.tentative-expected.txt
    A LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-label.tentative.html
    M LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
    M LayoutTests/imported/w3c/web-platform-tests/html/webappapis/scripting/events/compile-event-handler-lexical-scopes-form-owner-expected.txt
    M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
    A LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/custom-elements/form-associated/label-delegatesFocus-expected.txt
    M LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
    M LayoutTests/platform/ipad/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
    A LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt
    A LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/inside-datalist.tentative-expected.txt
    M LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
    A LayoutTests/platform/win/fast/forms/state-restore-form-associated-custom-elements-expected.txt
    M LayoutTests/platform/wpe/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt
    M Source/WebCore/CMakeLists.txt
    M Source/WebCore/DerivedSources-input.xcfilelist
    M Source/WebCore/DerivedSources-output.xcfilelist
    M Source/WebCore/DerivedSources.make
    M Source/WebCore/Headers.cmake
    M Source/WebCore/Sources.txt
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/accessibility/AccessibilityObject.cpp
    M Source/WebCore/bindings/js/JSCustomElementInterface.cpp
    M Source/WebCore/bindings/js/JSCustomElementInterface.h
    M Source/WebCore/bindings/js/JSHTMLElementCustom.cpp
    M Source/WebCore/css/SelectorCheckerTestFunctions.h
    M Source/WebCore/dom/CustomElementReactionQueue.cpp
    M Source/WebCore/dom/CustomElementReactionQueue.h
    M Source/WebCore/dom/Document.cpp
    M Source/WebCore/dom/Element.cpp
    M Source/WebCore/dom/Element.h
    M Source/WebCore/dom/ElementInternals.cpp
    M Source/WebCore/dom/ElementInternals.h
    M Source/WebCore/dom/ElementInternals.idl
    M Source/WebCore/dom/ElementRareData.cpp
    M Source/WebCore/dom/ElementRareData.h
    M Source/WebCore/dom/Node.h
    M Source/WebCore/dom/NodeRareData.h
    A Source/WebCore/dom/ValidityStateFlags.h
    A Source/WebCore/dom/ValidityStateFlags.idl
    M Source/WebCore/editing/FrameSelection.cpp
    A Source/WebCore/html/CustomElementFormValue.h
    A Source/WebCore/html/FormAssociatedCustomElement.cpp
    A Source/WebCore/html/FormAssociatedCustomElement.h
    M Source/WebCore/html/FormAssociatedElement.h
    M Source/WebCore/html/FormController.cpp
    M Source/WebCore/html/FormController.h
    M Source/WebCore/html/FormListedElement.cpp
    M Source/WebCore/html/FormListedElement.h
    M Source/WebCore/html/GenericCachedHTMLCollection.cpp
    M Source/WebCore/html/HTMLElement.cpp
    M Source/WebCore/html/HTMLElement.h
    M Source/WebCore/html/HTMLFieldSetElement.cpp
    M Source/WebCore/html/HTMLFieldSetElement.h
    M Source/WebCore/html/HTMLFieldSetElement.idl
    M Source/WebCore/html/HTMLFormControlElement.cpp
    M Source/WebCore/html/HTMLFormControlElement.h
    R Source/WebCore/html/HTMLFormControlElementWithState.cpp
    R Source/WebCore/html/HTMLFormControlElementWithState.h
    M Source/WebCore/html/HTMLFormElement.cpp
    M Source/WebCore/html/HTMLFormElement.h
    M Source/WebCore/html/HTMLFormElement.idl
    M Source/WebCore/html/HTMLImageElement.h
    M Source/WebCore/html/HTMLInputElement.cpp
    M Source/WebCore/html/HTMLLabelElement.cpp
    A Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.cpp
    A Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.h
    M Source/WebCore/html/HTMLObjectElement.cpp
    M Source/WebCore/html/HTMLObjectElement.h
    M Source/WebCore/html/HTMLSelectElement.cpp
    M Source/WebCore/html/HTMLSelectElement.h
    M Source/WebCore/html/HTMLTextAreaElement.h
    M Source/WebCore/html/HTMLTextFormControlElement.cpp
    M Source/WebCore/html/HTMLTextFormControlElement.h
    M Source/WebCore/html/RadioNodeList.cpp
    A Source/WebCore/html/ValidatedFormListedElement.cpp
    A Source/WebCore/html/ValidatedFormListedElement.h
    M Source/WebCore/html/ValidationMessage.cpp
    M Source/WebCore/html/ValidationMessage.h
    M Source/WebCore/html/parser/HTMLConstructionSite.cpp
    M Source/WebCore/page/Frame.cpp
    M Source/WebCore/style/StyleInvalidationFunctions.h
    M Source/WebCore/style/StyleSharingResolver.cpp

  Log Message:
  -----------
  Implement form-associated custom elements
https://bugs.webkit.org/show_bug.cgi?id=197963

Reviewed by Ryosuke Niwa.

This change implements form-associated custom elements as per spec [1], with exception of
formStateRestoreCallback() being called for autofill and support of File interface
for saving / restoring state.

For not yet upgraded custom elements to become fully operational form controls if
their interface gets defined as form-associated, HTMLMaybeFormAssociatedCustomElement
class has beed introduced.

To avoid severe memory bloat for all custom elements, HTMLMaybeFormAssociatedCustomElement
keeps its form-associated internals in ElementRareData, initializing only on demand.

That internal data is a subclass of ValidatedFormListedElement, which was extracted from
HTMLFormControlElement to include only the logic relevant to both native and custom element
form controls, such as constraint validation, watching disabled state, "readonly" attribute,
and error reporting.

Since HTMLFormControlElementWithState used to extend HTMLFormControlElement, and with this
change form-associated custom elements can also have state, it has been merged into
ValidatedFormListedElement, with exception of the insertionIndex() method, which was removed
to avoid increasing sizeof(HTMLButtonElement).

insertionIndex() wasn't actually necessary (DOM order is sufficient), and the sorting by `formKey`
was refactored using a HashMap. Another important change is in form signature generator: we need
to account for not yet upgraded, potentially form-associated custom elements, otherwise signatures
for the same <form> won't match, hence the introduction of shouldBeUsedForFormSignature().

Per spec, ElementInternals can only be attached in "precustomized" or "custom" state [2],
but it's not clear whether or not its methods should throw in "error" state. This change
aligns WebKit with Firefox in this regard, arguing that if internals can't be attached in
given state, they shouldn't be operational.

During the upgrade, in the constructor, form-associated custom element has no notion of its
surroundings: its form owner, whether it's inside a <datalist> or disabled <fieldset>,
has a "readonly" attribute etc, so all that won't affect its `willValidate` / `validity`.
That is pretty sensible given the best practices for authoring custom elements forbid DOM
access in constructor to support `new XFoo()` usage.

This detail greatly reduces fragility: by delaying form-association until the "custom"
state, we ensure that once an element becomes "form listed", it will never roll back,
which we assert multiple times in HTMLFormElement.cpp.

However, if an author performs setValidity() in the constructor, that will work as expected.
Aligns WebKit with Blink and partly Firefox; the spec in unclear.

[1] https://github.com/whatwg/html/pull/4383
[2] https://html.spec.whatwg.org/multipage/custom-elements.html#dom-attachinternals

* LayoutTests/fast/forms/state-restore-per-form-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-NotSupportedError-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-form-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-labels-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-labels.html:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-setFormValue-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/ElementInternals-validation.html:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/fieldset-elements-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-associated-callback-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-disabled-callback-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-elements-namedItem-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/form-reset-callback-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/label-delegatesFocus-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/custom-elements/form-associated/upgrading/*: Added.
* LayoutTests/imported/w3c/web-platform-tests/html/dom/idlharness.https-expected.txt:
* Source/WebCore/CMakeLists.txt:
* Source/WebCore/DerivedSources-input.xcfilelist:
* Source/WebCore/DerivedSources-output.xcfilelist:
* Source/WebCore/DerivedSources.make:
* Source/WebCore/Headers.cmake:
* Source/WebCore/Sources.txt:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::isShowingValidationMessage const):
(WebCore::AccessibilityObject::validationMessage const):
* Source/WebCore/bindings/js/JSCustomElementInterface.cpp:
(WebCore::JSCustomElementInterface::createElement):
(WebCore::JSCustomElementInterface::upgradeElement):
(WebCore::JSCustomElementInterface::invokeFormAssociatedCallback):
(WebCore::JSCustomElementInterface::invokeFormResetCallback):
(WebCore::JSCustomElementInterface::invokeFormDisabledCallback):
(WebCore::JSCustomElementInterface::invokeFormStateRestoreCallback):
* Source/WebCore/bindings/js/JSCustomElementInterface.h:
(WebCore::JSCustomElementInterface::isFormAssociated const):
(WebCore::JSCustomElementInterface::hasFormAssociatedCallback const):
(WebCore::JSCustomElementInterface::hasFormResetCallback const):
(WebCore::JSCustomElementInterface::hasFormDisabledCallback const):
(WebCore::JSCustomElementInterface::hasFormStateRestoreCallback const):
* Source/WebCore/bindings/js/JSHTMLElementCustom.cpp:
(WebCore::constructJSHTMLElement):
(WebCore::JSHTMLElement::pushEventHandlerScope const):
* Source/WebCore/css/SelectorCheckerTestFunctions.h:
(WebCore::matchesUserInvalidPseudoClass):
(WebCore::matchesUserValidPseudoClass):
* Source/WebCore/dom/CustomElementReactionQueue.cpp:
(WebCore::CustomElementReactionQueueItem::CustomElementReactionQueueItem):
(WebCore::CustomElementReactionQueueItem::invoke):
(WebCore::CustomElementReactionQueue::enqueueFormAssociatedCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueFormResetCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueFormDisabledCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::enqueueFormStateRestoreCallbackIfNeeded):
(WebCore::CustomElementReactionQueue::isFormAssociated const):
* Source/WebCore/dom/CustomElementReactionQueue.h:
* Source/WebCore/dom/Document.cpp:
(WebCore::createUpgradeCandidateElement):
(WebCore::createFallbackHTMLElement):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::isFormAssociatedCustomElement const):
(WebCore::Element::canAccessFormAssociatedInternals const):
(WebCore::Element::asFormListedElement):
(WebCore::Element::asValidatedFormListedElement):
(WebCore::Element::ensureFormAssociatedCustomElement):
(WebCore::Element::matchesUserValidPseudoClass const):
(WebCore::Element::matchesUserInvalidPseudoClass const):
* Source/WebCore/dom/Element.h:
(WebCore::Element::isFormListedElement const):
(WebCore::Element::isValidatedFormListedElement const):
(WebCore::Element::isMaybeFormAssociatedCustomElement const):
(WebCore::Element::isFormControlElementWithState const): Deleted.
* Source/WebCore/dom/ElementInternals.cpp:
(WebCore::ElementInternals::form const):
(WebCore::ElementInternals::setFormValue):
(WebCore::ElementInternals::setValidity):
(WebCore::ElementInternals::willValidate):
(WebCore::ElementInternals::validity):
(WebCore::ElementInternals::validationMessage):
(WebCore::ElementInternals::reportValidity):
(WebCore::ElementInternals::checkValidity):
(WebCore::ElementInternals::labels):
* Source/WebCore/dom/ElementInternals.h:
* Source/WebCore/dom/ElementInternals.idl:
* Source/WebCore/dom/ElementRareData.cpp:
* Source/WebCore/dom/ElementRareData.h:
(WebCore::ElementRareData::formAssociatedCustomElement):
(WebCore::ElementRareData::setFormAssociatedCustomElement):
(WebCore::ElementRareData::useTypes const):
* Source/WebCore/dom/NodeRareData.h:
* Source/WebCore/dom/ValidityStateFlags.h: Copied from Source/WebCore/dom/ElementInternals.h.
(WebCore::ValidityStateFlags::isValid const):
* Source/WebCore/dom/ValidityStateFlags.idl: Copied from Source/WebCore/dom/ElementInternals.h.
* Source/WebCore/editing/FrameSelection.cpp:
(WebCore::scanForForm):
(WebCore::findFormControlElementAncestor):
(WebCore::FrameSelection::currentForm const):
* Source/WebCore/html/FormAssociatedCustomElement.cpp: Added.
(WebCore::FormAssociatedCustomElement::FormAssociatedCustomElement):
(WebCore::FormAssociatedCustomElement::create):
(WebCore::FormAssociatedCustomElement::setValidity):
(WebCore::FormAssociatedCustomElement::validationMessage const):
(WebCore::cloneFormDataIfNeccessary):
(WebCore::FormAssociatedCustomElement::setFormValue):
(WebCore::FormAssociatedCustomElement::anchorElement):
(WebCore::FormAssociatedCustomElement::computeValidity const):
(WebCore::FormAssociatedCustomElement::appendFormData):
(WebCore::FormAssociatedCustomElement::formWillBeDestroyed):
(WebCore::FormAssociatedCustomElement::reset):
(WebCore::FormAssociatedCustomElement::disabledStateChanged):
(WebCore::FormAssociatedCustomElement::didChangeForm):
(WebCore::FormAssociatedCustomElement::didUpgrade):
(WebCore::FormAssociatedCustomElement::invalidateElementsCollectionCachesInAncestors):
(WebCore::FormAssociatedCustomElement::formControlType const):
(WebCore::FormAssociatedCustomElement::saveFormControlState const):
(WebCore::FormAssociatedCustomElement::restoreFormControlState):
* Source/WebCore/html/FormAssociatedCustomElement.h: Added.
* Source/WebCore/html/FormAssociatedElement.h:
(WebCore::FormAssociatedElement::ref const):
(WebCore::FormAssociatedElement::deref const):
(WebCore::FormAssociatedElement::ref): Deleted.
(WebCore::FormAssociatedElement::deref): Deleted.
* Source/WebCore/html/FormController.cpp:
(WebCore::ownerForm):
(WebCore::formSignature):
(WebCore::FormController::FormKeyGenerator::formKey):
(WebCore::FormController::formElementsState const):
(WebCore::FormController::takeStateForFormElement):
(WebCore::FormController::restoreControlStateFor):
(WebCore::FormController::restoreControlStateIn):
* Source/WebCore/html/FormController.h:
* Source/WebCore/html/FormListedElement.cpp:
(WebCore::FormListedElement::didMoveToNewDocument):
(WebCore::FormListedElement::resetFormOwner):
(WebCore::FormListedElement::parseAttribute):
(WebCore::FormListedElement::parseFormAttribute):
(WebCore::FormListedElement::formAttributeChanged): Deleted.
(WebCore::FormListedElement::isFormControlElementWithState const): Deleted.
* Source/WebCore/html/FormListedElement.h:
(WebCore::FormListedElement::clearForm):
(): Deleted.
* Source/WebCore/html/GenericCachedHTMLCollection.cpp:
(WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches const):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::HTMLElement::canBeActuallyDisabled const):
(WebCore::HTMLElement::form const): Deleted.
(WebCore::HTMLElement::asFormListedElement): Deleted.
* Source/WebCore/html/HTMLElement.h:
* Source/WebCore/html/HTMLFieldSetElement.cpp:
(WebCore::firstFormControlElementWithin):
(WebCore::nextFormControlElementSkippingChildren):
(WebCore::nextFormControlElement):
(WebCore::updateFromControlElementsAncestorDisabledStateUnder):
(WebCore::HTMLFieldSetElement::addInvalidDescendant):
(WebCore::HTMLFieldSetElement::removeInvalidDescendant):
* Source/WebCore/html/HTMLFieldSetElement.h:
* Source/WebCore/html/HTMLFieldSetElement.idl:
* Source/WebCore/html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::HTMLFormControlElement):
(WebCore::HTMLFormControlElement::parseAttribute):
(WebCore::HTMLFormControlElement::disabledStateChanged):
(WebCore::HTMLFormControlElement::readOnlyStateChanged):
(WebCore::HTMLFormControlElement::didFinishInsertingNode):
(WebCore::HTMLFormControlElement::didMoveToNewDocument):
(WebCore::HTMLFormControlElement::finishParsingChildren):
(WebCore::HTMLFormControlElement::insertedIntoAncestor):
(WebCore::HTMLFormControlElement::removedFromAncestor):
(WebCore::HTMLFormControlElement::~HTMLFormControlElement): Deleted.
(WebCore::HTMLFormControlElement::computeIsDisabledByFieldsetAncestor const): Deleted.
(WebCore::HTMLFormControlElement::setAncestorDisabled): Deleted.
(WebCore::HTMLFormControlElement::disabledAttributeChanged): Deleted.
(WebCore::addInvalidElementToAncestorFromInsertionPoint): Deleted.
(WebCore::removeInvalidElementToAncestorFromInsertionPoint): Deleted.
(WebCore::HTMLFormControlElement::setInteractedWithSinceLastFormSubmitEvent): Deleted.
(WebCore::HTMLFormControlElement::supportsFocus const): Deleted.
(WebCore::HTMLFormControlElement::matchesValidPseudoClass const): Deleted.
(WebCore::HTMLFormControlElement::matchesInvalidPseudoClass const): Deleted.
(WebCore::HTMLFormControlElement::endDelayingUpdateValidity): Deleted.
(WebCore::HTMLFormControlElement::computeWillValidate const): Deleted.
(WebCore::HTMLFormControlElement::willValidate const): Deleted.
(WebCore::HTMLFormControlElement::updateWillValidateAndValidity): Deleted.
(WebCore::HTMLFormControlElement::updateVisibleValidationMessage): Deleted.
(WebCore::HTMLFormControlElement::hideVisibleValidationMessage): Deleted.
(WebCore::HTMLFormControlElement::checkValidity): Deleted.
(WebCore::HTMLFormControlElement::isFocusingWithValidationMessage const): Deleted.
(WebCore::HTMLFormControlElement::isShowingValidationMessage const): Deleted.
(WebCore::HTMLFormControlElement::reportValidity): Deleted.
(WebCore::HTMLFormControlElement::focusAndShowValidationMessage): Deleted.
(WebCore::HTMLFormControlElement::isValidFormControlElement const): Deleted.
(WebCore::HTMLFormControlElement::willChangeForm): Deleted.
(WebCore::HTMLFormControlElement::didChangeForm): Deleted.
(WebCore::HTMLFormControlElement::updateValidity): Deleted.
(WebCore::HTMLFormControlElement::setCustomValidity): Deleted.
(WebCore::HTMLFormControlElement::validationMessageShadowTreeContains const): Deleted.
(WebCore::HTMLFormControlElement::matchesUserInvalidPseudoClass const): Deleted.
(WebCore::HTMLFormControlElement::matchesUserValidPseudoClass const): Deleted.
* Source/WebCore/html/HTMLFormControlElement.h:
(WebCore::HTMLFormControlElement::isReadOnly const):
(WebCore::HTMLFormControlElement::isMutable const):
(WebCore::HTMLFormControlElement::reset): Deleted.
(WebCore::HTMLFormControlElement::wasInteractedWithSinceLastFormSubmitEvent const): Deleted.
(WebCore::HTMLFormControlElement::supportsReadOnly const): Deleted.
(WebCore::HTMLFormControlElement::disabledByAncestorFieldset const): Deleted.
(WebCore::HTMLFormControlElement::startDelayingUpdateValidity): Deleted.
(WebCore::DelayedUpdateValidityScope::DelayedUpdateValidityScope): Deleted.
(WebCore::DelayedUpdateValidityScope::~DelayedUpdateValidityScope): Deleted.
* Source/WebCore/html/HTMLFormControlElementWithState.cpp: Removed.
* Source/WebCore/html/HTMLFormControlElementWithState.h: Removed.
* Source/WebCore/html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::validateInteractively):
(WebCore::HTMLFormElement::resetListedFormControlElements):
(WebCore::HTMLFormElement::shouldAutocorrect const):
(WebCore::HTMLFormElement::formElementIndex):
(WebCore::HTMLFormElement::addInvalidFormControl):
(WebCore::HTMLFormElement::removeInvalidFormControlIfNeeded):
(WebCore::HTMLFormElement::checkValidity):
(WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
(WebCore::HTMLFormElement::assertItemCanBeInPastNamesMap const):
(WebCore::HTMLFormElement::copyValidatedListedElementsVector const):
* Source/WebCore/html/HTMLFormElement.h:
* Source/WebCore/html/HTMLFormElement.idl:
* Source/WebCore/html/HTMLImageElement.h:
* Source/WebCore/html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::shouldSaveAndRestoreFormControlState const):
* Source/WebCore/html/HTMLLabelElement.cpp:
(WebCore::HTMLLabelElement::form const):
* Source/WebCore/html/HTMLLabelElement.h:
* Source/WebCore/html/HTMLLegendElement.h:
* Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.cpp: Added.
(WebCore::HTMLMaybeFormAssociatedCustomElement::HTMLMaybeFormAssociatedCustomElement):
(WebCore::HTMLMaybeFormAssociatedCustomElement::create):
(WebCore::HTMLMaybeFormAssociatedCustomElement::isFormListedElement const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::isValidatedFormListedElement const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::asFormAssociatedElement):
(WebCore::HTMLMaybeFormAssociatedCustomElement::asFormListedElement):
(WebCore::HTMLMaybeFormAssociatedCustomElement::asValidatedFormListedElement):
(WebCore::HTMLMaybeFormAssociatedCustomElement::asFormAssociatedCustomElement):
(WebCore::HTMLMaybeFormAssociatedCustomElement::matchesValidPseudoClass const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::matchesInvalidPseudoClass const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::matchesUserValidPseudoClass const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::matchesUserInvalidPseudoClass const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::supportsFocus const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::supportLabels const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::isDisabledFormControl const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::impl const):
(WebCore::HTMLMaybeFormAssociatedCustomElement::finishParsingChildren):
(WebCore::HTMLMaybeFormAssociatedCustomElement::didFinishInsertingNode):
(WebCore::HTMLMaybeFormAssociatedCustomElement::didMoveToNewDocument):
(WebCore::HTMLMaybeFormAssociatedCustomElement::insertedIntoAncestor):
(WebCore::HTMLMaybeFormAssociatedCustomElement::removedFromAncestor):
(WebCore::HTMLMaybeFormAssociatedCustomElement::parseAttribute):
(WebCore::HTMLMaybeFormAssociatedCustomElement::didUpgrade):
* Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.h: Added.
(isType):
* Source/WebCore/html/HTMLObjectElement.cpp:
(WebCore::HTMLObjectElement::parseAttribute):
(WebCore::HTMLObjectElement::didMoveToNewDocument):
* Source/WebCore/html/HTMLObjectElement.h:
* Source/WebCore/html/HTMLOptionElement.h:
* Source/WebCore/html/HTMLSelectElement.cpp:
* Source/WebCore/html/HTMLSelectElement.h:
* Source/WebCore/html/HTMLTextAreaElement.h:
* Source/WebCore/html/HTMLTextFormControlElement.cpp:
* Source/WebCore/html/HTMLTextFormControlElement.h:
* Source/WebCore/html/RadioNodeList.cpp:
(WebCore::RadioNodeList::elementMatches const):
* Source/WebCore/html/ValidatedFormListedElement.cpp: Added.
(WebCore::ValidatedFormListedElement::ValidatedFormListedElement):
(WebCore::ValidatedFormListedElement::~ValidatedFormListedElement):
(WebCore::ValidatedFormListedElement::willValidate const):
(WebCore::ValidatedFormListedElement::computeWillValidate const):
(WebCore::ValidatedFormListedElement::updateVisibleValidationMessage):
(WebCore::ValidatedFormListedElement::hideVisibleValidationMessage):
(WebCore::ValidatedFormListedElement::checkValidity):
(WebCore::ValidatedFormListedElement::reportValidity):
(WebCore::ValidatedFormListedElement::focusableAnchorElementForValidationMessage):
(WebCore::ValidatedFormListedElement::focusAndShowValidationMessage):
(WebCore::ValidatedFormListedElement::reportNonFocusableControlError):
(WebCore::ValidatedFormListedElement::isShowingValidationMessage const):
(WebCore::ValidatedFormListedElement::validationMessageShadowTreeContains const):
(WebCore::ValidatedFormListedElement::isFocusingWithValidationMessage const):
(WebCore::ValidatedFormListedElement::setAncestorDisabled):
(WebCore::addInvalidElementToAncestorFromInsertionPoint):
(WebCore::removeInvalidElementToAncestorFromInsertionPoint):
(WebCore::ValidatedFormListedElement::updateValidity):
(WebCore::ValidatedFormListedElement::parseAttribute):
(WebCore::ValidatedFormListedElement::parseDisabledAttribute):
(WebCore::ValidatedFormListedElement::parseReadonlyAttribute):
(WebCore::ValidatedFormListedElement::disabledAttributeChanged):
(WebCore::ValidatedFormListedElement::insertedIntoAncestor):
(WebCore::ValidatedFormListedElement::resetDataListAncestorState):
(WebCore::ValidatedFormListedElement::syncWithFieldsetAncestors):
(WebCore::ValidatedFormListedElement::removedFromAncestor):
(WebCore::ValidatedFormListedElement::computeIsDisabledByFieldsetAncestor const):
(WebCore::ValidatedFormListedElement::willChangeForm):
(WebCore::ValidatedFormListedElement::didChangeForm):
(WebCore::ValidatedFormListedElement::disabledStateChanged):
(WebCore::ValidatedFormListedElement::readOnlyStateChanged):
(WebCore::ValidatedFormListedElement::updateWillValidateAndValidity):
(WebCore::ValidatedFormListedElement::didFinishInsertingNode):
(WebCore::ValidatedFormListedElement::setCustomValidity):
(WebCore::ValidatedFormListedElement::endDelayingUpdateValidity):
(WebCore::ValidatedFormListedElement::isCandidateForSavingAndRestoringState const):
(WebCore::ValidatedFormListedElement::shouldAutocomplete const):
(WebCore::ValidatedFormListedElement::saveFormControlState const):
(WebCore::ValidatedFormListedElement::finishParsingChildren):
(WebCore::ValidatedFormListedElement::matchesValidPseudoClass const):
(WebCore::ValidatedFormListedElement::matchesInvalidPseudoClass const):
(WebCore::ValidatedFormListedElement::matchesUserInvalidPseudoClass const):
(WebCore::ValidatedFormListedElement::matchesUserValidPseudoClass const):
(WebCore::ValidatedFormListedElement::setInteractedWithSinceLastFormSubmitEvent):
* Source/WebCore/html/ValidatedFormListedElement.h: Added.
(WebCore::ValidatedFormListedElement::reset):
(WebCore::ValidatedFormListedElement::supportsReadOnly const):
(WebCore::ValidatedFormListedElement::isDisabled const):
(WebCore::ValidatedFormListedElement::hasReadOnlyAttribute const):
(WebCore::ValidatedFormListedElement::isValidFormControlElement const):
(WebCore::ValidatedFormListedElement::wasInteractedWithSinceLastFormSubmitEvent const):
(WebCore::ValidatedFormListedElement::shouldSaveAndRestoreFormControlState const):
(WebCore::ValidatedFormListedElement::restoreFormControlState):
(WebCore::ValidatedFormListedElement::disabledByAncestorFieldset const):
(WebCore::ValidatedFormListedElement::startDelayingUpdateValidity):
(WebCore::DelayedUpdateValidityScope::DelayedUpdateValidityScope):
(WebCore::DelayedUpdateValidityScope::~DelayedUpdateValidityScope):
* Source/WebCore/html/ValidationMessage.cpp:
(WebCore::ValidationMessage::ValidationMessage):
(WebCore::ValidationMessage::updateValidationMessage):
* Source/WebCore/html/ValidationMessage.h:
* Source/WebCore/html/parser/HTMLConstructionSite.cpp:
(WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
* Source/WebCore/page/Frame.cpp:
(WebCore::Frame::searchForLabelsBeforeElement):
* Source/WebCore/style/StyleSharingResolver.cpp:
(WebCore::Style::SharingResolver::canShareStyleWithElement const):

Canonical link: https://commits.webkit.org/258561@main




More information about the webkit-changes mailing list