Title: [174981] releases/WebKitGTK/webkit-2.6/Source/WebCore
Revision
174981
Author
[email protected]
Date
2014-10-21 09:58:51 -0700 (Tue, 21 Oct 2014)

Log Message

Merge r174853 - Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
https://bugs.webkit.org/show_bug.cgi?id=137836

Reviewed by Andreas Kling.

Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
This function is only called from WidthIterator::applyFontTransforms(),
which already makes sure to call applyTransforms() if isSVGFont()
returns false. This patch replaces the check with a simple assertion.

No new tests, no behavior change.

* platform/graphics/SimpleFontData.h:
* svg/SVGFontData.h:

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog (174980 => 174981)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog	2014-10-21 16:50:48 UTC (rev 174980)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/ChangeLog	2014-10-21 16:58:51 UTC (rev 174981)
@@ -1,3 +1,20 @@
+2014-10-17  Chris Dumez  <[email protected]>
+
+        Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms()
+        https://bugs.webkit.org/show_bug.cgi?id=137836
+
+        Reviewed by Andreas Kling.
+
+        Avoid unnecessary isSVGFont() check in SimpleFontData::applyTransforms().
+        This function is only called from WidthIterator::applyFontTransforms(),
+        which already makes sure to call applyTransforms() if isSVGFont()
+        returns false. This patch replaces the check with a simple assertion.
+
+        No new tests, no behavior change.
+
+        * platform/graphics/SimpleFontData.h:
+        * svg/SVGFontData.h:
+
 2014-10-16  Alexey Proskuryakov  <[email protected]>
 
         REGRESSION (r169024): Undetermined text is not displayed in the search field of Adobe Help Website

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/platform/graphics/SimpleFontData.h (174980 => 174981)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/platform/graphics/SimpleFontData.h	2014-10-21 16:50:48 UTC (rev 174980)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/platform/graphics/SimpleFontData.h	2014-10-21 16:58:51 UTC (rev 174981)
@@ -218,8 +218,8 @@
 
     bool applyTransforms(GlyphBufferGlyph* glyphs, GlyphBufferAdvance* advances, size_t glyphCount, TypesettingFeatures typesettingFeatures) const
     {
-        if (isSVGFont())
-            return false;
+        // We need to handle transforms on SVG fonts internally, since they are rendered internally.
+        ASSERT(!isSVGFont());
 #if PLATFORM(IOS) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED > 1080)
         wkCTFontTransformOptions options = (typesettingFeatures & Kerning ? wkCTFontTransformApplyPositioning : 0) | (typesettingFeatures & Ligatures ? wkCTFontTransformApplyShaping : 0);
         return wkCTFontTransformGlyphs(m_platformData.ctFont(), glyphs, reinterpret_cast<CGSize*>(advances), glyphCount, options);

Modified: releases/WebKitGTK/webkit-2.6/Source/WebCore/svg/SVGFontData.h (174980 => 174981)


--- releases/WebKitGTK/webkit-2.6/Source/WebCore/svg/SVGFontData.h	2014-10-21 16:50:48 UTC (rev 174980)
+++ releases/WebKitGTK/webkit-2.6/Source/WebCore/svg/SVGFontData.h	2014-10-21 16:58:51 UTC (rev 174981)
@@ -52,6 +52,8 @@
     bool fillBMPGlyphs(SVGFontElement*, GlyphPage* , unsigned offset, unsigned length, UChar* buffer, const SimpleFontData*) const;
     bool fillNonBMPGlyphs(SVGFontElement*, GlyphPage* , unsigned offset, unsigned length, UChar* buffer, const SimpleFontData*) const;
 
+    bool applyTransforms(GlyphBufferGlyph*, GlyphBufferAdvance*, size_t, TypesettingFeatures) const = delete;
+
     // Ths SVGFontFaceElement is kept alive --
     // 1) in the external font case: by the CSSFontFaceSource, which holds a reference to the external SVG document
     //    containing the element;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to