Bug 85805

Summary: Shrink SVGInlineTextBox object size
Product: WebKit Reporter: Rob Buis <rwlbuis>
Component: SVGAssignee: Rob Buis <rwlbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: eric, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch darin: review+

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.