Changeset 195596 in webkit


Ignore:
Timestamp:
Jan 26, 2016 10:37:37 AM (8 years ago)
Author:
commit-queue@webkit.org
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 <Konstantin Tokarev> on 2016-01-26
Reviewed by Antti Koivisto.

No new tests needed.

  • rendering/svg/SVGTextRunRenderingContext.cpp:

(WebCore::SVGGlyphToPathTranslator::extents):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r195595 r195596  
     12016-01-26  Konstantin Tokarev  <annulen@yandex.ru>
     2
     3        Do not convert GlyphBufferAdvance to FloatSize
     4        https://bugs.webkit.org/show_bug.cgi?id=153429
     5
     6        GlyphBufferAdvance is not necessaryly convertible to FloatSize.
     7        Also, this code was doing extra work by transforming height value.
     8
     9        Reviewed by Antti Koivisto.
     10
     11        No new tests needed.
     12
     13        * rendering/svg/SVGTextRunRenderingContext.cpp:
     14        (WebCore::SVGGlyphToPathTranslator::extents):
     15
    1162016-01-22  Ada Chan  <adachan@apple.com>
    217
  • trunk/Source/WebCore/rendering/svg/SVGTextRunRenderingContext.cpp

    r189830 r195596  
    177177    AffineTransform glyphPathTransform = transform();
    178178    FloatPoint beginning = glyphPathTransform.mapPoint(m_currentPoint);
    179     FloatSize end = glyphPathTransform.mapSize(FloatSize(m_glyphBuffer.advanceAt(m_index)));
    180     return std::make_pair(beginning.x(), beginning.x() + end.width());
     179    float width = narrowPrecisionToFloat(m_glyphBuffer.advanceAt(m_index).width() * glyphPathTransform.xScale());
     180    return std::make_pair(beginning.x(), beginning.x() + width);
    181181}
    182182
Note: See TracChangeset for help on using the changeset viewer.