Closed Bug 1591087 Opened 6 years ago Closed 6 years ago

Add some more HTML*Element sizeof assertions

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla72
Tracking Status
firefox72 --- fixed

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(1 file)

Gecko has some more elements which have the same size as div and span. We could assert the sizeof at least some of the common ones to prevent accidental regressions.

Out of curiosity, how did you find these elements?

Flags: needinfo?(bugs)
Pushed by opettay@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5458333aaa26 Add some more HTML*Element sizeof assertions, r=Ehsan

find? I was just looking at some element implementations and thought which ones might be common.
Unfortunately I don't have data about which are the most common ones.
There is https://raw.githack.com/operasoftware/devopera-static-backup/master/http/dev.opera.com/articles/view/mama-basic-document-structure/index.html#elems but that doesn't answer to the question I want.

I'd like to add static_asserts for other cases too, but still in process trying to find which elements are really the most common ones.
We probably don't need to care too much about rarely used elements.

input element, which is massive, has its own assert
https://searchfox.org/mozilla-central/rev/2a355e56c490768be676689de18629485c9d699b/dom/html/HTMLInputElement.cpp#997-1000

Flags: needinfo?(bugs)
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla72
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: