Bug 94811 - Remove redundant check for negative values when using WebCore::Color::alpha()
Summary: Remove redundant check for negative values when using WebCore::Color::alpha()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Bruno Abinader (history only)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-23 07:27 PDT by Bruno Abinader (history only)
Modified: 2012-08-23 11:28 PDT (History)
5 users (show)

See Also:


Attachments
Patch (5.25 KB, patch)
2012-08-23 07:32 PDT, Bruno Abinader (history only)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Abinader (history only) 2012-08-23 07:27:26 PDT
Though alpha() returns a signed value (int), its value is stored on an unsigned typedef (RGBA32) and is safeguarded by alphaChannel() that its value never goes beyond 255, so no integer overflow, thus we can safely remove redundant check for negative values while using it.
Comment 1 Bruno Abinader (history only) 2012-08-23 07:32:35 PDT
Created attachment 160158 [details]
Patch

Proposed patch.
Comment 2 Eric Seidel (no email) 2012-08-23 11:00:23 PDT
Comment on attachment 160158 [details]
Patch

OK.
Comment 3 WebKit Review Bot 2012-08-23 11:28:00 PDT
Comment on attachment 160158 [details]
Patch

Clearing flags on attachment: 160158

Committed r126452: <http://trac.webkit.org/changeset/126452>
Comment 4 WebKit Review Bot 2012-08-23 11:28:04 PDT
All reviewed patches have been landed.  Closing bug.