Title: [196898] releases/WebKitGTK/webkit-2.10/Source/WebCore
Revision
196898
Author
[email protected]
Date
2016-02-22 00:06:38 -0800 (Mon, 22 Feb 2016)

Log Message

Merge r195596 - Do not convert GlyphBufferAdvance to FloatSize
https://bugs.webkit.org/show_bug.cgi?id=153429

GlyphBufferAdvance is not necessaryly convertible to FloatSize.
Also, this code was doing extra work by transforming height value.

Patch by Konstantin Tokarev <[email protected]> on 2016-01-26
Reviewed by Antti Koivisto.

No new tests needed.

* rendering/svg/SVGTextRunRenderingContext.cpp:
(WebCore::SVGGlyphToPathTranslator::extents):

Modified Paths

Diff

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog (196897 => 196898)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-02-22 08:02:10 UTC (rev 196897)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/ChangeLog	2016-02-22 08:06:38 UTC (rev 196898)
@@ -1,3 +1,18 @@
+2016-01-26  Konstantin Tokarev  <[email protected]>
+
+        Do not convert GlyphBufferAdvance to FloatSize
+        https://bugs.webkit.org/show_bug.cgi?id=153429
+
+        GlyphBufferAdvance is not necessaryly convertible to FloatSize.
+        Also, this code was doing extra work by transforming height value.
+
+        Reviewed by Antti Koivisto.
+
+        No new tests needed.
+
+        * rendering/svg/SVGTextRunRenderingContext.cpp:
+        (WebCore::SVGGlyphToPathTranslator::extents):
+
 2016-01-25  Eric Carlson  <[email protected]>
 
         Media "ended" event incorrectly fires when currentTime is set

Modified: releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (196897 => 196898)


--- releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2016-02-22 08:02:10 UTC (rev 196897)
+++ releases/WebKitGTK/webkit-2.10/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2016-02-22 08:06:38 UTC (rev 196898)
@@ -176,8 +176,8 @@
 {
     AffineTransform glyphPathTransform = transform();
     FloatPoint beginning = glyphPathTransform.mapPoint(m_currentPoint);
-    FloatSize end = glyphPathTransform.mapSize(FloatSize(m_glyphBuffer.advanceAt(m_index)));
-    return std::make_pair(beginning.x(), beginning.x() + end.width());
+    float width = narrowPrecisionToFloat(m_glyphBuffer.advanceAt(m_index).width() * glyphPathTransform.xScale());
+    return std::make_pair(beginning.x(), beginning.x() + width);
 }
 
 auto SVGGlyphToPathTranslator::underlineType() -> GlyphUnderlineType
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to