DescriptionUse precomputed text metrics instead of recomputing them in SVGTextQuery
This patch changes SVGTextQuery to use precomputed text metrics instead
of recomputing them on every text query. This will result in a small
performance improvement for text queries.
The purpose of this patch is to unify the SVG text metrics calculations
so they are only computed in one place and one time. A followup patch
will change how metrics are calculated and now only needs to change
SVGTextMetricsBuilder.
There is a small test expectations change in lengthAdjust-text-metrics
due to how the 'T' in 'Test' overhangs 'est'. When measured in
isolation using SVGTextContentElement.getSubStringLength, the width
of 'e' is different compared to when it is measured in the string. The
precise values used in the test are somewhat arbitrary and will be
changing in a followup but, aesthetically, http://jsbin.com/fayimoz is
improved with this patch.
BUG=589525
Committed: https://crrev.com/931bd4a856cfe2a08f33b8be8cc405bd616873b5
Cr-Commit-Position: refs/heads/master@{#380243}
Patch Set 1 #Patch Set 2 : Minor cleanup and english fixes #
Total comments: 4
Patch Set 3 : Land rover: address reviewer comments and drive over to the CQ #
Messages
Total messages: 20 (8 generated)
|