Changeset 197524 in webkit
- Timestamp:
- Mar 3, 2016 3:55:52 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r197520 r197524 1 2016-03-03 Zalan Bujtas <zalan@apple.com> 2 3 Subpixel rendering: Make collapsed borders painting subpixel aware. 4 https://bugs.webkit.org/show_bug.cgi?id=154980 5 6 Reviewed by David Hyatt. 7 8 This patch enables collapsed borders with odd pixel width paint on subpixel position. 9 Currently borders with odd pixels are split at integral position so that border-width: 3px; 10 paints 1px on the left(top) and 2px on the right(bottom) side. With this patch 11 we paint 1.5px on both sides(on 2x display). 12 13 * fast/table/hidpi-collapsed-border-with-odd-pixel-width-expected.html: Added. 14 * fast/table/hidpi-collapsed-border-with-odd-pixel-width.html: Added. 15 1 16 2016-03-03 Filip Pizlo <fpizlo@apple.com> 2 17 -
trunk/Source/WebCore/ChangeLog
r197519 r197524 1 2016-03-03 Zalan Bujtas <zalan@apple.com> 2 3 Subpixel rendering: Make collapsed borders painting subpixel aware. 4 https://bugs.webkit.org/show_bug.cgi?id=154980 5 6 Reviewed by David Hyatt. 7 8 This patch enables collapsed borders with odd pixel width paint on subpixel position. 9 Currently borders with odd pixels are split at integral position so that border-width: 3px; 10 paints 1px on the left(top) and 2px on the right(bottom) side. With this patch 11 we paint 1.5px on both sides(on 2x display). 12 13 Test: fast/table/hidpi-collapsed-border-with-odd-pixel-width.html 14 15 * rendering/RenderTableCell.cpp: 16 (WebCore::RenderTableCell::paintCollapsedBorders): 17 1 18 2016-03-03 Dave Hyatt <hyatt@apple.com> 2 19 -
trunk/Source/WebCore/rendering/RenderTableCell.cpp
r197486 r197524 1205 1205 LayoutUnit rightWidth = rightVal.width(); 1206 1206 1207 LayoutRect borderRect = LayoutRect(paintRect.x() - floorToInt(leftWidth / 2), 1208 paintRect.y() - floorToInt(topWidth / 2), 1209 paintRect.width() + floorToInt(leftWidth / 2) + floorToInt((rightWidth + 1) / 2), 1210 paintRect.height() + floorToInt(topWidth / 2) + floorToInt((bottomWidth + 1) / 2)); 1207 float deviceScaleFactor = document().deviceScaleFactor(); 1208 LayoutRect borderRect = LayoutRect(paintRect.x() - floorToDevicePixel(leftWidth / 2, deviceScaleFactor), 1209 paintRect.y() - floorToDevicePixel(topWidth / 2, deviceScaleFactor), 1210 paintRect.width() + floorToDevicePixel(leftWidth / 2, deviceScaleFactor) + floorToDevicePixel(rightWidth / 2, deviceScaleFactor), 1211 paintRect.height() + floorToDevicePixel(topWidth / 2, deviceScaleFactor) + floorToDevicePixel(bottomWidth / 2, deviceScaleFactor)); 1211 1212 1212 1213 EBorderStyle topStyle = collapsedBorderStyle(topVal.style());
Note: See TracChangeset
for help on using the changeset viewer.