DescriptionRefactor away SVGTextMetricsBuilder::advance
This method has two logical parts: Advancing the text position and
checking for termination, and computing the metrics for the current
character.
Split this method to better show this. The latter part is put into a
new method, computeMetricsForCurrentCharacter, while the former part is
open-coded in SVGTextMetricsBuilder::measureTextRenderer.
The advance{Simple,Complex}Text methods are renamed to
computeMetricsForCurrentCharacter{Simple,Complex}.
With this change, it becomes easier to see that
SVGTextMetricsBuilder::m_currentMetrics can be trivially removed in favor
of returning it from computeMetricsForCurrentCharacter, and storing it on
the stack in SVGTextMetricsBuilder::measureTextRenderer.
The same is true for SVGTextMetricsBuilder::m_complexStartToCurrentMetrics,
which can be made local to computeMetricsForCurrentCharacterComplex.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168461
Patch Set 1 #
Messages
Total messages: 5 (0 generated)
|