Changeset 90045 in webkit


Ignore:
Timestamp:
Jun 29, 2011 2:25:59 PM (13 years ago)
Author:
macpherson@chromium.org
Message:

2011-06-29 Luke Macpherson <macpherson@chromium.org>

Reviewed by Darin Adler.

Convert uses of computeLengthIntForLength() to computeLength<Length>()
https://bugs.webkit.org/show_bug.cgi?id=63641

No new tests / refactoring only.

  • css/CSSStyleSelector.cpp: (WebCore::convertToLength): (WebCore::CSSStyleSelector::applyProperty): (WebCore::CSSStyleSelector::applyPageSizeProperty): (WebCore::CSSStyleSelector::mmLength): (WebCore::CSSStyleSelector::inchLength): (WebCore::CSSStyleSelector::mapFillSize): (WebCore::CSSStyleSelector::mapFillXPosition): (WebCore::CSSStyleSelector::mapFillYPosition):
Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r90042 r90045  
     12011-06-29  Luke Macpherson   <macpherson@chromium.org>
     2
     3        Reviewed by Darin Adler.
     4
     5        Convert uses of computeLengthIntForLength() to computeLength<Length>()
     6        https://bugs.webkit.org/show_bug.cgi?id=63641
     7
     8        No new tests / refactoring only.
     9
     10        * css/CSSStyleSelector.cpp:
     11        (WebCore::convertToLength):
     12        (WebCore::CSSStyleSelector::applyProperty):
     13        (WebCore::CSSStyleSelector::applyPageSizeProperty):
     14        (WebCore::CSSStyleSelector::mmLength):
     15        (WebCore::CSSStyleSelector::inchLength):
     16        (WebCore::CSSStyleSelector::mapFillSize):
     17        (WebCore::CSSStyleSelector::mapFillXPosition):
     18        (WebCore::CSSStyleSelector::mapFillYPosition):
     19
    1202011-06-29  Chris Rogers  <crogers@google.com>
    221
  • trunk/Source/WebCore/css/CSSStyleSelector.cpp

    r89969 r90045  
    34023402                l = Length(primitiveValue->computeLength<double>(style, rootStyle, multiplier), Fixed);
    34033403            else
    3404                 l = Length(primitiveValue->computeLengthIntForLength(style, rootStyle, multiplier), Fixed);
     3404                l = primitiveValue->computeLength<Length>(style, rootStyle, multiplier);
    34053405        }
    34063406        else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
     
    39353935        Length length;
    39363936        if (CSSPrimitiveValue::isUnitTypeLength(type))
    3937             length = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
     3937            length = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
    39383938        else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
    39393939            length = Length(primitiveValue->getDoubleValue(), Percent);
     
    40524052                    multiplier *= frame->textZoomFactor();
    40534053            }
    4054             lineHeight = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle,  multiplier), Fixed);
     4054            lineHeight = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, multiplier);
    40554055        } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
    40564056            lineHeight = Length((m_style->fontSize() * primitiveValue->getIntValue()) / 100, Fixed);
     
    46184618                reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent));
    46194619            else
    4620                 reflection->setOffset(Length(reflectValue->offset()->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed));
     4620                reflection->setOffset(reflectValue->offset()->computeLength<Length>(style(), m_rootElementStyle, zoomFactor));
    46214621        }
    46224622        NinePieceImage mask;
     
    54435443            if (!CSSPrimitiveValue::isUnitTypeLength(type1))
    54445444                return;
    5445             width = Length(primitiveValue0->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
    5446             height = Length(primitiveValue1->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
     5445            width = primitiveValue0->computeLength<Length>(style(), m_rootElementStyle);
     5446            height = primitiveValue1->computeLength<Length>(style(), m_rootElementStyle);
    54475447        } else {
    54485448            // <page-size> <orientation>
     
    54625462            // <length>
    54635463            pageSizeType = PAGE_SIZE_RESOLVED;
    5464             width = height = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
     5464            width = height = primitiveValue->computeLength<Length>(style(), m_rootElementStyle);
    54655465        } else {
    54665466            if (type != CSSPrimitiveValue::CSS_IDENT)
     
    55635563Length CSSStyleSelector::mmLength(double mm) const
    55645564{
    5565     return Length(CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
     5565    return CSSPrimitiveValue::create(mm, CSSPrimitiveValue::CSS_MM)->computeLength<Length>(style(), m_rootElementStyle);
    55665566}
    55675567
    55685568Length CSSStyleSelector::inchLength(double inch) const
    55695569{
    5570     return Length(CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);
     5570    return CSSPrimitiveValue::create(inch, CSSPrimitiveValue::CSS_IN)->computeLength<Length>(style(), m_rootElementStyle);
    55715571}
    55725572
     
    57355735        firstLength = Length(Auto);
    57365736    else if (CSSPrimitiveValue::isUnitTypeLength(firstType))
    5737         firstLength = Length(first->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
     5737        firstLength = first->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
    57385738    else if (firstType == CSSPrimitiveValue::CSS_PERCENTAGE)
    57395739        firstLength = Length(first->getDoubleValue(), Percent);
     
    57445744        secondLength = Length(Auto);
    57455745    else if (CSSPrimitiveValue::isUnitTypeLength(secondType))
    5746         secondLength = Length(second->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
     5746        secondLength = second->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
    57475747    else if (secondType == CSSPrimitiveValue::CSS_PERCENTAGE)
    57485748        secondLength = Length(second->getDoubleValue(), Percent);
     
    57715771    int type = primitiveValue->primitiveType();
    57725772    if (CSSPrimitiveValue::isUnitTypeLength(type))
    5773         l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
     5773        l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
    57745774    else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
    57755775        l = Length(primitiveValue->getDoubleValue(), Percent);
     
    57955795    int type = primitiveValue->primitiveType();
    57965796    if (CSSPrimitiveValue::isUnitTypeLength(type))
    5797         l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);
     5797        l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor);
    57985798    else if (type == CSSPrimitiveValue::CSS_PERCENTAGE)
    57995799        l = Length(primitiveValue->getDoubleValue(), Percent);
Note: See TracChangeset for help on using the changeset viewer.