Title: [111110] trunk
- Revision
- 111110
- Author
- [email protected]
- Date
- 2012-03-16 19:54:48 -0700 (Fri, 16 Mar 2012)
Log Message
[Cairo] Text extent of shadowed text is calculated incorrectly
https://bugs.webkit.org/show_bug.cgi?id=65035
Source/WebCore:
Reviewed by Martin Robinson.
No new tests. This is already covered by fast/canvas/fillText-shadow.html.
Correct determine the size of rendered text using x and y bearing from the font
extents.
* platform/graphics/cairo/FontCairo.cpp:
(WebCore::drawGlyphsShadow): Use the x and y bearing to calculate text extents.
This gives a more accurate sizing and avoids clipping the edges of the shadow.
LayoutTests:
Reviewed by Martin Robinson
* platform/gtk/Skipped: Unskip a test that is now passing.
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (111109 => 111110)
--- trunk/LayoutTests/ChangeLog 2012-03-17 02:32:51 UTC (rev 111109)
+++ trunk/LayoutTests/ChangeLog 2012-03-17 02:54:48 UTC (rev 111110)
@@ -1,3 +1,12 @@
+2012-03-16 Martin Robinson <[email protected]>
+
+ [Cairo] Text extent of shadowed text is calculated incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=65035
+
+ Reviewed by Martin Robinson
+
+ * platform/gtk/Skipped: Unskip a test that is now passing.
+
2012-03-16 Aaron Colwell <[email protected]>
Rebaselines for compositing tests with video
Modified: trunk/LayoutTests/platform/gtk/Skipped (111109 => 111110)
--- trunk/LayoutTests/platform/gtk/Skipped 2012-03-17 02:32:51 UTC (rev 111109)
+++ trunk/LayoutTests/platform/gtk/Skipped 2012-03-17 02:54:48 UTC (rev 111110)
@@ -1303,10 +1303,6 @@
http/tests/inspector/resource-parameters.html
-# Text shadow extents are calculated incorrectly
-# https://bugs.webkit.org/show_bug.cgi?id=65035
-fast/canvas/fillText-shadow.html
-
# Font feature settings is not implemented.
css3/font-feature-settings-rendering.html
Modified: trunk/Source/WebCore/ChangeLog (111109 => 111110)
--- trunk/Source/WebCore/ChangeLog 2012-03-17 02:32:51 UTC (rev 111109)
+++ trunk/Source/WebCore/ChangeLog 2012-03-17 02:54:48 UTC (rev 111110)
@@ -1,3 +1,19 @@
+2012-03-16 Martin Robinson <[email protected]>
+
+ [Cairo] Text extent of shadowed text is calculated incorrectly
+ https://bugs.webkit.org/show_bug.cgi?id=65035
+
+ Reviewed by Martin Robinson.
+
+ No new tests. This is already covered by fast/canvas/fillText-shadow.html.
+
+ Correct determine the size of rendered text using x and y bearing from the font
+ extents.
+
+ * platform/graphics/cairo/FontCairo.cpp:
+ (WebCore::drawGlyphsShadow): Use the x and y bearing to calculate text extents.
+ This gives a more accurate sizing and avoids clipping the edges of the shadow.
+
2012-03-16 Kentaro Hara <[email protected]>
[Chromium][Performance] Optimize innerText and outerText in Chromium/Mac
Modified: trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp (111109 => 111110)
--- trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp 2012-03-17 02:32:51 UTC (rev 111109)
+++ trunk/Source/WebCore/platform/graphics/cairo/FontCairo.cpp 2012-03-17 02:54:48 UTC (rev 111110)
@@ -85,7 +85,8 @@
cairo_text_extents_t extents;
cairo_scaled_font_glyph_extents(font->platformData().scaledFont(), glyphs, numGlyphs, &extents);
- FloatRect fontExtentsRect(point.x(), point.y() - extents.height, extents.width, extents.height);
+ FloatRect fontExtentsRect(point.x() + extents.x_bearing, point.y() + extents.y_bearing, extents.width, extents.height);
+
if (GraphicsContext* shadowContext = shadow.beginShadowLayer(graphicsContext, fontExtentsRect)) {
drawGlyphsToContext(shadowContext->platformContext()->cr(), font, glyphs, numGlyphs);
shadow.endShadowLayer(graphicsContext);
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes