Bug 99919 - BasicShapePolygon::path takes width instead of height for boundary calculation
Summary: BasicShapePolygon::path takes width instead of height for boundary calculation
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Dirk Schulze
URL:
Keywords:
Depends on:
Blocks: 95389
  Show dependency treegraph
 
Reported: 2012-10-20 19:35 PDT by Dirk Schulze
Modified: 2012-10-23 13:17 PDT (History)
3 users (show)

See Also:


Attachments
Patch (3.99 KB, patch)
2012-10-22 15:39 PDT, Dirk Schulze
darin: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Schulze 2012-10-20 19:35:43 PDT
BasicShapePolygon::path takes width instead of height for calculation.

    path.moveTo(FloatPoint(floatValueForLength(m_values.at(0), boundingBox.width()) + boundingBox.x(),
                           floatValueForLength(m_values.at(1), boundingBox.width()) + boundingBox.y()));
    for (size_t i = 2; i < length; i = i + 2) {
        path.addLineTo(FloatPoint(floatValueForLength(m_values.at(i), boundingBox.width()) + boundingBox.x(),
                                  floatValueForLength(m_values.at(i + 1), boundingBox.width()) + boundingBox.y()));

Realized it on writing further tests. Will come up with a patch soon.
Comment 1 Dirk Schulze 2012-10-22 15:39:10 PDT
Created attachment 170003 [details]
Patch
Comment 2 Darin Adler 2012-10-22 18:19:18 PDT
Comment on attachment 170003 [details]
Patch

The test seems a little too oblique to me. I’d put some explanatory text in it. Since it’s a ref test, the text would not make it any more prone to failure on different platforms and could make it self documenting.
Comment 3 Dirk Schulze 2012-10-23 13:17:50 PDT
Committed r132257: <http://trac.webkit.org/changeset/132257>