Changeset 163262 in webkit


Ignore:
Timestamp:
Feb 2, 2014 8:15:20 AM (10 years ago)
Author:
Alan Bujtas
Message:

Subpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
https://bugs.webkit.org/show_bug.cgi?id=128036

Reviewed by Darin Adler.

Source/WebCore:

Covered by existing tests.

  • platform/LayoutUnit.h:

(WebCore::LayoutUnit::operator++):

  • rendering/RenderBoxModelObject.cpp:

(WebCore::BorderEdge::BorderEdge):
(WebCore::BorderEdge::usedWidth):
(WebCore::BorderEdge::getDoubleBorderStripeWidths):
(WebCore::RenderBoxModelObject::paintOneBorderSide):
(WebCore::RenderBoxModelObject::paintBorder):
(WebCore::RenderBoxModelObject::drawBoxSideFromPath):
(WebCore::calculateSideRectIncludingInner):

  • rendering/RenderObject.cpp:

(WebCore::RenderObject::drawLineForBoxSide):

  • rendering/RenderObject.h:
  • rendering/style/BorderData.h:

(WebCore::BorderData::borderLeftWidth):
(WebCore::BorderData::borderRightWidth):
(WebCore::BorderData::borderTopWidth):
(WebCore::BorderData::borderBottomWidth):

  • rendering/style/RenderStyle.cpp:

(WebCore::calcRadiiFor):
(WebCore::calcConstraintScaleFor):
(WebCore::RenderStyle::getRoundedInnerBorderFor):

  • rendering/style/RenderStyle.h:

LayoutTests:

Bug 128061: Subpixel rendering: borders are reporting float values.

  • platform/efl/TestExpectations:
  • platform/gtk/TestExpectations:
  • platform/mac/TestExpectations:
  • platform/win/TestExpectations:
Location:
trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r163244 r163262  
     12014-02-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
     4        https://bugs.webkit.org/show_bug.cgi?id=128036
     5
     6        Reviewed by Darin Adler.
     7
     8        Bug 128061: Subpixel rendering: borders are reporting float values.
     9
     10        * platform/efl/TestExpectations:
     11        * platform/gtk/TestExpectations:
     12        * platform/mac/TestExpectations:
     13        * platform/win/TestExpectations:
     14
    1152014-02-01  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/LayoutTests/platform/efl/TestExpectations

    r163016 r163262  
    18071807
    18081808webkit.org/b/127731 plugins/embed-prefers-plugins-for-images.html [ Failure ]
     1809
     1810# Subpixel rendering: borders are reporting float values.
     1811webkit.org/b/128061 css1/units/length_units.html [ Failure ]
     1812webkit.org/b/128061 fast/css/bidi-override-in-anonymous-block.html [ Failure ]
     1813webkit.org/b/128061 fast/multicol/span/anonymous-style-inheritance.html [ Failure ]
     1814webkit.org/b/128061 fast/repaint/repaint-during-scroll-with-zoom.html [ Failure ]
     1815webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001.htm [ Failure ]
     1816webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-001.htm [ Failure ]
     1817webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-002.htm [ Failure ]
     1818webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-004.htm [ Failure ]
     1819webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001.htm [ Failure ]
     1820webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001.htm [ Failure ]
     1821webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003.htm [ Failure ]
     1822webkit.org/b/128061 media/video-zoom.html [ Failure ]
     1823webkit.org/b/128061 svg/custom/svg-fonts-in-html.html [ Failure ]
     1824webkit.org/b/128061 svg/zoom/page/zoom-background-image-tiled.html [ Failure ]
     1825webkit.org/b/128061 svg/zoom/page/zoom-background-images.html [ Failure ]
     1826webkit.org/b/128061 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
     1827webkit.org/b/128061 svg/zoom/page/zoom-svg-float-border-padding.xml [ Failure ]
     1828webkit.org/b/128061 svg/zoom/page/zoom-svg-through-object-with-auto-size.html [ Failure ]
     1829webkit.org/b/128061 tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
     1830# End of subpixel failures.
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r163014 r163262  
    15361536webkit.org/b/127740 accessibility/range-alter-by-percent.html [ Failure ]
    15371537
     1538# Subpixel rendering: borders are reporting float values.
     1539webkit.org/b/128061 css1/units/length_units.html [ Failure ]
     1540webkit.org/b/128061 fast/css/bidi-override-in-anonymous-block.html [ Failure ]
     1541webkit.org/b/128061 fast/multicol/span/anonymous-style-inheritance.html [ Failure ]
     1542webkit.org/b/128061 fast/repaint/repaint-during-scroll-with-zoom.html [ Failure ]
     1543webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001.htm [ Failure ]
     1544webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-001.htm [ Failure ]
     1545webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-002.htm [ Failure ]
     1546webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-004.htm [ Failure ]
     1547webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001.htm [ Failure ]
     1548webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001.htm [ Failure ]
     1549webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003.htm [ Failure ]
     1550webkit.org/b/128061 media/video-zoom.html [ Failure ]
     1551webkit.org/b/128061 svg/custom/svg-fonts-in-html.html [ Failure ]
     1552webkit.org/b/128061 svg/zoom/page/zoom-background-image-tiled.html [ Failure ]
     1553webkit.org/b/128061 svg/zoom/page/zoom-background-images.html [ Failure ]
     1554webkit.org/b/128061 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
     1555webkit.org/b/128061 svg/zoom/page/zoom-svg-float-border-padding.xml [ Failure ]
     1556webkit.org/b/128061 svg/zoom/page/zoom-svg-through-object-with-auto-size.html [ Failure ]
     1557webkit.org/b/128061 tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
     1558# End of subpixel failures.
     1559
    15381560#////////////////////////////////////////////////////////////////////////////////////////
    15391561# End of Tests failing
  • trunk/LayoutTests/platform/mac/TestExpectations

    r163019 r163262  
    13211321webkit.org/b/126900 svg/zoom/page/zoom-zoom-coords.xhtml [ Failure ]
    13221322
     1323# Subpixel rendering: borders are reporting float values.
     1324webkit.org/b/128061 css1/units/length_units.html [ Failure ]
     1325webkit.org/b/128061 fast/css/bidi-override-in-anonymous-block.html [ Failure ]
     1326webkit.org/b/128061 fast/multicol/span/anonymous-style-inheritance.html [ Failure ]
     1327webkit.org/b/128061 fast/repaint/repaint-during-scroll-with-zoom.html [ Failure ]
     1328webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001.htm [ Failure ]
     1329webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-001.htm [ Failure ]
     1330webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-002.htm [ Failure ]
     1331webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-004.htm [ Failure ]
     1332webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001.htm [ Failure ]
     1333webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001.htm [ Failure ]
     1334webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003.htm [ Failure ]
     1335webkit.org/b/128061 media/video-zoom.html [ Failure ]
     1336webkit.org/b/128061 svg/custom/svg-fonts-in-html.html [ Failure ]
     1337webkit.org/b/128061 svg/zoom/page/zoom-background-image-tiled.html [ Failure ]
     1338webkit.org/b/128061 svg/zoom/page/zoom-background-images.html [ Failure ]
     1339webkit.org/b/128061 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
     1340webkit.org/b/128061 svg/zoom/page/zoom-svg-float-border-padding.xml [ Failure ]
     1341webkit.org/b/128061 svg/zoom/page/zoom-svg-through-object-with-auto-size.html [ Failure ]
     1342webkit.org/b/128061 tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
     1343# End of subpixel failures.
     1344
    13231345webkit.org/b/35297 media/video-display-aspect-ratio.html [ Pass Failure ]
    13241346
  • trunk/LayoutTests/platform/win/TestExpectations

    r162644 r163262  
    28812881# REGRESSION (r159892): Failing JavaScript test
    28822882webkit.org/b/127492 js/dom/date-big-constructor.html [ Failure ]
     2883
     2884# Subpixel rendering: borders are reporting float values.
     2885webkit.org/b/128061 css1/units/length_units.html [ Failure ]
     2886webkit.org/b/128061 fast/css/bidi-override-in-anonymous-block.html [ Failure ]
     2887webkit.org/b/128061 fast/multicol/span/anonymous-style-inheritance.html [ Failure ]
     2888webkit.org/b/128061 fast/repaint/repaint-during-scroll-with-zoom.html [ Failure ]
     2889webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-initial-value-001.htm [ Failure ]
     2890webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-001.htm [ Failure ]
     2891webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-002.htm [ Failure ]
     2892webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-style-004.htm [ Failure ]
     2893webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-three-values-001.htm [ Failure ]
     2894webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-radius-with-two-values-001.htm [ Failure ]
     2895webkit.org/b/128061 ietestcenter/css3/bordersbackgrounds/border-top-left-radius-values-003.htm [ Failure ]
     2896webkit.org/b/128061 media/video-zoom.html [ Failure ]
     2897webkit.org/b/128061 svg/custom/svg-fonts-in-html.html [ Failure ]
     2898webkit.org/b/128061 svg/zoom/page/zoom-background-image-tiled.html [ Failure ]
     2899webkit.org/b/128061 svg/zoom/page/zoom-background-images.html [ Failure ]
     2900webkit.org/b/128061 svg/zoom/page/zoom-img-preserveAspectRatio-support-1.html [ Failure ]
     2901webkit.org/b/128061 svg/zoom/page/zoom-svg-float-border-padding.xml [ Failure ]
     2902webkit.org/b/128061 svg/zoom/page/zoom-svg-through-object-with-auto-size.html [ Failure ]
     2903webkit.org/b/128061 tables/mozilla_expected_failures/bugs/bug1055-2.html [ Failure ]
     2904# End of subpixel failures.
  • trunk/Source/WebCore/ChangeLog

    r163261 r163262  
     12014-02-02  Zalan Bujtas  <zalan@apple.com>
     2
     3        Subpixel rendering: Make BorderEdge/RoundedRect::Radii LayoutUnit aware.
     4        https://bugs.webkit.org/show_bug.cgi?id=128036
     5
     6        Reviewed by Darin Adler.
     7
     8        Covered by existing tests.
     9
     10        * platform/LayoutUnit.h:
     11        (WebCore::LayoutUnit::operator++):
     12        * rendering/RenderBoxModelObject.cpp:
     13        (WebCore::BorderEdge::BorderEdge):
     14        (WebCore::BorderEdge::usedWidth):
     15        (WebCore::BorderEdge::getDoubleBorderStripeWidths):
     16        (WebCore::RenderBoxModelObject::paintOneBorderSide):
     17        (WebCore::RenderBoxModelObject::paintBorder):
     18        (WebCore::RenderBoxModelObject::drawBoxSideFromPath):
     19        (WebCore::calculateSideRectIncludingInner):
     20        * rendering/RenderObject.cpp:
     21        (WebCore::RenderObject::drawLineForBoxSide):
     22        * rendering/RenderObject.h:
     23        * rendering/style/BorderData.h:
     24        (WebCore::BorderData::borderLeftWidth):
     25        (WebCore::BorderData::borderRightWidth):
     26        (WebCore::BorderData::borderTopWidth):
     27        (WebCore::BorderData::borderBottomWidth):
     28        * rendering/style/RenderStyle.cpp:
     29        (WebCore::calcRadiiFor):
     30        (WebCore::calcConstraintScaleFor):
     31        (WebCore::RenderStyle::getRoundedInnerBorderFor):
     32        * rendering/style/RenderStyle.h:
     33
    1342014-02-01  Hunseop Jeong  <hs85.jeong@samsung.com>
    235
  • trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp

    r163190 r163262  
    13971397class BorderEdge {
    13981398public:
    1399     BorderEdge(int edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent = true)
     1399    BorderEdge(LayoutUnit edgeWidth, const Color& edgeColor, EBorderStyle edgeStyle, bool edgeIsTransparent, bool edgeIsPresent = true)
    14001400        : width(edgeWidth)
    14011401        , color(edgeColor)
     
    14431443    }
    14441444
    1445     int usedWidth() const { return isPresent ? width : 0; }
     1445    LayoutUnit usedWidth() const { return isPresent ? width : LayoutUnit::fromPixel(0); }
    14461446   
    1447     void getDoubleBorderStripeWidths(int& outerWidth, int& innerWidth) const
     1447    void getDoubleBorderStripeWidths(LayoutUnit& outerWidth, LayoutUnit& innerWidth) const
    14481448    {
    14491449        int fullWidth = usedWidth();
     
    14591459    }
    14601460   
    1461     int width;
     1461    LayoutUnit width;
    14621462    Color color;
    14631463    EBorderStyle style;
     
    16931693       
    16941694        drawLineForBoxSide(graphicsContext, sideRect.x(), sideRect.y(), sideRect.maxX(), sideRect.maxY(), side, colorToPaint, edgeToRender.style,
    1695                 mitreAdjacentSide1 ? adjacentEdge1.width : 0, mitreAdjacentSide2 ? adjacentEdge2.width : 0, antialias);
     1695            mitreAdjacentSide1 ? adjacentEdge1.width : LayoutUnit::fromPixel(0), mitreAdjacentSide2 ? adjacentEdge2.width : LayoutUnit::fromPixel(0), antialias);
    16961696    }
    16971697}
     
    18821882                LayoutRect outerThirdRect = outerBorder.rect();
    18831883                for (int side = BSTop; side <= BSLeft; ++side) {
    1884                     int outerWidth;
    1885                     int innerWidth;
     1884                    LayoutUnit outerWidth;
     1885                    LayoutUnit innerWidth;
    18861886                    edges[side].getDoubleBorderStripeWidths(outerWidth, innerWidth);
    18871887
     
    20252025    case DOUBLE: {
    20262026        // Get the inner border rects for both the outer border line and the inner border line
    2027         int outerBorderTopWidth;
    2028         int innerBorderTopWidth;
     2027        LayoutUnit outerBorderTopWidth;
     2028        LayoutUnit innerBorderTopWidth;
    20292029        edges[BSTop].getDoubleBorderStripeWidths(outerBorderTopWidth, innerBorderTopWidth);
    20302030
    2031         int outerBorderRightWidth;
    2032         int innerBorderRightWidth;
     2031        LayoutUnit outerBorderRightWidth;
     2032        LayoutUnit innerBorderRightWidth;
    20332033        edges[BSRight].getDoubleBorderStripeWidths(outerBorderRightWidth, innerBorderRightWidth);
    20342034
    2035         int outerBorderBottomWidth;
    2036         int innerBorderBottomWidth;
     2035        LayoutUnit outerBorderBottomWidth;
     2036        LayoutUnit innerBorderBottomWidth;
    20372037        edges[BSBottom].getDoubleBorderStripeWidths(outerBorderBottomWidth, innerBorderBottomWidth);
    20382038
    2039         int outerBorderLeftWidth;
    2040         int innerBorderLeftWidth;
     2039        LayoutUnit outerBorderLeftWidth;
     2040        LayoutUnit innerBorderLeftWidth;
    20412041        edges[BSLeft].getDoubleBorderStripeWidths(outerBorderLeftWidth, innerBorderLeftWidth);
    20422042
     
    22402240{
    22412241    LayoutRect sideRect = outerBorder.rect();
    2242     int width;
     2242    LayoutUnit width;
    22432243
    22442244    switch (side) {
  • trunk/Source/WebCore/rendering/RenderObject.cpp

    r163079 r163262  
    737737}
    738738
    739 void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, int x1, int y1, int x2, int y2,
     739void RenderObject::drawLineForBoxSide(GraphicsContext* graphicsContext, LayoutUnit x1, LayoutUnit y1, LayoutUnit x2, LayoutUnit y2,
    740740    BoxSide side, Color color, EBorderStyle borderStyle, int adjacentWidth1, int adjacentWidth2, bool antialias)
    741741{
    742     int thickness;
    743     int length;
     742    float thickness;
     743    float length;
    744744    if (side == BSTop || side == BSBottom) {
    745745        thickness = y2 - y1;
  • trunk/Source/WebCore/rendering/RenderObject.h

    r162795 r163262  
    883883    RespectImageOrientationEnum shouldRespectImageOrientation() const;
    884884
    885     void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, BoxSide,
     885    void drawLineForBoxSide(GraphicsContext*, LayoutUnit x1, LayoutUnit y1, LayoutUnit x2, LayoutUnit y2, BoxSide,
    886886                            Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
    887887protected:
  • trunk/Source/WebCore/rendering/style/BorderData.h

    r105403 r163262  
    6161    }
    6262   
    63     unsigned borderLeftWidth() const
     63    float borderLeftWidth() const
    6464    {
    6565        if (!m_image.hasImage() && (m_left.style() == BNONE || m_left.style() == BHIDDEN))
     
    6868    }
    6969   
    70     unsigned borderRightWidth() const
     70    float borderRightWidth() const
    7171    {
    7272        if (!m_image.hasImage() && (m_right.style() == BNONE || m_right.style() == BHIDDEN))
     
    7575    }
    7676   
    77     unsigned borderTopWidth() const
     77    float borderTopWidth() const
    7878    {
    7979        if (!m_image.hasImage() && (m_top.style() == BNONE || m_top.style() == BHIDDEN))
     
    8282    }
    8383   
    84     unsigned borderBottomWidth() const
     84    float borderBottomWidth() const
    8585    {
    8686        if (!m_image.hasImage() && (m_bottom.style() == BNONE || m_bottom.style() == BHIDDEN))
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r163152 r163262  
    10691069}
    10701070
    1071 static RoundedRect::Radii calcRadiiFor(const BorderData& border, IntSize size, RenderView* renderView)
     1071static RoundedRect::Radii calcRadiiFor(const BorderData& border, const LayoutSize& size, RenderView* renderView)
    10721072{
    10731073    return RoundedRect::Radii(
    1074         IntSize(valueForLength(border.topLeft().width(), size.width(), renderView),
    1075                 valueForLength(border.topLeft().height(), size.height(), renderView)),
    1076         IntSize(valueForLength(border.topRight().width(), size.width(), renderView),
    1077                 valueForLength(border.topRight().height(), size.height(), renderView)),
    1078         IntSize(valueForLength(border.bottomLeft().width(), size.width(), renderView),
    1079                 valueForLength(border.bottomLeft().height(), size.height(), renderView)),
    1080         IntSize(valueForLength(border.bottomRight().width(), size.width(), renderView),
    1081                 valueForLength(border.bottomRight().height(), size.height(), renderView)));
    1082 }
    1083 
    1084 static float calcConstraintScaleFor(const IntRect& rect, const RoundedRect::Radii& radii)
     1074        LayoutSize(valueForLength(border.topLeft().width(), size.width(), renderView),
     1075            valueForLength(border.topLeft().height(), size.height(), renderView)),
     1076        LayoutSize(valueForLength(border.topRight().width(), size.width(), renderView),
     1077            valueForLength(border.topRight().height(), size.height(), renderView)),
     1078        LayoutSize(valueForLength(border.bottomLeft().width(), size.width(), renderView),
     1079            valueForLength(border.bottomLeft().height(), size.height(), renderView)),
     1080        LayoutSize(valueForLength(border.bottomRight().width(), size.width(), renderView),
     1081            valueForLength(border.bottomRight().height(), size.height(), renderView)));
     1082}
     1083
     1084static float calcConstraintScaleFor(const LayoutRect& rect, const RoundedRect::Radii& radii)
    10851085{
    10861086    // Constrain corner radii using CSS3 rules:
     
    10881088   
    10891089    float factor = 1;
    1090     unsigned radiiSum;
     1090    float radiiSum;
    10911091
    10921092    // top
    1093     radiiSum = static_cast<unsigned>(radii.topLeft().width()) + static_cast<unsigned>(radii.topRight().width()); // Casts to avoid integer overflow.
    1094     if (radiiSum > static_cast<unsigned>(rect.width()))
    1095         factor = std::min(static_cast<float>(rect.width()) / radiiSum, factor);
     1093    radiiSum = radii.topLeft().width() + radii.topRight().width(); // Casts to avoid integer overflow.
     1094    if (radiiSum > rect.width())
     1095        factor = std::min(rect.width() / radiiSum, factor);
    10961096
    10971097    // bottom
    1098     radiiSum = static_cast<unsigned>(radii.bottomLeft().width()) + static_cast<unsigned>(radii.bottomRight().width());
    1099     if (radiiSum > static_cast<unsigned>(rect.width()))
    1100         factor = std::min(static_cast<float>(rect.width()) / radiiSum, factor);
     1098    radiiSum = radii.bottomLeft().width() + radii.bottomRight().width();
     1099    if (radiiSum > rect.width())
     1100        factor = std::min(rect.width() / radiiSum, factor);
    11011101   
    11021102    // left
    1103     radiiSum = static_cast<unsigned>(radii.topLeft().height()) + static_cast<unsigned>(radii.bottomLeft().height());
    1104     if (radiiSum > static_cast<unsigned>(rect.height()))
    1105         factor = std::min(static_cast<float>(rect.height()) / radiiSum, factor);
     1103    radiiSum = radii.topLeft().height() + radii.bottomLeft().height();
     1104    if (radiiSum > rect.height())
     1105        factor = std::min(rect.height() / radiiSum, factor);
    11061106   
    11071107    // right
    1108     radiiSum = static_cast<unsigned>(radii.topRight().height()) + static_cast<unsigned>(radii.bottomRight().height());
    1109     if (radiiSum > static_cast<unsigned>(rect.height()))
    1110         factor = std::min(static_cast<float>(rect.height()) / radiiSum, factor);
     1108    radiiSum = radii.topRight().height() + radii.bottomRight().height();
     1109    if (radiiSum > rect.height())
     1110        factor = std::min(rect.height() / radiiSum, factor);
    11111111   
    11121112    ASSERT(factor <= 1);
     
    11471147    bool horizontal = isHorizontalWritingMode();
    11481148
    1149     int leftWidth = (!horizontal || includeLogicalLeftEdge) ? borderLeftWidth() : 0;
    1150     int rightWidth = (!horizontal || includeLogicalRightEdge) ? borderRightWidth() : 0;
    1151     int topWidth = (horizontal || includeLogicalLeftEdge) ? borderTopWidth() : 0;
    1152     int bottomWidth = (horizontal || includeLogicalRightEdge) ? borderBottomWidth() : 0;
     1149    LayoutUnit leftWidth = (!horizontal || includeLogicalLeftEdge) ? borderLeftWidth() : 0;
     1150    LayoutUnit rightWidth = (!horizontal || includeLogicalRightEdge) ? borderRightWidth() : 0;
     1151    LayoutUnit topWidth = (horizontal || includeLogicalLeftEdge) ? borderTopWidth() : 0;
     1152    LayoutUnit bottomWidth = (horizontal || includeLogicalRightEdge) ? borderBottomWidth() : 0;
    11531153
    11541154    return getRoundedInnerBorderFor(borderRect, topWidth, bottomWidth, leftWidth, rightWidth, includeLogicalLeftEdge, includeLogicalRightEdge);
    11551155}
    11561156
    1157 RoundedRect RenderStyle::getRoundedInnerBorderFor(const LayoutRect& borderRect,
    1158     int topWidth, int bottomWidth, int leftWidth, int rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
     1157RoundedRect RenderStyle::getRoundedInnerBorderFor(const LayoutRect& borderRect, LayoutUnit topWidth, LayoutUnit bottomWidth,
     1158    LayoutUnit leftWidth, LayoutUnit rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
    11591159{
    11601160    LayoutRect innerRect(borderRect.x() + leftWidth,
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r163152 r163262  
    10891089    RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, bool includeLogicalLeftEdge = true, bool includeLogicalRightEdge = true) const;
    10901090
    1091     RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect,
    1092         int topWidth, int bottomWidth, int leftWidth, int rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
     1091    RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect, LayoutUnit topWidth, LayoutUnit bottomWidth,
     1092        LayoutUnit leftWidth, LayoutUnit rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
    10931093
    10941094    void setBorderLeftWidth(float v) { SET_VAR(surround, border.m_left.m_width, v); }
Note: See TracChangeset for help on using the changeset viewer.