Changeset 140213 in webkit


Ignore:
Timestamp:
Jan 18, 2013 3:22:26 PM (11 years ago)
Author:
eae@chromium.org
Message:

Change RenderStyle::getRoundedInnerBorderFor to take ints for border widths
https://bugs.webkit.org/show_bug.cgi?id=107331

Reviewed by Levi Weintraub.

Borders are always represented as ints yet RenderStyle::
getRoundedInnerBorderFor upcasts from int to LayoutUnit when
calling getRoundedInnerBorderFor.

No new tests, no change in functionality.

  • rendering/style/RenderStyle.cpp:

(WebCore::RenderStyle::getRoundedInnerBorderFor):

  • rendering/style/RenderStyle.h:

Change getRoundedInnerBorderFor to use ints for border widths.

Location:
trunk/Source/WebCore
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r140212 r140213  
     12013-01-18  Emil A Eklund  <eae@chromium.org>
     2
     3        Change RenderStyle::getRoundedInnerBorderFor to take ints for border widths
     4        https://bugs.webkit.org/show_bug.cgi?id=107331
     5
     6        Reviewed by Levi Weintraub.
     7       
     8        Borders are always represented as ints yet RenderStyle::
     9        getRoundedInnerBorderFor upcasts from int to LayoutUnit when
     10        calling getRoundedInnerBorderFor.
     11
     12        No new tests, no change in functionality.
     13
     14        * rendering/style/RenderStyle.cpp:
     15        (WebCore::RenderStyle::getRoundedInnerBorderFor):
     16        * rendering/style/RenderStyle.h:
     17        Change getRoundedInnerBorderFor to use ints for border widths.
     18
    1192013-01-18  Adam Barth  <abarth@webkit.org>
    220
  • trunk/Source/WebCore/rendering/style/RenderStyle.cpp

    r140068 r140213  
    10021002    bool horizontal = isHorizontalWritingMode();
    10031003
    1004     LayoutUnit leftWidth = (!horizontal || includeLogicalLeftEdge) ? borderLeftWidth() : 0;
    1005     LayoutUnit rightWidth = (!horizontal || includeLogicalRightEdge) ? borderRightWidth() : 0;
    1006     LayoutUnit topWidth = (horizontal || includeLogicalLeftEdge) ? borderTopWidth() : 0;
    1007     LayoutUnit bottomWidth = (horizontal || includeLogicalRightEdge) ? borderBottomWidth() : 0;
     1004    int leftWidth = (!horizontal || includeLogicalLeftEdge) ? borderLeftWidth() : 0;
     1005    int rightWidth = (!horizontal || includeLogicalRightEdge) ? borderRightWidth() : 0;
     1006    int topWidth = (horizontal || includeLogicalLeftEdge) ? borderTopWidth() : 0;
     1007    int bottomWidth = (horizontal || includeLogicalRightEdge) ? borderBottomWidth() : 0;
    10081008
    10091009    return getRoundedInnerBorderFor(borderRect, topWidth, bottomWidth, leftWidth, rightWidth, includeLogicalLeftEdge, includeLogicalRightEdge);
     
    10111011
    10121012RoundedRect RenderStyle::getRoundedInnerBorderFor(const LayoutRect& borderRect,
    1013     LayoutUnit topWidth, LayoutUnit bottomWidth, LayoutUnit leftWidth, LayoutUnit rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
     1013    int topWidth, int bottomWidth, int leftWidth, int rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const
    10141014{
    10151015    LayoutRect innerRect(borderRect.x() + leftWidth,
  • trunk/Source/WebCore/rendering/style/RenderStyle.h

    r140068 r140213  
    10461046
    10471047    RoundedRect getRoundedInnerBorderFor(const LayoutRect& borderRect,
    1048         LayoutUnit topWidth, LayoutUnit bottomWidth, LayoutUnit leftWidth, LayoutUnit rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
     1048        int topWidth, int bottomWidth, int leftWidth, int rightWidth, bool includeLogicalLeftEdge, bool includeLogicalRightEdge) const;
    10491049
    10501050    void setBorderLeftWidth(unsigned v) { SET_VAR(surround, border.m_left.m_width, v); }
Note: See TracChangeset for help on using the changeset viewer.