Changeset 163451 in webkit
- Timestamp:
- Feb 5, 2014, 9:34:59 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r163444 r163451 1 2014-02-05 Zoltan Horvath <zoltan@webkit.org> 2 3 [CSS Shapes] Simplify BasicShapeInset::path 4 https://bugs.webkit.org/show_bug.cgi?id=127920 5 6 Reviewed by David Hyatt. 7 8 I introduced a new static helper function called floatSizeForLengthSize 9 in order to simplify BasicShapeInset::path method. 10 11 No new tests, no behavior change. 12 13 * rendering/style/BasicShapes.cpp: 14 (WebCore::floatSizeForLengthSize): New helper function. 15 (WebCore::BasicShapeInset::path): 16 1 17 2014-02-05 Wojciech Bielawski <w.bielawski@samsung.com> 2 18 -
trunk/Source/WebCore/rendering/style/BasicShapes.cpp
r163439 r163451 345 345 } 346 346 347 static FloatSize floatSizeForLengthSize(const LengthSize& lengthSize, const FloatRect& boundingBox) 348 { 349 return FloatSize(floatValueForLength(lengthSize.width(), boundingBox.width()), 350 floatValueForLength(lengthSize.height(), boundingBox.height())); 351 } 352 347 353 void BasicShapeInset::path(Path& path, const FloatRect& boundingBox) 348 354 { … … 357 363 std::max<float>(boundingBox.height() - top - floatValueForLength(m_bottom, boundingBox.height()), 0) 358 364 ), 359 FloatSize( 360 floatValueForLength(m_topLeftRadius.width(), boundingBox.width()), 361 floatValueForLength(m_topLeftRadius.height(), boundingBox.height()) 362 ), 363 FloatSize( 364 floatValueForLength(m_topRightRadius.width(), boundingBox.width()), 365 floatValueForLength(m_topRightRadius.height(), boundingBox.height()) 366 ), 367 FloatSize( 368 floatValueForLength(m_bottomLeftRadius.width(), boundingBox.width()), 369 floatValueForLength(m_bottomLeftRadius.height(), boundingBox.height()) 370 ), 371 FloatSize( 372 floatValueForLength(m_bottomRightRadius.width(), boundingBox.width()), 373 floatValueForLength(m_bottomRightRadius.height(), boundingBox.height()) 374 ) 365 floatSizeForLengthSize(m_topLeftRadius, boundingBox), 366 floatSizeForLengthSize(m_topRightRadius, boundingBox), 367 floatSizeForLengthSize(m_bottomLeftRadius, boundingBox), 368 floatSizeForLengthSize(m_bottomRightRadius, boundingBox) 375 369 ); 376 370 }
Note:
See TracChangeset
for help on using the changeset viewer.