Title: [195596] trunk/Source/WebCore
Revision
195596
Author
[email protected]
Date
2016-01-26 10:37:37 -0800 (Tue, 26 Jan 2016)

Log Message

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: trunk/Source/WebCore/ChangeLog (195595 => 195596)


--- trunk/Source/WebCore/ChangeLog	2016-01-26 18:35:36 UTC (rev 195595)
+++ trunk/Source/WebCore/ChangeLog	2016-01-26 18:37:37 UTC (rev 195596)
@@ -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-22  Ada Chan  <[email protected]>
 
         Enable API related to the video fullscreen layer in MediaPlayerPrivateAVFoundationObjC

Modified: trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp (195595 => 195596)


--- trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2016-01-26 18:35:36 UTC (rev 195595)
+++ trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp	2016-01-26 18:37:37 UTC (rev 195596)
@@ -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