Ticket #9728: rounded-rect.patch

File rounded-rect.patch, 1.5 KB (added by thebuck, 2 years ago)

unrelated border-radius patch: the background of a box with border-radius has bottom left corner use bottom-right radius for its y-radius while x-radius and border stroke are correct. Otherwise I think border-radius looks perfect these days...

  • Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp

    diff --git a/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp b/Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
    index d13bc11c63..c575c72e3d 100644
    a b void GraphicsContextHaiku::fillRoundedRectImpl(const FloatRoundedRect& roundRect  
    210210    const float kRadiusBezierScale = 1.0f - 0.5522847498f; //  1 - (sqrt(2) - 1) * 4 / 3
    211211
    212212    BShape shape;
    213     shape.MoveTo(BPoint(rect.x() + topLeft.width(), rect.y()));
    214     shape.LineTo(BPoint(rect.maxX() - topRight.width(), rect.y()));
     213    shape.MoveTo(BPoint(rect.maxX() - topRight.width(), rect.y()));
    215214    points[0].x = rect.maxX() - kRadiusBezierScale * topRight.width();
    216215    points[0].y = rect.y();
    217216    points[1].x = rect.maxX();
    void GraphicsContextHaiku::fillRoundedRectImpl(const FloatRoundedRect& roundRect  
    231230    points[0].x = rect.x() + kRadiusBezierScale * bottomLeft.width();
    232231    points[0].y = rect.maxY();
    233232    points[1].x = rect.x();
    234     points[1].y = rect.maxY() - kRadiusBezierScale * bottomRight.height();
     233    points[1].y = rect.maxY() - kRadiusBezierScale * bottomLeft.height();
    235234    points[2].x = rect.x();
    236     points[2].y = rect.maxY() - bottomRight.height();
     235    points[2].y = rect.maxY() - bottomLeft.height();
    237236    shape.BezierTo(points);
    238237    shape.LineTo(BPoint(rect.x(), rect.y() + topLeft.height()));
    239238    points[0].x = rect.x();