Title: [161573] trunk
- Revision
- 161573
- Author
- mmaxfi...@apple.com
- Date
- 2014-01-09 12:30:33 -0800 (Thu, 09 Jan 2014)
Log Message
Narrow underlines are too tall
https://bugs.webkit.org/show_bug.cgi?id=126708
Reviewed by Simon Fraser.
Source/WebCore:
I made a typo in r158392 and used was settings the line rect's
height equal to its width. No one noticed because of the subsequent
if statement.
Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::computeLineBoundsAndAntialiasingModeForText):
LayoutTests:
This test clips to a region that should not be drawn in, then draws a scaled underline. It then compares
the output to an empty element.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html: Added.
* fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (161572 => 161573)
--- trunk/LayoutTests/ChangeLog 2014-01-09 20:22:06 UTC (rev 161572)
+++ trunk/LayoutTests/ChangeLog 2014-01-09 20:30:33 UTC (rev 161573)
@@ -1,3 +1,16 @@
+2014-01-09 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Narrow underlines are too tall
+ https://bugs.webkit.org/show_bug.cgi?id=126708
+
+ Reviewed by Simon Fraser.
+
+ This test clips to a region that should not be drawn in, then draws a scaled underline. It then compares
+ the output to an empty element.
+
+ * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html: Added.
+ * fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html: Added.
+
2014-01-09 Alexey Proskuryakov <a...@apple.com>
REGRESSION (r161429?): Frequent crashes on media/track/media-element-enqueue-event-crash.html
Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html (0 => 161573)
--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines-expected.html 2014-01-09 20:30:33 UTC (rev 161573)
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This text draws underlined text with a large scale, then clips the underline to
+a region that should not be drawn. It then makes sure that the image is the same as
+an empty one.
+</body>
+</html>
Added: trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html (0 => 161573)
--- trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html (rev 0)
+++ trunk/LayoutTests/fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html 2014-01-09 20:30:33 UTC (rev 161573)
@@ -0,0 +1,13 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+This text draws underlined text with a large scale, then clips the underline to
+a region that should not be drawn. It then makes sure that the image is the same as
+an empty one.
+<div style="position: relative; overflow: hidden; width: 36px; height: 100px;">
+<div style="left: -160px; top: -320px; position: absolute; -webkit-transform: scale(20); font-family: helvetica; -webkit-transform-origin: left top; display: inline-block; text-decoration: underline; -webkit-text-decoration-skip: ink;">gy</div>
+</div>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (161572 => 161573)
--- trunk/Source/WebCore/ChangeLog 2014-01-09 20:22:06 UTC (rev 161572)
+++ trunk/Source/WebCore/ChangeLog 2014-01-09 20:30:33 UTC (rev 161573)
@@ -1,3 +1,19 @@
+2014-01-09 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ Narrow underlines are too tall
+ https://bugs.webkit.org/show_bug.cgi?id=126708
+
+ Reviewed by Simon Fraser.
+
+ I made a typo in r158392 and used was settings the line rect's
+ height equal to its width. No one noticed because of the subsequent
+ if statement.
+
+ Test: fast/css3-text/css3-text-decoration/text-decoration-skip/text-decoration-skip-tall-underlines.html
+
+ * platform/graphics/cg/GraphicsContextCG.cpp:
+ (WebCore::computeLineBoundsAndAntialiasingModeForText):
+
2014-01-09 Antti Koivisto <an...@apple.com>
DocumentOrderedMap should use iterator
Modified: trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp (161572 => 161573)
--- trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2014-01-09 20:22:06 UTC (rev 161572)
+++ trunk/Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp 2014-01-09 20:30:33 UTC (rev 161573)
@@ -1251,7 +1251,7 @@
// On screen, use a minimum thickness of 1.0 in user space (later rounded to an integral number in device space).
FloatRect adjustedBounds = initialBounds;
- adjustedBounds.setHeight(std::max(initialBounds.width(), 1.0f));
+ adjustedBounds.setHeight(std::max(initialBounds.height(), 1.0f));
// FIXME: This should be done a better way.
// We try to round all parameters to integer boundaries in device space. If rounding pixels in device space
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes