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

Issue 901193002: De-ExceptionState-ify SVGLengthContext (Closed)

Created:
5 years, 10 months ago by fs
Modified:
5 years, 10 months ago
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

De-ExceptionState-ify SVGLengthContext The 1.1 specification does not define if exceptions should be thrown when font-size/x-height/viewport cannot be determined (and hence relative units not properly evaluated). UAs don't really agree here and throw/don't throw in different cases. The gist of this CL is that most of the uses of SVGLengthContext and SVGLength::value() will not be throwing exceptions at all, so move that part of the functionality to the callers that might care (ie SVGLengthTearOff). This in essence checks for the primary failure modes up front and then throws without calling into SVGLengthContext at all. Some fidelity in exception messages is sacrificed, and cases which shouldn't be considered errors (like zero font-size) no longer cause exceptions to be thrown. Reduces binary-size by ~15k (only a smaller part of that in SVGLengthContext itself). Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=189659

Patch Set 1 #

Total comments: 4

Patch Set 2 : Delazify. #

Patch Set 3 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -128 lines) Patch
M LayoutTests/svg/dom/SVGLength-px-expected.txt View 1 3 chunks +3 lines, -3 lines 0 comments Download
M Source/core/svg/SVGLength.h View 3 chunks +8 lines, -13 lines 0 comments Download
M Source/core/svg/SVGLength.cpp View 6 chunks +14 lines, -34 lines 0 comments Download
M Source/core/svg/SVGLengthContext.h View 2 chunks +9 lines, -11 lines 0 comments Download
M Source/core/svg/SVGLengthContext.cpp View 1 2 5 chunks +31 lines, -59 lines 0 comments Download
M Source/core/svg/SVGLengthList.cpp View 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/svg/SVGLengthTearOff.cpp View 1 3 chunks +27 lines, -6 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
fs
Was reminded that I had this lying around... Played a bit [1] with the API ...
5 years, 10 months ago (2015-02-05 17:15:45 UTC) #2
pdr.
LGTM! I tried this many moons ago and gave up when I hit the exception ...
5 years, 10 months ago (2015-02-05 22:12:32 UTC) #3
fs
https://codereview.chromium.org/901193002/diff/1/Source/core/svg/SVGLength.h File Source/core/svg/SVGLength.h (right): https://codereview.chromium.org/901193002/diff/1/Source/core/svg/SVGLength.h#newcode84 Source/core/svg/SVGLength.h:84: return unitType == LengthTypePercentage On 2015/02/05 22:12:32, pdr wrote: ...
5 years, 10 months ago (2015-02-06 12:26:04 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/901193002/40001
5 years, 10 months ago (2015-02-06 13:44:11 UTC) #7
commit-bot: I haz the power
5 years, 10 months ago (2015-02-06 18:02:29 UTC) #8
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=189659

Powered by Google App Engine
This is Rietveld 408576698