Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(24)

Issue 184103024: Refactor away SVGTextMetricsBuilder::advance (Closed)

Created:
6 years, 9 months ago by fs
Modified:
6 years, 9 months ago
CC:
blink-reviews, krit, bemjb+rendering_chromium.org, dsinclair, zoltan1, eae+blinkwatch, leviw+renderwatch, fs, ed+blinkwatch_opera.com, f(malita), gyuyoung.kim_webkit.org, jchaffraix+rendering, pdr., Stephen Chennney, rwlbuis
Visibility:
Public.

Description

Refactor 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+33 lines, -40 lines) Patch
M Source/core/rendering/svg/SVGTextMetricsBuilder.h View 2 chunks +3 lines, -7 lines 0 comments Download
M Source/core/rendering/svg/SVGTextMetricsBuilder.cpp View 3 chunks +30 lines, -33 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
fs
6 years, 9 months ago (2014-03-04 16:26:59 UTC) #1
Stephen Chennney
LGTM. It's great that you're in this area.
6 years, 9 months ago (2014-03-04 16:57:31 UTC) #2
fs
The CQ bit was checked by fs@opera.com
6 years, 9 months ago (2014-03-04 17:26:44 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/184103024/1
6 years, 9 months ago (2014-03-04 17:27:03 UTC) #4
commit-bot: I haz the power
6 years, 9 months ago (2014-03-05 10:17:01 UTC) #5
Message was sent while issue was closed.
Change committed as 168461

Powered by Google App Engine
This is Rietveld 408576698