Title: [171955] trunk/Source/WebCore
- Revision
- 171955
- Author
- mmaxfi...@apple.com
- Date
- 2014-08-01 16:14:30 -0700 (Fri, 01 Aug 2014)
Log Message
SVG Font kerning can take an early out if the font has no kerning information
https://bugs.webkit.org/show_bug.cgi?id=135524
Reviewed by Dean Jackson.
Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
and again, skip the iteration entirely if every call would return 0.
No new tests because there is no behavior change.
* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGTextRunRenderingContext::applySVGKerning):
* svg/SVGFontElement.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (171954 => 171955)
--- trunk/Source/WebCore/ChangeLog 2014-08-01 23:10:50 UTC (rev 171954)
+++ trunk/Source/WebCore/ChangeLog 2014-08-01 23:14:30 UTC (rev 171955)
@@ -1,3 +1,19 @@
+2014-08-01 Myles C. Maxfield <mmaxfi...@apple.com>
+
+ SVG Font kerning can take an early out if the font has no kerning information
+ https://bugs.webkit.org/show_bug.cgi?id=135524
+
+ Reviewed by Dean Jackson.
+
+ Rather than calling SVGFontElement::horizontalKerningForPairOfStringsAndGlyphs() again
+ and again, skip the iteration entirely if every call would return 0.
+
+ No new tests because there is no behavior change.
+
+ * rendering/svg/SVGTextRunRenderingContext.cpp:
+ (WebCore::SVGTextRunRenderingContext::applySVGKerning):
+ * svg/SVGFontElement.h:
+
2014-08-01 Beth Dakin <bda...@apple.com>
Inspector highlights clipped at the bottom on the page in WK1 views with
Modified: trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (171954 => 171955)
--- trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp 2014-08-01 23:10:50 UTC (rev 171954)
+++ trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp 2014-08-01 23:14:30 UTC (rev 171955)
@@ -72,6 +72,9 @@
if (!fontElement || !fontFaceElement)
return false;
+ if (fontElement->horizontalKerningMapIsEmpty())
+ return true;
+
float scale = scaleEmToUnits(fontData->platformData().size(), fontFaceElement->unitsPerEm());
String lastGlyphName;
Modified: trunk/Source/WebCore/svg/SVGFontElement.h (171954 => 171955)
--- trunk/Source/WebCore/svg/SVGFontElement.h 2014-08-01 23:10:50 UTC (rev 171954)
+++ trunk/Source/WebCore/svg/SVGFontElement.h 2014-08-01 23:14:30 UTC (rev 171955)
@@ -81,6 +81,7 @@
Glyph missingGlyph();
const SVGMissingGlyphElement* firstMissingGlyphElement() const;
+ bool horizontalKerningMapIsEmpty() const { return m_horizontalKerningMap.isEmpty(); }
private:
SVGFontElement(const QualifiedName&, Document&);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes