Bug 20086

Summary: Assertion about creating Length with percentage value when blending transforms
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: dino
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Testcase; asserts in debug build on hover.
none
Patch, changelog hyatt: review+

Simon Fraser (smfr)
Reported 2008-07-17 14:31:16 PDT
In the attached testcase, hover over the blue box. It asserts here: Length(int v, LengthType t, bool q = false) : m_value((v * 16) | (q << 3) | t) // FIXME: Doesn't work if the passed-in value is very large! { ASSERT(t != Percent); }
Attachments
Testcase; asserts in debug build on hover. (801 bytes, text/html)
2008-07-17 14:33 PDT, Simon Fraser (smfr)
no flags
Patch, changelog (1.66 KB, patch)
2008-07-17 14:40 PDT, Simon Fraser (smfr)
hyatt: review+
Simon Fraser (smfr)
Comment 1 2008-07-17 14:33:26 PDT
Created attachment 22351 [details] Testcase; asserts in debug build on hover.
Simon Fraser (smfr)
Comment 2 2008-07-17 14:37:03 PDT
The issue is that Length(0, m_x.type()).blend(m_x, progress) creates a Length() using a value of 0 and the type from m_x, which can be percentage. This asserts in the Length ctor. Instead, we use Length(m_x.type()).blend(m_x, progress) which just constructs a Length with the right type, and blends that.
Simon Fraser (smfr)
Comment 3 2008-07-17 14:40:32 PDT
Created attachment 22352 [details] Patch, changelog
Dave Hyatt
Comment 4 2008-07-18 12:17:50 PDT
Comment on attachment 22352 [details] Patch, changelog r=me
Simon Fraser (smfr)
Comment 5 2008-07-18 14:49:02 PDT
Fixed in r35238.
Note You need to log in before you can comment on or make changes to this bug.