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

Issue 2798903005: Return computed style for width/height for non-root SVG (Closed)

Created:
3 years, 8 months ago by Xianzhu
Modified:
3 years, 8 months ago
Reviewers:
fs
CC:
fs, darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, blink-reviews-layout_chromium.org, blink-reviews-style_chromium.org, chromium-reviews, dglazkov+blink, krit, eae+blinkwatch, fmalita+watch_chromium.org, gyuyoung2, jchaffraix+rendering, kouhei+svg_chromium.org, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, pdr+svgwatchlist_chromium.org, rwlbuis, Stephen Chennney, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Return 'auto' for width/height for non-root SVG According to the specs: - https://www.w3.org/TR/CSS2/visudet.html#the-height-property: The 'height' property doesn't apply to non-atomic inline elements. - https://drafts.csswg.org/cssom/#resolved-value: getComputeStyle() returns resolved values. For a property that doesn't apply, the resolved value is the computed value. Actually because of crbug.com/708888 'auto' is not the computed value when width/height is specified, but this keeps the current behavior. I didn't find spec about whether a non-root SVG is inline or not, but SVG's display's initial value is 'inline', and we treat most of the SVG elements always as inline. We treat SVG text as block internally just because we implement SVG text based on LayoutBlockFlow, which is an implementation detail and should not affect cssom. BUG=708687 Review-Url: https://codereview.chromium.org/2798903005 Cr-Commit-Position: refs/heads/master@{#462508} Committed: https://chromium.googlesource.com/chromium/src/+/e60f30d448ad169ebc5c7f1cf45e83da2af33959

Patch Set 1 #

Patch Set 2 : - #

Patch Set 3 : - #

Total comments: 2

Patch Set 4 : - #

Patch Set 5 : Reduce behavior change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+31 lines, -8 lines) Patch
A third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html View 1 2 3 4 1 chunk +16 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/ComputedStyleCSSValueMapping.cpp View 1 2 3 4 3 chunks +15 lines, -8 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
Xianzhu
3 years, 8 months ago (2017-04-05 21:25:02 UTC) #2
fs
lgtm https://codereview.chromium.org/2798903005/diff/40001/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html File third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html (right): https://codereview.chromium.org/2798903005/diff/40001/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html#newcode14 third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html:14: }); Add a <title> or an explicit test ...
3 years, 8 months ago (2017-04-05 21:36:38 UTC) #3
Xianzhu
https://codereview.chromium.org/2798903005/diff/40001/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html File third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html (right): https://codereview.chromium.org/2798903005/diff/40001/third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html#newcode14 third_party/WebKit/LayoutTests/svg/css/getComputedStyle-svg-text-width-height.html:14: }); On 2017/04/05 21:36:38, fs wrote: > Add a ...
3 years, 8 months ago (2017-04-05 21:48:25 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2798903005/60001
3 years, 8 months ago (2017-04-05 21:49:31 UTC) #7
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/423042)
3 years, 8 months ago (2017-04-05 23:05:32 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2798903005/70001
3 years, 8 months ago (2017-04-06 05:19:30 UTC) #12
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/416366)
3 years, 8 months ago (2017-04-06 07:31:30 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2798903005/70001
3 years, 8 months ago (2017-04-06 15:11:28 UTC) #17
commit-bot: I haz the power
3 years, 8 months ago (2017-04-06 16:47:37 UTC) #20
Message was sent while issue was closed.
Committed patchset #5 (id:70001) as
https://chromium.googlesource.com/chromium/src/+/e60f30d448ad169ebc5c7f1cf45e...

Powered by Google App Engine
This is Rietveld 408576698