list-style-image with SVG image renders at incorrect size.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Apr 2015 20:02:20 +0000 (20:02 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Apr 2015 20:02:20 +0000 (20:02 +0000)
commit6728d50f31595e958b84080ae776f12ac44aec57
tree76caca66160b9105bf064a1d32d31ba5e956bcf7
parent415701b2648b8b0f7c6309c76c6ac09028ffcc23
list-style-image with SVG image renders at incorrect size.
https://bugs.webkit.org/show_bug.cgi?id=141367.

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2015-04-13
Reviewed by Darin Adler.
Source/WebCore:

This patch imports https://codereview.chromium.org/197203003.

When using an SVG as list marker image, don't unconditionally set the
dimensions to a square with the dimensions of ascent / 2, but rather
determine a suitable size using intrinsic dimensions (and ratio).

Test: svg/as-list-image/svg-list-image-intrinsic-size-1.html

* rendering/RenderListMarker.cpp:
(WebCore::RenderListMarker::updateContent):

LayoutTests:

Ensure the SVG image gets the correct size when used as an image list.

* svg/as-list-image: Added.
* svg/as-list-image/svg-list-image-intrinsic-size-1-expected.html: Added.
* svg/as-list-image/svg-list-image-intrinsic-size-1.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182751 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/as-list-image/svg-list-image-intrinsic-size-1-expected.html [new file with mode: 0644]
LayoutTests/svg/as-list-image/svg-list-image-intrinsic-size-1.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderListMarker.cpp