Changeset 95778 in webkit
- Timestamp:
- Sep 22, 2011 8:21:12 PM (13 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r95777 r95778 1 2011-09-22 Darin Adler <darin@apple.com> 2 3 Remove unneeded type conversion from background bleed code 4 https://bugs.webkit.org/show_bug.cgi?id=68669 5 6 Reviewed by Geoffrey Garen. 7 8 * rendering/RenderBoxModelObject.cpp: 9 (WebCore::backgroundRectAdjustedForBleedAvoidance): Use ceil instead of ceilf 10 and eliminate superflous conversion to float and use of FloatSize. Also added 11 a "why" comment. 12 1 13 2011-09-22 Darin Adler <darin@apple.com> 2 14 -
trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp
r95777 r95778 587 587 return borderRect; 588 588 589 // We shrink the rectangle by one pixel on each side because the bleed is one pixel maximum. 590 AffineTransform transform = context->getCTM(); 589 591 LayoutRect adjustedRect = borderRect; 590 // We need to shrink the border by one device pixel on each side. 591 AffineTransform ctm = context->getCTM(); 592 FloatSize contextScale(static_cast<float>(ctm.xScale()), static_cast<float>(ctm.yScale())); 593 adjustedRect.inflateX(-ceilf(1 / contextScale.width())); 594 adjustedRect.inflateY(-ceilf(1 / contextScale.height())); 592 adjustedRect.inflateX(-ceil(1 / transform.xScale())); 593 adjustedRect.inflateY(-ceil(1 / transform.yScale())); 595 594 return adjustedRect; 596 595 }
Note: See TracChangeset
for help on using the changeset viewer.