RenderTreeNeedsLayoutChecker fails with absolutely positioned svg and <use>
authorzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2018 01:31:09 +0000 (01:31 +0000)
committerzalan@apple.com <zalan@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 Mar 2018 01:31:09 +0000 (01:31 +0000)
commitf6ddcfbe2ff7d40976121294dc081a2c0827a86f
tree41f48b0328eda89f648934251652c5fa675aa430
parent5a5d3ecfe58953c6fecd6e316c18cd673922ed2c
RenderTreeNeedsLayoutChecker fails with absolutely positioned svg and <use>
https://bugs.webkit.org/show_bug.cgi?id=183718

Reviewed by Antti Koivisto.

Source/WebCore:

This patch ensures after resolving the style for an SVG element with a corresponding element (<use>),
we adjust this style for the cloned SVG element too.

Test: svg/in-html/path-with-absolute-positioned-svg-and-use-crash.html

* css/StyleResolver.cpp:
(WebCore::StyleResolver::adjustSVGElementStyle):
(WebCore::StyleResolver::adjustRenderStyle):
* css/StyleResolver.h:
* svg/SVGElement.cpp:
(WebCore::SVGElement::resolveCustomStyle):

LayoutTests:

* svg/in-html/path-with-absolute-positioned-svg-and-use-crash-expected.txt: Added.
* svg/in-html/path-with-absolute-positioned-svg-and-use-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@229782 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/in-html/path-with-absolute-positioned-svg-and-use-crash-expected.txt [new file with mode: 0644]
LayoutTests/svg/in-html/path-with-absolute-positioned-svg-and-use-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/svg/SVGElement.cpp