Bug 65441 - Clean up value clamping in CSSStyleSelector and CSSPrimitiveValue.
Summary: Clean up value clamping in CSSStyleSelector and CSSPrimitiveValue.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Luke Macpherson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-31 21:07 PDT by Luke Macpherson
Modified: 2011-08-02 19:11 PDT (History)
5 users (show)

See Also:


Attachments
Patch (4.91 KB, patch)
2011-07-31 21:10 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff
Patch for landing (4.91 KB, patch)
2011-08-02 18:02 PDT, Luke Macpherson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Macpherson 2011-07-31 21:07:10 PDT
Clean up value clampling in CSSStyleSelector and CSSPrimitiveValue.
Comment 1 Luke Macpherson 2011-07-31 21:10:08 PDT
Created attachment 102472 [details]
Patch
Comment 2 Simon Fraser (smfr) 2011-08-02 16:39:32 PDT
Comment on attachment 102472 [details]
Patch

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

> Source/WebCore/css/CSSStyleSelector.cpp:4511
> +        m_style->setOpacity(clampTo<float>(primitiveValue->getDoubleValue(), 0.0, 1.0));

Won't this cause warnings in 64-bit builds? You don't need the .0 on the literals.
Comment 3 Luke Macpherson 2011-08-02 17:38:17 PDT
Comment on attachment 102472 [details]
Patch

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

>> Source/WebCore/css/CSSStyleSelector.cpp:4511
>> +        m_style->setOpacity(clampTo<float>(primitiveValue->getDoubleValue(), 0.0, 1.0));
> 
> Won't this cause warnings in 64-bit builds? You don't need the .0 on the literals.

done.
Comment 4 Luke Macpherson 2011-08-02 18:02:10 PDT
Created attachment 102725 [details]
Patch for landing
Comment 5 WebKit Review Bot 2011-08-02 19:11:23 PDT
Comment on attachment 102725 [details]
Patch for landing

Clearing flags on attachment: 102725

Committed r92253: <http://trac.webkit.org/changeset/92253>
Comment 6 WebKit Review Bot 2011-08-02 19:11:28 PDT
All reviewed patches have been landed.  Closing bug.