Closed Bug 1277298 Opened 8 years ago Closed 8 years ago

Store the "scrollgrab" flag more efficiently

Categories

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

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla50
Tracking Status
firefox49 --- affected
firefox50 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

(Whiteboard: btpp-active)

Attachments

(1 file)

Bug 912666 added an HTML property named "scrollgrab" (nonstandard, for use by chrome code only) which changes scroll handoff behaviour.

It's currently stored as a boolean in nsGenericHTMLElement, which increases the size of that class by 4 or 8 bytes depending on the platform.

We should store it more efficiently. :smaug suggested using NODE_FLAG_BIT in bug 912666 comment 86.
Whiteboard: btpp-active
Comment on attachment 8760460 [details]
Bug 1277298 - Store the 'scrollgrab' property in a NODE_FLAG_BIT rather than a new field of nsGenericHTMLElement.

https://reviewboard.mozilla.org/r/58022/#review55028

Looks like we have still one more spare bit (on 32bit). nsWrapperCache uses 2, nsINode 20, Element now 6, and nsXULElement for example 3 == 31.
Attachment #8760460 - Flags: review?(bugs) → review+
Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2dbc26e07646
Store the 'scrollgrab' property in a NODE_FLAG_BIT rather than a new field of nsGenericHTMLElement. r=smaug
https://hg.mozilla.org/mozilla-central/rev/2dbc26e07646
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla50
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: