Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: dfe9241c6c45bb797e7d2116dcea2ce70555f0b8 https://github.com/WebKit/WebKit/commit/dfe9241c6c45bb797e7d2116dcea2ce70555f0b8 Author: Alexey Shvayka <ashva...@apple.com> Date: 2023-01-17 (Tue, 17 Jan 2023)
Changed paths: M Source/WebCore/Headers.cmake M Source/WebCore/Sources.txt M Source/WebCore/WebCore.xcodeproj/project.pbxproj M Source/WebCore/accessibility/AccessibilityNodeObject.cpp M Source/WebCore/dom/ElementInternals.cpp M Source/WebCore/html/HTMLButtonElement.h M Source/WebCore/html/HTMLElement.cpp M Source/WebCore/html/HTMLElement.h M Source/WebCore/html/HTMLFormControlElement.cpp M Source/WebCore/html/HTMLFormControlElement.h M Source/WebCore/html/HTMLInputElement.cpp M Source/WebCore/html/HTMLInputElement.h M Source/WebCore/html/HTMLLabelElement.cpp M Source/WebCore/html/HTMLLabelElement.h M Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.cpp M Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.h M Source/WebCore/html/HTMLMeterElement.cpp M Source/WebCore/html/HTMLMeterElement.h M Source/WebCore/html/HTMLOutputElement.h M Source/WebCore/html/HTMLProgressElement.cpp M Source/WebCore/html/HTMLProgressElement.h M Source/WebCore/html/HTMLSelectElement.h M Source/WebCore/html/HTMLTextAreaElement.h M Source/WebCore/html/InputType.cpp M Source/WebCore/html/InputType.h R Source/WebCore/html/LabelableElement.cpp R Source/WebCore/html/LabelableElement.h M Source/WebCore/html/LabelsNodeList.cpp M Source/WebCore/html/LabelsNodeList.h M Source/WebCore/html/ValidatedFormListedElement.h M Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm Log Message: ----------- Merge LabelableElement into HTMLElement and rename supportLabels() https://bugs.webkit.org/show_bug.cgi?id=250568 Reviewed by Ryosuke Niwa. LabelableElement name is kinda misleading: although HTMLMaybeFormAssociatedCustomElement and HTMLInputElement extend the class, they may not be "labelable elements" [1] if a custom element is either not upgraded or not form-associated, or in case of <input type=hidden>. Because of that, supportLabels() should also be checked, and while WebCore/html code did just that, in AccessibilityNodeObject::labelForElement(), for instance, that check was missing. This change merges LabelableElement::labels() into HTMLElement and renames supportLabels() to isLabelable(), fixing the grammar mistake. [1] https://html.spec.whatwg.org/multipage/forms.html#category-label * Source/WebCore/Headers.cmake: * Source/WebCore/Sources.txt: * Source/WebCore/WebCore.xcodeproj/project.pbxproj: * Source/WebCore/accessibility/AccessibilityNodeObject.cpp: * Source/WebCore/dom/ElementInternals.cpp: (WebCore::ElementInternals::labels): * Source/WebCore/html/HTMLButtonElement.h: * Source/WebCore/html/HTMLElement.cpp: (WebCore::HTMLElement::labels): * Source/WebCore/html/HTMLElement.h: * Source/WebCore/html/HTMLFormControlElement.cpp: (WebCore::HTMLFormControlElement::HTMLFormControlElement): (WebCore::HTMLFormControlElement::parseAttribute): * Source/WebCore/html/HTMLFormControlElement.h: * Source/WebCore/html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::isLabelable const): (WebCore::HTMLInputElement::supportLabels const): Deleted. * Source/WebCore/html/HTMLInputElement.h: * Source/WebCore/html/HTMLLabelElement.cpp: (WebCore::firstElementWithIdIfLabelable): (WebCore::HTMLLabelElement::control const): * Source/WebCore/html/HTMLLabelElement.h: * Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.cpp: (WebCore::HTMLMaybeFormAssociatedCustomElement::HTMLMaybeFormAssociatedCustomElement): (WebCore::HTMLMaybeFormAssociatedCustomElement::isLabelable const): (WebCore::HTMLMaybeFormAssociatedCustomElement::supportLabels const): Deleted. * Source/WebCore/html/HTMLMaybeFormAssociatedCustomElement.h: * Source/WebCore/html/HTMLMeterElement.cpp: (WebCore::HTMLMeterElement::HTMLMeterElement): (WebCore::HTMLMeterElement::parseAttribute): * Source/WebCore/html/HTMLMeterElement.h: * Source/WebCore/html/HTMLOutputElement.h: * Source/WebCore/html/HTMLProgressElement.cpp: (WebCore::HTMLProgressElement::HTMLProgressElement): (WebCore::HTMLProgressElement::parseAttribute): * Source/WebCore/html/HTMLProgressElement.h: * Source/WebCore/html/HTMLSelectElement.h: * Source/WebCore/html/HTMLTextAreaElement.h: * Source/WebCore/html/InputType.cpp: (WebCore::InputType::isLabelable const): (WebCore::InputType::supportLabels const): Deleted. * Source/WebCore/html/InputType.h: * Source/WebCore/html/LabelableElement.cpp: Removed. * Source/WebCore/html/LabelableElement.h: Removed. * Source/WebCore/html/LabelsNodeList.cpp: (WebCore::LabelsNodeList::LabelsNodeList): (WebCore::LabelsNodeList::create): * Source/WebCore/html/LabelsNodeList.h: * Source/WebCore/html/ValidatedFormListedElement.h: * Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::focusedElementInformation): Canonical link: https://commits.webkit.org/258999@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes