Bug 93572 - Append the unit in place when generating the text value of a CSSPrimitiveValue
Summary: Append the unit in place when generating the text value of a CSSPrimitiveValue
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore JavaScript (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Benjamin Poulain
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-08 19:59 PDT by Benjamin Poulain
Modified: 2012-08-09 16:50 PDT (History)
4 users (show)

See Also:


Attachments
Patch (6.80 KB, patch)
2012-08-08 20:33 PDT, Benjamin Poulain
kling: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Poulain 2012-08-08 19:59:11 PDT
Append the unit in place when generating the text value of a CSSPrimitiveValue
Comment 1 Benjamin Poulain 2012-08-08 20:33:41 PDT
Created attachment 157379 [details]
Patch
Comment 2 Andreas Kling 2012-08-09 05:02:52 PDT
Comment on attachment 157379 [details]
Patch

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

r=me, great idea.

> Source/WebCore/css/CSSPrimitiveValue.cpp:835
> -    StringBuffer<UChar> buffer(decimal.bufferLengthForStringDecimal());
> +    StringBuffer<UChar> buffer(decimal.bufferLengthForStringDecimal() + suffixLength);

Could this also be made to use LChar/8-bit strings?
Comment 3 Benjamin Poulain 2012-08-09 10:46:50 PDT
> > Source/WebCore/css/CSSPrimitiveValue.cpp:835
> > -    StringBuffer<UChar> buffer(decimal.bufferLengthForStringDecimal());
> > +    StringBuffer<UChar> buffer(decimal.bufferLengthForStringDecimal() + suffixLength);
> 
> Could this also be made to use LChar/8-bit strings?

Yep, I had been thinking the exact same thing when writing that :)
Comment 4 Benjamin Poulain 2012-08-09 16:50:12 PDT
Committed r125221: <http://trac.webkit.org/changeset/125221>