Bug 250281 - Remove unused attributes from HTMLAttributeNames.in
Summary: Remove unused attributes from HTMLAttributeNames.in
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Anne van Kesteren
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-01-07 15:43 PST by Ahmad Saleem
Modified: 2023-05-15 07:17 PDT (History)
12 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ahmad Saleem 2023-01-07 15:43:46 PST
Hi Team,

I am not able to find anything beside this line here and it seems Blink also got rid of it:

Reference: https://github.com/WebKit/WebKit/blob/8b8f0c201eb0d1a96590a17ab6b6908f137707c0/Source/WebCore/html/HTMLAttributeNames.in#L446

Can we also remove this now? If it is not supported in WebKit etc.?

Thanks!
Comment 1 Tim Nguyen (:ntim) 2023-01-07 16:31:09 PST
There doesn't seem any usages of `webkitgrammarAttr` in the codebase, so seems like unused code to me.
Comment 2 Tim Nguyen (:ntim) 2023-01-07 16:37:27 PST
x-webkit-imagemenu / x-webkit-speech / x-webkit-airplay seem unused as well. I bet there's more unused ones too. 

You can do a plain text search for the generated indentifiers to check: https://searchfox.org/wubkat/source/__GENERATED__/WebCore/DerivedSources/HTMLNames.cpp#2998
Comment 3 Ahmad Saleem 2023-01-07 16:40:26 PST
(In reply to Tim Nguyen (:ntim) from comment #2)
> x-webkit-imagemenu / x-webkit-speech / x-webkit-airplay seem unused as well.
> I bet there's more unused ones too. 
> 
> You can do a plain text search for the generated indentifiers to check:
> https://searchfox.org/wubkat/source/__GENERATED__/WebCore/DerivedSources/
> HTMLNames.cpp#2998

Yes, I think I might rename this bug title and try to find all which seems unused and ask for some input. Few days back, I asked on Slack to Ryosuke about similar Blink commit, where they removed a bunch of these. Let me try to find it in morning and compile list here and get input. Can do PR to clean all in one go.
Comment 4 Ahmad Saleem 2023-01-08 04:17:36 PST
So I
Comment 5 Ahmad Saleem 2023-01-08 05:12:27 PST
--> x-webkit-speech

https://github.com/WebKit/WebKit/blob/866813ec2e4eb4f8646237cccfe1ad3ad76f46e1/Source/WebCore/html/HTMLAttributeNames.in#L445

--> x-webkit-imagemenu

https://github.com/WebKit/WebKit/blob/866813ec2e4eb4f8646237cccfe1ad3ad76f46e1/Source/WebCore/html/HTMLAttributeNames.in#L446

--> x-webkit-airplay

https://github.com/WebKit/WebKit/blob/866813ec2e4eb4f8646237cccfe1ad3ad76f46e1/Source/WebCore/html/HTMLAttributeNames.in#L444

## Few more:

Blink Commit - https://chromium.googlesource.com/chromium/blink/+/674f886367e5835520a68d15bcaf36d4493d5a26

Following:

aria-setsize
aria-posinset
aria-sort
cellborder
disposition
expanded
focused
indeterminate
itemid
itemprop
itemref
itemscope
itemtype
playcount
loopend
loopstart
onwebkitspeechchange
onwebkitkeyadded
onwebkitkeyerror
onwebkitkeymessage
onwebkitneedkey
onwebkitsourceclose
onwebkitsourceended
onwebkitsourceopen
pluginspage
pluginurl
primary
progress
prompt
sortable
sortdirection
tableborder
top
Comment 6 Tyler Wilcock 2023-01-12 13:52:28 PST
aria-setsize, aria-posinset, and aria-sort are in use.
Comment 7 Radar WebKit Bug Importer 2023-01-14 15:44:15 PST
<rdar://problem/104267186>
Comment 8 Anne van Kesteren 2023-05-15 01:12:10 PDT
Pull request: https://github.com/WebKit/WebKit/pull/13869
Comment 9 EWS 2023-05-15 07:16:59 PDT
Committed 264069@main (5bca27238be0): <https://commits.webkit.org/264069@main>

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