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

Issue 422503002: HTMLImageElement.natural{Width,Height} should return intrinsic dimensions (Closed)

Created:
6 years, 5 months ago by fs
Modified:
6 years, 4 months ago
Reviewers:
pdr., Yoav Weiss
CC:
blink-reviews, dglazkov+blink, blink-reviews-html_chromium.org
Project:
blink
Visibility:
Public.

Description

HTMLImageElement.natural{Width,Height} should return intrinsic dimensions HTML says: "The IDL attributes naturalWidth and naturalHeight must return the intrinsic width and height of the image, in CSS pixels, if the image is available, or else 0." Change HTMLImageElement::natural{Width,Height} to request the intrinsic size from ImageResource::imageSizeForRenderer by passing IntrinsicSize as the third parameter. This makes the attributes return more appropriate values for SVG-images in <img>. BUG=396955 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=179030

Patch Set 1 #

Total comments: 6

Patch Set 2 : Test tweaks. #

Patch Set 3 : Two more spots... #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -2 lines) Patch
A LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html View 1 2 1 chunk +44 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg-expected.txt View 1 1 chunk +10 lines, -0 lines 0 comments Download
M Source/core/html/HTMLImageElement.cpp View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
fs
Wrote the tests based on my interpretation of the spec - Gecko/FF seemed to agree. ...
6 years, 5 months ago (2014-07-25 14:24:36 UTC) #1
Yoav Weiss
On 2014/07/25 14:24:36, fs wrote: > Wrote the tests based on my interpretation of the ...
6 years, 5 months ago (2014-07-25 15:08:54 UTC) #2
fs
On 2014/07/25 15:08:54, Yoav Weiss wrote: > On 2014/07/25 14:24:36, fs wrote: ... > Also ...
6 years, 5 months ago (2014-07-25 15:37:15 UTC) #3
pdr.
LGTM if you end up liking the IE results. https://codereview.chromium.org/422503002/diff/1/LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html File LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html (right): https://codereview.chromium.org/422503002/diff/1/LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html#newcode11 LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html:11: ...
6 years, 5 months ago (2014-07-25 20:02:57 UTC) #4
fs
Can't say I "liked" the IE results, but at least they were consistent... ;-) https://codereview.chromium.org/422503002/diff/1/LayoutTests/fast/dom/HTMLImageElement/image-natural-width-height-svg.html ...
6 years, 4 months ago (2014-07-28 08:57:00 UTC) #5
fs
The CQ bit was checked by fs@opera.com
6 years, 4 months ago (2014-07-28 12:10:42 UTC) #6
fs
The CQ bit was unchecked by fs@opera.com
6 years, 4 months ago (2014-07-28 12:10:47 UTC) #7
fs
The CQ bit was checked by fs@opera.com
6 years, 4 months ago (2014-07-28 12:11:29 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/fs@opera.com/422503002/40001
6 years, 4 months ago (2014-07-28 12:11:48 UTC) #9
commit-bot: I haz the power
6 years, 4 months ago (2014-07-28 12:15:11 UTC) #10
Message was sent while issue was closed.
Change committed as 179030

Powered by Google App Engine
This is Rietveld 408576698