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

Issue 67483003: [SVG] Fix root element length values handling. (Closed)

Created:
7 years, 1 month ago by f(malita)
Modified:
7 years, 1 month ago
Reviewers:
pdr., Stephen Chennney
CC:
blink-reviews, pdr, Stephen Chennney, krit, rwlbuis, inferno
Visibility:
Public.

Description

[SVG] Fix root element length values handling. SVGLengthContext::determineViewport() currently asserts that we're not resolving lengths for the topmost element, but there's nothing to prevent such calls. The CL updates determineViewport() to handle root elements geracefully (using their current viewport). It also changes the signature slightly to operate directly on a FloatSize, reducing some of the boiler-plate client code. BUG=317484 R=pdr@chromium.org,schenney@chromium.org

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -25 lines) Patch
A LayoutTests/svg/custom/svg-length-value-crash.svg View 1 chunk +12 lines, -0 lines 0 comments Download
A + LayoutTests/svg/custom/svg-length-value-crash-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
A LayoutTests/svg/dom/svg-root-lengths.html View 1 chunk +57 lines, -0 lines 0 comments Download
A LayoutTests/svg/dom/svg-root-lengths-expected.txt View 1 chunk +24 lines, -0 lines 0 comments Download
M Source/core/svg/SVGLengthContext.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/svg/SVGLengthContext.cpp View 4 chunks +18 lines, -21 lines 6 comments Download
M Source/core/svg/graphics/filters/SVGFEImage.cpp View 1 chunk +3 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
f(malita)
7 years, 1 month ago (2013-11-11 18:53:13 UTC) #1
pdr.
LGTM https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp File Source/core/svg/SVGLengthContext.cpp (right): https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp#newcode163 Source/core/svg/SVGLengthContext.cpp:163: FloatSize viewportSize; Nit: I think we prefer to ...
7 years, 1 month ago (2013-11-11 21:03:13 UTC) #2
f(malita)
https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp File Source/core/svg/SVGLengthContext.cpp (right): https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp#newcode163 Source/core/svg/SVGLengthContext.cpp:163: FloatSize viewportSize; On 2013/11/11 21:03:14, pdr wrote: > Nit: ...
7 years, 1 month ago (2013-11-11 21:14:28 UTC) #3
pdr.
https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp File Source/core/svg/SVGLengthContext.cpp (right): https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp#newcode175 Source/core/svg/SVGLengthContext.cpp:175: return value / sqrtf(viewportSize.diagonalLengthSquared() / 2) * 100; On ...
7 years, 1 month ago (2013-11-11 21:16:30 UTC) #4
f(malita)
https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp File Source/core/svg/SVGLengthContext.cpp (right): https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp#newcode163 Source/core/svg/SVGLengthContext.cpp:163: FloatSize viewportSize; On 2013/11/11 21:14:29, Florin Malita wrote: > ...
7 years, 1 month ago (2013-11-11 21:50:05 UTC) #5
pdr.
On 2013/11/11 21:50:05, Florin Malita wrote: > https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp > File Source/core/svg/SVGLengthContext.cpp (right): > > https://codereview.chromium.org/67483003/diff/1/Source/core/svg/SVGLengthContext.cpp#newcode163 ...
7 years, 1 month ago (2013-11-11 21:57:11 UTC) #6
pdr.
On 2013/11/11 21:57:11, pdr wrote: > On 2013/11/11 21:50:05, Florin Malita wrote: > > > ...
7 years, 1 month ago (2013-11-11 21:58:19 UTC) #7
f(malita)
On 2013/11/11 21:58:19, pdr wrote: > On second thought--you need a size, not a rect. ...
7 years, 1 month ago (2013-11-11 22:16:42 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fmalita@chromium.org/67483003/1
7 years, 1 month ago (2013-11-11 22:18:53 UTC) #9
f(malita)
7 years, 1 month ago (2013-11-12 13:47:56 UTC) #10
On 2013/11/11 22:18:53, I haz the power (commit-bot) wrote:
> CQ is trying da patch. Follow status at
> https://chromium-status.appspot.com/cq/fmalita%40chromium.org/67483003/1

Weird: I tried committing this manually, but git cl dcommit threw some error;
then tried again and it was complaining about the -expected file being already
in the tree. After syncing, it appears that the CL has landed after all (but no
metadata was updated):
https://src.chromium.org/viewvc/blink?revision=161749&view=revision

Powered by Google App Engine
This is Rietveld 408576698