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

Issue 208323007: Fix getBBox() returning (0,0) bug when width or height is zero (Closed)

Created:
6 years, 9 months ago by jmunhoz
Modified:
6 years, 9 months ago
Reviewers:
pdr, pdr., Stephen Chennney
CC:
blink-reviews, shans, eae+blinkwatch, fs, Steve Block, dino_apple.com, rune+blink, krit, alancutter (OOO until 2018), bemjb+rendering_chromium.org, dsinclair, dstockwell, Timothy Loh, jchaffraix+rendering, rwlbuis, Eric Willigers, rjwright, zoltan1, gyuyoung.kim_webkit.org, darktears, kouhei+svg_chromium.org, leviw+renderwatch, Mike Lawther (Google), ed+blinkwatch_opera.com, f(malita), Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/blink.git@myzbackup
Visibility:
Public.

Description

Fix getBBox() returning (0,0) bug when width or height is zero For rects/ellipses with width or height of 0, getBBox() returns the bounding box as being empty. This patch fixes this bug. It ports and extends one initial patch, fixing the isEmpty() check, by Changhun Kang <temoochin@company100.net>; On top of Changhun's patch, this patch addresses the case where rects/ellipses fall back to renderSVGShape and their fill bounding box should not fall back. In detail, this patch involves the following: - Patch for the bug (RenderSVGEllipse, RenderSVGRect and SVGPathData) - Three new test cases for rect, ellipse and circle - Current layout tests updated under platform/linux - Updated TestExpectations BUG=140472 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=170097

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -20 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
A + LayoutTests/platform/linux/svg/W3C-SVG-1.1/animate-elem-32-t-expected.txt View 1 1 chunk +4 lines, -4 lines 0 comments Download
A + LayoutTests/platform/linux/svg/W3C-SVG-1.1/shapes-ellipse-02-t-expected.txt View 1 chunk +2 lines, -2 lines 0 comments Download
A + LayoutTests/platform/linux/svg/W3C-SVG-1.1/shapes-intro-01-t-expected.txt View 1 1 chunk +4 lines, -4 lines 0 comments Download
A + LayoutTests/platform/linux/svg/W3C-SVG-1.1/shapes-rect-02-t-expected.txt View 1 1 chunk +3 lines, -3 lines 0 comments Download
A LayoutTests/svg/custom/getBBox-circle-has-one-zero-value.html View 1 chunk +39 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/getBBox-circle-has-one-zero-value-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/svg/custom/getBBox-ellipse-has-one-zero-value.html View 1 chunk +39 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/getBBox-ellipse-has-one-zero-value-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
A LayoutTests/svg/custom/getBBox-rect-has-one-zero-value.html View 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/svg/custom/getBBox-rect-has-one-zero-value-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGEllipse.cpp View 1 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/svg/RenderSVGRect.cpp View 1 1 chunk +3 lines, -1 line 0 comments Download
M Source/core/rendering/svg/SVGPathData.cpp View 1 2 2 chunks +9 lines, -4 lines 0 comments Download

Messages

Total messages: 42 (0 generated)
jmunhoz
6 years, 9 months ago (2014-03-23 22:08:25 UTC) #1
Stephen Chennney
You don't need all the linux baselines in the patch. It makes it harder to ...
6 years, 9 months ago (2014-03-24 15:38:18 UTC) #2
Stephen Chennney
https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp File Source/core/rendering/svg/RenderSVGEllipse.cpp (right): https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp#newcode75 Source/core/rendering/svg/RenderSVGEllipse.cpp:75: if (style()->svgStyle()->hasStroke() && m_radii.width() && m_radii.height()); Typo? Does strokeWidth() ...
6 years, 9 months ago (2014-03-24 15:49:15 UTC) #3
pdr.
On 2014/03/24 15:38:18, Stephen Chenney wrote: > You don't need all the linux baselines in ...
6 years, 9 months ago (2014-03-24 17:17:56 UTC) #4
pdr.
https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp File Source/core/rendering/svg/RenderSVGEllipse.cpp (right): https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp#newcode60 Source/core/rendering/svg/RenderSVGEllipse.cpp:60: m_usePathFallback = true; I'm afraid this part isn't right. ...
6 years, 9 months ago (2014-03-24 17:39:31 UTC) #5
jmunhoz
On 2014/03/24 15:49:15, Stephen Chenney wrote: > https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp#newcode75 > Source/core/rendering/svg/RenderSVGEllipse.cpp:75: if > (style()->svgStyle()->hasStroke() && m_radii.width() ...
6 years, 9 months ago (2014-03-24 18:42:18 UTC) #6
jmunhoz
https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp File Source/core/rendering/svg/RenderSVGEllipse.cpp (right): https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp#newcode60 Source/core/rendering/svg/RenderSVGEllipse.cpp:60: m_usePathFallback = true; On 2014/03/24 17:39:32, pdr wrote: [...] ...
6 years, 9 months ago (2014-03-24 18:51:23 UTC) #7
jmunhoz
On 2014/03/24 17:39:31, pdr wrote: > https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp > File Source/core/rendering/svg/RenderSVGEllipse.cpp (right): > > https://codereview.chromium.org/208323007/diff/1/Source/core/rendering/svg/RenderSVGEllipse.cpp#newcode60 > ...
6 years, 9 months ago (2014-03-26 00:40:06 UTC) #8
pdr.
Nice work! LGTM with nits. https://codereview.chromium.org/208323007/diff/20001/Source/core/rendering/svg/SVGPathData.cpp File Source/core/rendering/svg/SVGPathData.cpp (right): https://codereview.chromium.org/208323007/diff/20001/Source/core/rendering/svg/SVGPathData.cpp#newcode58 Source/core/rendering/svg/SVGPathData.cpp:58: if (!(rx || ry)) ...
6 years, 9 months ago (2014-03-26 00:55:41 UTC) #9
pdr.
Confusingly, the trybots instantly fail for non-committers. I've triggered some for you.
6 years, 9 months ago (2014-03-26 00:58:22 UTC) #10
jmunhoz
On 2014/03/26 00:55:41, pdr wrote: > Nice work! > > LGTM with nits. > > ...
6 years, 9 months ago (2014-03-26 01:26:22 UTC) #11
pdr.
On 2014/03/26 01:26:22, jmunhoz wrote: > On 2014/03/26 00:55:41, pdr wrote: > > Nice work! ...
6 years, 9 months ago (2014-03-26 01:27:48 UTC) #12
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-26 01:27:53 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/100001
6 years, 9 months ago (2014-03-26 01:28:00 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 01:28:12 UTC) #15
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 9 months ago (2014-03-26 01:28:13 UTC) #16
pdr.
On 2014/03/26 01:28:13, I haz the power (commit-bot) wrote: > Failed to apply patch for ...
6 years, 9 months ago (2014-03-26 01:30:58 UTC) #17
jmunhoz
On 2014/03/26 01:30:58, pdr wrote: > On 2014/03/26 01:28:13, I haz the power (commit-bot) wrote: ...
6 years, 9 months ago (2014-03-26 04:28:59 UTC) #18
pdr
The CQ bit was checked by pdr@google.com
6 years, 9 months ago (2014-03-26 04:33:47 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/150003
6 years, 9 months ago (2014-03-26 04:33:51 UTC) #20
pdr
On 2014/03/26 04:33:51, I haz the power (commit-bot) wrote: > CQ is trying da patch. ...
6 years, 9 months ago (2014-03-26 04:34:53 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 05:39:49 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-26 05:39:50 UTC) #23
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-26 14:25:04 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/150003
6 years, 9 months ago (2014-03-26 14:25:50 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 15:35:40 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-26 15:35:41 UTC) #27
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-26 15:59:00 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/150003
6 years, 9 months ago (2014-03-26 15:59:09 UTC) #29
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 17:03:13 UTC) #30
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-26 17:03:14 UTC) #31
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-26 17:03:34 UTC) #32
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/150003
6 years, 9 months ago (2014-03-26 17:03:50 UTC) #33
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 18:11:44 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-26 18:11:45 UTC) #35
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-26 18:14:15 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/150003
6 years, 9 months ago (2014-03-26 18:14:19 UTC) #37
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 9 months ago (2014-03-26 19:22:31 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: tryserver.blink on linux_blink_dbg
6 years, 9 months ago (2014-03-26 19:22:32 UTC) #39
pdr.
The CQ bit was checked by pdr@chromium.org
6 years, 9 months ago (2014-03-26 19:51:06 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jmunhoz@igalia.com/208323007/150003
6 years, 9 months ago (2014-03-26 19:51:10 UTC) #41
commit-bot: I haz the power
6 years, 9 months ago (2014-03-26 20:55:16 UTC) #42
Message was sent while issue was closed.
Change committed as 170097

Powered by Google App Engine
This is Rietveld 408576698