Bug 20086 - Assertion about creating Length with percentage value when blending transforms
Summary: Assertion about creating Length with percentage value when blending transforms
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-17 14:31 PDT by Simon Fraser (smfr)
Modified: 2008-07-18 14:49 PDT (History)
1 user (show)

See Also:


Attachments
Testcase; asserts in debug build on hover. (801 bytes, text/html)
2008-07-17 14:33 PDT, Simon Fraser (smfr)
no flags Details
Patch, changelog (1.66 KB, patch)
2008-07-17 14:40 PDT, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 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);
        }
Comment 1 Simon Fraser (smfr) 2008-07-17 14:33:26 PDT
Created attachment 22351 [details]
Testcase; asserts in debug build on hover.
Comment 2 Simon Fraser (smfr) 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.
Comment 3 Simon Fraser (smfr) 2008-07-17 14:40:32 PDT
Created attachment 22352 [details]
Patch, changelog
Comment 4 Dave Hyatt 2008-07-18 12:17:50 PDT
Comment on attachment 22352 [details]
Patch, changelog

r=me
Comment 5 Simon Fraser (smfr) 2008-07-18 14:49:02 PDT
Fixed in r35238.