Bug 85805 - Shrink SVGInlineTextBox object size
Summary: Shrink SVGInlineTextBox object size
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Rob Buis
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-07 09:31 PDT by Rob Buis
Modified: 2012-05-07 13:27 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.38 KB, patch)
2012-05-07 09:47 PDT, Rob Buis
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rob Buis 2012-05-07 09:31:09 PDT
The way we use bitpacking here is not ideal.
Comment 1 Rob Buis 2012-05-07 09:47:05 PDT
Created attachment 140541 [details]
Patch
Comment 2 Darin Adler 2012-05-07 10:37:13 PDT
Comment on attachment 140541 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=140541&action=review

Where’s the compile-time size assertion for this class?

> Source/WebCore/rendering/svg/SVGInlineTextBox.h:86
> +    unsigned m_paintingResourceMode : 4;

When we add a new mode, what will point someone here to add more bits? I am worried that this mode is defined in another file, and someone modifying it would have no reason to look here. Maybe a comment in the file that defines the enum?
Comment 3 Rob Buis 2012-05-07 13:27:05 PDT
(In reply to comment #2)
> (From update of attachment 140541 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=140541&action=review
> 
> Where’s the compile-time size assertion for this class?
> 
> > Source/WebCore/rendering/svg/SVGInlineTextBox.h:86
> > +    unsigned m_paintingResourceMode : 4;
> 
> When we add a new mode, what will point someone here to add more bits? I am worried that this mode is defined in another file, and someone modifying it would have no reason to look here. Maybe a comment in the file that defines the enum?

I fixed both before landing it in r116343.
Cheers,

Rob.