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

Issue 897313004: Fold up the SVGLengthContext::convertValueFrom* helpers (Closed)

Created:
5 years, 10 months ago by fs
Modified:
5 years, 10 months ago
Reviewers:
pdr., f(malita)
CC:
blink-reviews, krit, ed+blinkwatch_opera.com, f(malita), fs, gyuyoung.kim_webkit.org, kouhei+svg_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Fold up the SVGLengthContext::convertValueFrom* helpers There are three with similar-looking names, and they are all a single line each. Fold up where it improves readability, and make the last one static. Having folded up convertValueFromUserUnitsToPercentage() we get an expression that looks like: value * 100 / dimension... * 100; where the factors (100) obviously cancel out one another. Looking at the single call-site (SVGLength::setValue) which can actual pass a percentage, it does an explicit adjustment too. Move that adjustment into the SVGLengthContext method and drop the two '* 100' - yielding a more obvious conversion (and less operations to execute). Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190078

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+23 lines, -39 lines) Patch
M Source/core/svg/SVGLength.cpp View 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/svg/SVGLengthContext.h View 1 chunk +0 lines, -4 lines 0 comments Download
M Source/core/svg/SVGLengthContext.cpp View 4 chunks +23 lines, -31 lines 0 comments Download

Messages

Total messages: 6 (2 generated)
fs
5 years, 10 months ago (2015-02-12 17:49:27 UTC) #2
pdr.
lgtm
5 years, 10 months ago (2015-02-12 20:59:17 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/897313004/1
5 years, 10 months ago (2015-02-12 20:59:39 UTC) #5
commit-bot: I haz the power
5 years, 10 months ago (2015-02-12 21:03:26 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=190078

Powered by Google App Engine
This is Rietveld 408576698