Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

data-x-2="" not represented in dataset #3498

Merged
merged 1 commit into from Aug 21, 2022

Conversation

rniwa
Copy link
Member

@rniwa rniwa commented Aug 20, 2022

8a40482

data-x-2="" not represented in dataset
https://bugs.webkit.org/show_bug.cgi?id=123890

Reviewed by Brent Fulgham.

The bug was caused by propertyNameMatchesAttributeName implementing comparison incorrectly.

Fixed the bug by eliminating this function and reusing convertAttributeNameToPropertyName
when there is exactly one attribute. While the new code does allocate a String object,
it's still faster than creating a AtomString.

* LayoutTests/fast/dom/dataset-expected.txt:
* LayoutTests/fast/dom/dataset.html: Added a test case.

* Source/WebCore/dom/DatasetDOMStringMap.cpp:
(WebCore::propertyNameMatchesAttributeName): Deleted.
(WebCore::DatasetDOMStringMap::isSupportedPropertyName const):
(WebCore::DatasetDOMStringMap::item const):

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

26defca

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv ❌ πŸ§ͺ mac-wk1
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2
βœ… πŸ›  watch ❌ πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  πŸ§ͺ unsafe-merge βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress

@rniwa rniwa requested a review from cdumez as a code owner August 20, 2022 08:05
@rniwa rniwa self-assigned this Aug 20, 2022
@rniwa rniwa added 528+ (Nightly build) DOM For bugs specific to XML/HTML DOM elements (including parsing). labels Aug 20, 2022
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 20, 2022
@rniwa rniwa removed the merging-blocked Applied to prevent a change from being merged label Aug 20, 2022
Copy link
Contributor

@brentfulgham brentfulgham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a functional improvement, and a possible performance improvement!

@rniwa
Copy link
Member Author

rniwa commented Aug 21, 2022

Looks like a functional improvement, and a possible performance improvement!

It's worse in terms of perf but at least it's more correct.

@rniwa rniwa added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Aug 21, 2022
https://bugs.webkit.org/show_bug.cgi?id=123890

Reviewed by Brent Fulgham.

The bug was caused by propertyNameMatchesAttributeName implementing comparison incorrectly.

Fixed the bug by eliminating this function and reusing convertAttributeNameToPropertyName
when there is exactly one attribute. While the new code does allocate a String object,
it's still faster than creating a AtomString.

* LayoutTests/fast/dom/dataset-expected.txt:
* LayoutTests/fast/dom/dataset.html: Added a test case.

* Source/WebCore/dom/DatasetDOMStringMap.cpp:
(WebCore::propertyNameMatchesAttributeName): Deleted.
(WebCore::DatasetDOMStringMap::isSupportedPropertyName const):
(WebCore::DatasetDOMStringMap::item const):

Canonical link: https://commits.webkit.org/253625@main
@webkit-commit-queue
Copy link
Collaborator

Committed 253625@main (8a40482): https://commits.webkit.org/253625@main

Reviewed commits have been landed. Closing PR #3498 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 8a40482 into WebKit:main Aug 21, 2022
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Aug 21, 2022
@rniwa rniwa deleted the fix123890 branch August 21, 2022 04:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DOM For bugs specific to XML/HTML DOM elements (including parsing).
Projects
None yet
5 participants