Title: [133494] trunk
- Revision
- 133494
- Author
- [email protected]
- Date
- 2012-11-05 10:17:57 -0800 (Mon, 05 Nov 2012)
Log Message
Implement SimpleFontData::platformBoundsForGlyph on skia
https://bugs.webkit.org/show_bug.cgi?id=101115
Reviewed by Eric Seidel.
Source/WebCore:
The implementation is similar to SimpleFontData::platformWidthForGlyph on skia.
Tested by: fast/block/lineboxcontain/*glyphs*, mathml/presentation/*
* platform/graphics/skia/SimpleFontDataSkia.cpp:
(WebCore::SimpleFontData::platformBoundsForGlyph): Implemented.
LayoutTests:
Some lineboxcontain/etc. tests will need rebaselining.
* platform/chromium/TestExpectations:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (133493 => 133494)
--- trunk/LayoutTests/ChangeLog 2012-11-05 18:15:23 UTC (rev 133493)
+++ trunk/LayoutTests/ChangeLog 2012-11-05 18:17:57 UTC (rev 133494)
@@ -1,3 +1,14 @@
+2012-11-05 David Barton <[email protected]>
+
+ Implement SimpleFontData::platformBoundsForGlyph on skia
+ https://bugs.webkit.org/show_bug.cgi?id=101115
+
+ Reviewed by Eric Seidel.
+
+ Some lineboxcontain/etc. tests will need rebaselining.
+
+ * platform/chromium/TestExpectations:
+
2012-11-05 Csaba Osztrogonác <[email protected]>
[Qt] Unreviewed gardening, unskip a now passing test.
Modified: trunk/LayoutTests/platform/chromium/TestExpectations (133493 => 133494)
--- trunk/LayoutTests/platform/chromium/TestExpectations 2012-11-05 18:15:23 UTC (rev 133493)
+++ trunk/LayoutTests/platform/chromium/TestExpectations 2012-11-05 18:17:57 UTC (rev 133494)
@@ -2505,13 +2505,15 @@
webkit.org/b/90363 [ Debug ] fast/overflow/lots-of-sibling-inline-boxes.html [ Pass Timeout ]
webkit.org/b/90363 [ Android Release ] fast/overflow/lots-of-sibling-inline-boxes.html [ Pass Timeout ]
-# WebKit roll 74255:74308
+# WebKit roll 74255:74308 (74281?)
crbug.com/67416 [ Android Linux Win ] fast/text/emphasis.html [ Failure ]
crbug.com/67416 fast/text/emphasis-vertical.html [ Failure ImageOnlyFailure ]
crbug.com/67540 [ Android Linux ] fast/text/emphasis-avoid-ruby.html [ ImageOnlyFailure ]
crbug.com/67540 [ Android Linux SnowLeopard Win ] fast/repaint/text-emphasis-h.html [ ImageOnlyFailure ]
crbug.com/67540 [ Android Linux ] fast/repaint/text-emphasis-v.html [ ImageOnlyFailure ]
+crbug.com/67540 webkit.org/b/94735 [ Linux ] fast/text/emphasis-overlap.html [ Failure ImageOnlyFailure ]
+
# See also CRBUG139863
crbug.com/67442 [ Android Linux Win ] fast/canvas/fillText-shadow.html [ Failure ]
crbug.com/67442 [ Linux Win ] platform/chromium/virtual/gpu/fast/canvas/fillText-shadow.html [ Failure ]
@@ -2639,9 +2641,12 @@
crbug.com/76616 [ Android Linux Win ] fast/text/emphasis-combined-text.html [ Failure ]
crbug.com/76616 [ SnowLeopard ] fast/text/emphasis-combined-text.html [ ImageOnlyFailure Pass ]
-# New CSS3 feature in r81684. Some tests fail outside Mac.
-crbug.com/77095 [ Android Linux Win ] fast/block/lineboxcontain/block-glyphs-replaced.html [ Failure ]
-crbug.com/77095 [ Android Linux Win ] fast/block/lineboxcontain/glyphs.html [ Failure ]
+# New CSS3 feature in r81684. Some tests fail outside Mac. They should be ok and need rebaseline after webkit.org/b/101115.
+crbug.com/77095 webkit.org/b/101115 [ Android Linux Win ] fast/block/lineboxcontain/block-glyphs-replaced.html [ Failure Pass ]
+crbug.com/77095 webkit.org/b/101115 [ Android Linux Win ] fast/block/lineboxcontain/glyphs.html [ Failure Pass ]
+webkit.org/b/101115 [ Linux ] fast/block/lineboxcontain/block-glyphs.html [ Failure ]
+webkit.org/b/101115 [ Linux ] mathml/xHeight.xhtml [ Failure ]
+webkit.org/b/101115 [ Linux ] fast/repaint/stacked-diacritics.html [ ImageOnlyFailure ]
# Has been timing out, initiated at:
# Webkit patches in range [r81976, r81981]
@@ -3727,8 +3732,6 @@
webkit.org/b/94660 fast/js/create-lots-of-workers.html [ Crash Pass Timeout ]
-crbug.com/67540 webkit.org/b/94735 [ Linux ] fast/text/emphasis-overlap.html [ Failure ImageOnlyFailure ]
-
webkit.org/b/94793 http/tests/notifications/event-listener-crash.html [ Failure Pass ]
# Failing tests with 2d canvas acceleration.
Modified: trunk/Source/WebCore/ChangeLog (133493 => 133494)
--- trunk/Source/WebCore/ChangeLog 2012-11-05 18:15:23 UTC (rev 133493)
+++ trunk/Source/WebCore/ChangeLog 2012-11-05 18:17:57 UTC (rev 133494)
@@ -1,3 +1,17 @@
+2012-11-05 David Barton <[email protected]>
+
+ Implement SimpleFontData::platformBoundsForGlyph on skia
+ https://bugs.webkit.org/show_bug.cgi?id=101115
+
+ Reviewed by Eric Seidel.
+
+ The implementation is similar to SimpleFontData::platformWidthForGlyph on skia.
+
+ Tested by: fast/block/lineboxcontain/*glyphs*, mathml/presentation/*
+
+ * platform/graphics/skia/SimpleFontDataSkia.cpp:
+ (WebCore::SimpleFontData::platformBoundsForGlyph): Implemented.
+
2012-11-05 Andreas Kling <[email protected]>
Decouple Attr logic from ElementAttributeData.
Modified: trunk/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp (133493 => 133494)
--- trunk/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp 2012-11-05 18:15:23 UTC (rev 133493)
+++ trunk/Source/WebCore/platform/graphics/skia/SimpleFontDataSkia.cpp 2012-11-05 18:17:57 UTC (rev 133494)
@@ -211,9 +211,26 @@
m_treatAsFixedPitch = platformData().isFixedPitch();
}
-FloatRect SimpleFontData::platformBoundsForGlyph(Glyph) const
+FloatRect SimpleFontData::platformBoundsForGlyph(Glyph glyph) const
{
- return FloatRect();
+ if (!m_platformData.size())
+ return FloatRect();
+
+ SkASSERT(sizeof(glyph) == 2); // compile-time assert
+
+ SkPaint paint;
+
+ m_platformData.setupPaint(&paint);
+
+ paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding);
+ SkRect bounds;
+ paint.measureText(&glyph, 2, &bounds);
+ if (!paint.isSubpixelText()) {
+ SkIRect ir;
+ bounds.round(&ir);
+ bounds.set(ir);
+ }
+ return FloatRect(bounds);
}
float SimpleFontData::platformWidthForGlyph(Glyph glyph) const
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes