Changeset 121289 in webkit for trunk/Source/WebCore/css/CSSToStyleMap.cpp
- Timestamp:
- Jun 26, 2012, 2:35:55 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/css/CSSToStyleMap.cpp
r121285 r121289 52 52 } 53 53 54 RenderStyle* CSSToStyleMap::parentStyle() const55 {56 return m_resolver->parentStyle();57 }58 59 54 bool CSSToStyleMap::useSVGZoomRules() const 60 55 { … … 204 199 CSSPrimitiveValue* first = static_cast<CSSPrimitiveValue*>(pair->first()); 205 200 CSSPrimitiveValue* second = static_cast<CSSPrimitiveValue*>(pair->second()); 206 firstLength = first->convertToLength<AnyConversion>(style(), rootElementStyle(), parentStyle(),zoomFactor);207 secondLength = second->convertToLength<AnyConversion>(style(), rootElementStyle(), parentStyle(),zoomFactor);201 firstLength = first->convertToLength<AnyConversion>(style(), rootElementStyle(), zoomFactor); 202 secondLength = second->convertToLength<AnyConversion>(style(), rootElementStyle(), zoomFactor); 208 203 } else { 209 firstLength = primitiveValue->convertToLength<AnyConversion>(style(), rootElementStyle(), parentStyle(),zoomFactor);204 firstLength = primitiveValue->convertToLength<AnyConversion>(style(), rootElementStyle(), zoomFactor); 210 205 secondLength = Length(); 211 206 } … … 234 229 Length length; 235 230 if (primitiveValue->isLength()) 236 length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), parentStyle(),zoomFactor);231 length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), zoomFactor); 237 232 else if (primitiveValue->isPercentage()) 238 233 length = Length(primitiveValue->getDoubleValue(), Percent); 239 234 else if (primitiveValue->isCalculatedPercentageWithLength()) 240 length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), parentStyle(),zoomFactor));235 length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), zoomFactor)); 241 236 else if (primitiveValue->isViewportPercentageLength()) 242 237 length = primitiveValue->viewportPercentageLength(); … … 261 256 Length length; 262 257 if (primitiveValue->isLength()) 263 length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), parentStyle(),zoomFactor);258 length = primitiveValue->computeLength<Length>(style(), rootElementStyle(), zoomFactor); 264 259 else if (primitiveValue->isPercentage()) 265 260 length = Length(primitiveValue->getDoubleValue(), Percent); 266 261 else if (primitiveValue->isCalculatedPercentageWithLength()) 267 length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), parentStyle(),zoomFactor));262 length = Length(primitiveValue->cssCalcValue()->toCalcValue(style(), rootElementStyle(), zoomFactor)); 268 263 else if (primitiveValue->isViewportPercentageLength()) 269 264 length = primitiveValue->viewportPercentageLength(); … … 588 583 box.m_top = Length(slices->top()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent); 589 584 else if (slices->top()->getIdent() != CSSValueAuto) 590 box.m_top = slices->top()->computeLength<Length>(style(), rootElementStyle(), parentStyle(),zoom);585 box.m_top = slices->top()->computeLength<Length>(style(), rootElementStyle(), zoom); 591 586 592 587 if (slices->right()->isNumber()) … … 595 590 box.m_right = Length(slices->right()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent); 596 591 else if (slices->right()->getIdent() != CSSValueAuto) 597 box.m_right = slices->right()->computeLength<Length>(style(), rootElementStyle(), parentStyle(),zoom);592 box.m_right = slices->right()->computeLength<Length>(style(), rootElementStyle(), zoom); 598 593 599 594 if (slices->bottom()->isNumber()) … … 602 597 box.m_bottom = Length(slices->bottom()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent); 603 598 else if (slices->bottom()->getIdent() != CSSValueAuto) 604 box.m_bottom = slices->bottom()->computeLength<Length>(style(), rootElementStyle(), parentStyle(),zoom);599 box.m_bottom = slices->bottom()->computeLength<Length>(style(), rootElementStyle(), zoom); 605 600 606 601 if (slices->left()->isNumber()) … … 609 604 box.m_left = Length(slices->left()->getDoubleValue(CSSPrimitiveValue::CSS_PERCENTAGE), Percent); 610 605 else if (slices->left()->getIdent() != CSSValueAuto) 611 box.m_left = slices->left()->computeLength<Length>(style(), rootElementStyle(), parentStyle(),zoom);606 box.m_left = slices->left()->computeLength<Length>(style(), rootElementStyle(), zoom); 612 607 613 608 return box;
Note:
See TracChangeset
for help on using the changeset viewer.