Bug 119523

Summary: Improper Calculation of In-band Cue Colors
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: MediaAssignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal    
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch eric.carlson: review+

Brent Fulgham
Reported 2013-08-06 10:14:12 PDT
The logic used to convert the attributed strings from In-band caption content was improperly converting from floating point values to byte values. We are getting a directive to draw 100% opaque black background in TextTrackCueGenericBoxElement::applyCSSProperties. This is coming from the cue's background color property. It looks like the code in InbandTextTrackPrivateAVF.cpp (makeRGBA32FromARGBCFArray) is improperly converting from floating point values to bytes. I see a 50% opacity value coming into the function, which is multiplied by 255 when being passed to the makeRGBA32FromFloats function. That function calls 'colorFloatToRGBAByte', which performs a bounded multiplication by 255. This means we have (0.5 * 255) * 255 -> 125 * (255) -> the max of 255. If I take away the outer (redundant) multiplication by 255, I get correct behavior.
Attachments
Patch (1.42 KB, patch)
2013-08-06 10:16 PDT, Brent Fulgham
eric.carlson: review+
Brent Fulgham
Comment 1 2013-08-06 10:14:36 PDT
Brent Fulgham
Comment 2 2013-08-06 10:16:29 PDT
Brent Fulgham
Comment 3 2013-08-06 11:38:57 PDT
Note You need to log in before you can comment on or make changes to this bug.