[webkit-changes] [WebKit/WebKit] ccd8c7: [popover] Add boilerplate for DOM/JS API
Tim Nguyen
noreply at github.com
Mon Feb 13 13:05:45 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ccd8c7397ddec0fc7f0924a87b289e0ed85f137d
https://github.com/WebKit/WebKit/commit/ccd8c7397ddec0fc7f0924a87b289e0ed85f137d
Author: Tim Nguyen <ntim at apple.com>
Date: 2023-02-13 (Mon, 13 Feb 2023)
Changed paths:
M LayoutTests/TestExpectations
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/hide-other-popover-side-effects-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/light-dismiss-event-ordering.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-anchor-display-none.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-anchor-nesting.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-animated-hide-cleanup.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-animation-corner-cases.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-attribute-basic.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-beforetoggle-opening-event.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-document-open.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-child-dialog-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-shadow-dom.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-stacking.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-target-element-disabled.tentative-expected.txt
M LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-top-layer-combinations.tentative-expected.txt
M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2.tentative-expected.txt
M LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative-expected.txt
A LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/popovers/light-dismiss-event-ordering.tentative-expected.txt
M Source/WebCore/Headers.cmake
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/dom/Element.cpp
M Source/WebCore/dom/Element.h
M Source/WebCore/dom/ElementRareData.cpp
M Source/WebCore/dom/ElementRareData.h
M Source/WebCore/dom/NodeRareData.h
A Source/WebCore/dom/PopoverData.h
M Source/WebCore/html/HTMLElement.cpp
M Source/WebCore/html/HTMLElement.h
M Source/WebCore/html/HTMLElement.idl
M Source/WebCore/platform/CommonAtomStrings.h
Log Message:
-----------
[popover] Add boilerplate for DOM/JS API
https://bugs.webkit.org/show_bug.cgi?id=252077
rdar://105388147
Reviewed by Ryosuke Niwa.
https://html.spec.whatwg.org/#the-popover-attribute
- Add PopupData that stores visibility state & previously focused element and in the future, invoker & toggle task
- Add IDL reflection for popover attribute
- Add some basic steps for showPopover/hidePopover/togglePopover
"SyntaxError: The string did not match the expected pattern." error messages are because the `:open`/`:closed` pseudo-classes aren't implemented, leading `matches(":open")` to throw.
* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/hide-other-popover-side-effects-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/light-dismiss-event-ordering.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-anchor-display-none.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-anchor-nesting.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-animated-hide-cleanup.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-animation-corner-cases.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-attribute-basic.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-beforetoggle-opening-event.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-document-open.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-child-dialog-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-shadow-dom.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-stacking.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-target-element-disabled.tentative-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/html/semantics/popovers/popover-top-layer-combinations.tentative-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/popovers/popover-focus-2.tentative-expected.txt:
* LayoutTests/platform/gtk/imported/w3c/web-platform-tests/html/semantics/popovers/popover-light-dismiss.tentative-expected.txt:
* LayoutTests/platform/ios-wk2/imported/w3c/web-platform-tests/html/semantics/popovers/light-dismiss-event-ordering.tentative-expected.txt:
* Source/WebCore/Headers.cmake:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::popoverData):
* Source/WebCore/dom/Element.h:
* Source/WebCore/dom/ElementRareData.cpp:
* Source/WebCore/dom/ElementRareData.h:
(WebCore::ElementRareData::popoverData):
(WebCore::ElementRareData::setPopoverData):
(WebCore::ElementRareData::useTypes const):
* Source/WebCore/dom/NodeRareData.h:
* Source/WebCore/dom/PopoverData.h: Added.
(WebCore::PopoverData::visibilityState const):
(WebCore::PopoverData::setVisibilityState):
(WebCore::PopoverData::previouslyFocusedElement const):
(WebCore::PopoverData::setPreviouslyFocusedElement):
* Source/WebCore/html/HTMLElement.cpp:
(WebCore::checkPopoverValidity): Implements https://html.spec.whatwg.org/#check-popover-validity
(WebCore::HTMLElement::showPopover):
(WebCore::HTMLElement::hidePopover):
(WebCore::HTMLElement::togglePopover):
(WebCore::HTMLElement::popover const):
* Source/WebCore/html/HTMLElement.h:
(WebCore::HTMLElement::setPopover):
* Source/WebCore/html/HTMLElement.idl:
* Source/WebCore/platform/CommonAtomStrings.h:
Canonical link: https://commits.webkit.org/260218@main
More information about the webkit-changes
mailing list