Changeset 90045 in webkit
- Timestamp:
- Jun 29, 2011 2:25:59 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r90042 r90045 1 2011-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 1 20 2011-06-29 Chris Rogers <crogers@google.com> 2 21 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r89969 r90045 3402 3402 l = Length(primitiveValue->computeLength<double>(style, rootStyle, multiplier), Fixed); 3403 3403 else 3404 l = Length(primitiveValue->computeLengthIntForLength(style, rootStyle, multiplier), Fixed);3404 l = primitiveValue->computeLength<Length>(style, rootStyle, multiplier); 3405 3405 } 3406 3406 else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) … … 3935 3935 Length length; 3936 3936 if (CSSPrimitiveValue::isUnitTypeLength(type)) 3937 length = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);3937 length = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); 3938 3938 else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) 3939 3939 length = Length(primitiveValue->getDoubleValue(), Percent); … … 4052 4052 multiplier *= frame->textZoomFactor(); 4053 4053 } 4054 lineHeight = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, multiplier), Fixed);4054 lineHeight = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, multiplier); 4055 4055 } else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) 4056 4056 lineHeight = Length((m_style->fontSize() * primitiveValue->getIntValue()) / 100, Fixed); … … 4618 4618 reflection->setOffset(Length(reflectValue->offset()->getDoubleValue(), Percent)); 4619 4619 else 4620 reflection->setOffset( Length(reflectValue->offset()->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed));4620 reflection->setOffset(reflectValue->offset()->computeLength<Length>(style(), m_rootElementStyle, zoomFactor)); 4621 4621 } 4622 4622 NinePieceImage mask; … … 5443 5443 if (!CSSPrimitiveValue::isUnitTypeLength(type1)) 5444 5444 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); 5447 5447 } else { 5448 5448 // <page-size> <orientation> … … 5462 5462 // <length> 5463 5463 pageSizeType = PAGE_SIZE_RESOLVED; 5464 width = height = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle), Fixed);5464 width = height = primitiveValue->computeLength<Length>(style(), m_rootElementStyle); 5465 5465 } else { 5466 5466 if (type != CSSPrimitiveValue::CSS_IDENT) … … 5563 5563 Length CSSStyleSelector::mmLength(double mm) const 5564 5564 { 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); 5566 5566 } 5567 5567 5568 5568 Length CSSStyleSelector::inchLength(double inch) const 5569 5569 { 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); 5571 5571 } 5572 5572 … … 5735 5735 firstLength = Length(Auto); 5736 5736 else if (CSSPrimitiveValue::isUnitTypeLength(firstType)) 5737 firstLength = Length(first->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);5737 firstLength = first->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); 5738 5738 else if (firstType == CSSPrimitiveValue::CSS_PERCENTAGE) 5739 5739 firstLength = Length(first->getDoubleValue(), Percent); … … 5744 5744 secondLength = Length(Auto); 5745 5745 else if (CSSPrimitiveValue::isUnitTypeLength(secondType)) 5746 secondLength = Length(second->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);5746 secondLength = second->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); 5747 5747 else if (secondType == CSSPrimitiveValue::CSS_PERCENTAGE) 5748 5748 secondLength = Length(second->getDoubleValue(), Percent); … … 5771 5771 int type = primitiveValue->primitiveType(); 5772 5772 if (CSSPrimitiveValue::isUnitTypeLength(type)) 5773 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);5773 l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); 5774 5774 else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) 5775 5775 l = Length(primitiveValue->getDoubleValue(), Percent); … … 5795 5795 int type = primitiveValue->primitiveType(); 5796 5796 if (CSSPrimitiveValue::isUnitTypeLength(type)) 5797 l = Length(primitiveValue->computeLengthIntForLength(style(), m_rootElementStyle, zoomFactor), Fixed);5797 l = primitiveValue->computeLength<Length>(style(), m_rootElementStyle, zoomFactor); 5798 5798 else if (type == CSSPrimitiveValue::CSS_PERCENTAGE) 5799 5799 l = Length(primitiveValue->getDoubleValue(), Percent);
Note: See TracChangeset
for help on using the changeset viewer.