Changeset 166322 in webkit
- Timestamp:
- Mar 26, 2014 3:05:24 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r166309 r166322 1 2014-03-26 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Skipping underlines disregard points completely inside the underline rect 4 https://bugs.webkit.org/show_bug.cgi?id=130800 5 6 Reviewed by Dean Jackson. 7 8 This test draws a glyph entire inside the underline. It should render the same 9 as it would without any underline at all. 10 11 * fast/css3-text/css3-text-decoration/text-decoration-skip/resources/Litherum.svg: Added 12 an underscore glyph that would lie entirely within an underline 13 * fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html: 14 1 15 2014-03-26 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/resources/Litherum.svg
r164842 r166322 5 5 <defs> 6 6 <font id="Litherum" horiz-adv-x="1024"> 7 <font-face units-per-em="14" ascent="14" descent="-7"/> 8 <glyph unicode="|" horiz-adv-x="14" d="M5 -7v21h4v-21z"/> 7 <font-face units-per-em="56" ascent="56" descent="-28"/> 8 <glyph unicode="|" horiz-adv-x="56" d="M20 -28v84h16v-84z"/> 9 <glyph unicode="_" horiz-adv-x="56" d="M1 -5v1h54v-1z"/> 9 10 </font> 10 11 </defs> -
trunk/Source/WebCore/ChangeLog
r166319 r166322 1 2014-03-26 Myles C. Maxfield <mmaxfield@apple.com> 2 3 Skipping underlines disregard points completely inside the underline rect 4 https://bugs.webkit.org/show_bug.cgi?id=130800 5 6 Reviewed by Dean Jackson. 7 8 When determining bounds for underline skipping, endpoints of glyph contours 9 that lie entirely within the rect of the underline are ignored. This patch 10 makes these points affect the skipping regions the same way that intersections 11 do. 12 13 Test: fast/css3-text/css3-text-decoration/text-decoration-skip/glyph-inside-underline.html 14 15 * platform/graphics/mac/FontMac.mm: 16 (WebCore::updateX): Refactored common code into a function 17 (WebCore::findPathIntersections): Test for endpoints which lie entirely within 18 the underline bounds 19 1 20 2014-03-26 Pratik Solanki <psolanki@apple.com> 2 21 -
trunk/Source/WebCore/platform/graphics/mac/FontMac.mm
r164842 r166322 389 389 } 390 390 391 static void updateX(GlyphIterationState& state, CGFloat x) 392 { 393 state.minX = std::min(state.minX, x); 394 state.maxX = std::max(state.maxX, x); 395 } 396 391 397 // This function is called by CGPathApply and is therefore invoked for each 392 398 // contour in a glyph. This function models each contours as a straight line … … 426 432 return; 427 433 CGFloat x; 428 if (findIntersectionPoint(state.y1, state.currentPoint, point, x)) { 429 state.minX = std::min(state.minX, x); 430 state.maxX = std::max(state.maxX, x); 431 } 432 if (findIntersectionPoint(state.y2, state.currentPoint, point, x)) { 433 state.minX = std::min(state.minX, x); 434 state.maxX = std::max(state.maxX, x); 435 } 434 if (findIntersectionPoint(state.y1, state.currentPoint, point, x)) 435 updateX(state, x); 436 if (findIntersectionPoint(state.y2, state.currentPoint, point, x)) 437 updateX(state, x); 438 if ((state.currentPoint.y >= state.y1 && state.currentPoint.y <= state.y2) 439 || (state.currentPoint.y <= state.y1 && state.currentPoint.y >= state.y2)) 440 updateX(state, state.currentPoint.x); 436 441 state.currentPoint = point; 437 442 }
Note: See TracChangeset
for help on using the changeset viewer.