SVG content renders in incorrect vertical position when padding-left is not specified
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jun 2016 18:40:02 +0000 (18:40 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jun 2016 18:40:02 +0000 (18:40 +0000)
commit2631666c339114edd0adc54723f50c695825ac97
treeb7c4029744f5f2ed8ab86c6c8a4b4d71d51c3c58
parentc67330c1b832ea772e1d40b59ab46f2e9715ec15
SVG content renders in incorrect vertical position when padding-left is not specified
https://bugs.webkit.org/show_bug.cgi?id=158234

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-06-02
Reviewed by Darin Adler.

Source/WebCore:

Fix the optimization in RenderSVGRoot::buildLocalToBorderBoxTransform().
Use LayoutSize::isZero() instead of LayoutSize::isEmpty() to decide whether
there is borderAndPadding applied or not.

Test: svg/custom/svg-root-padding-individual.html

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::buildLocalToBorderBoxTransform):

LayoutTests:

Make sure the SVG root element is positioned correctly when either the sum
of its (leftPadding + rightPadding) or the sum of its (topPadding + bottomPadding)
is equal to zero.

* svg/custom/svg-root-padding-individual-expected.html: Added.
* svg/custom/svg-root-padding-individual.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@201604 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/svg-root-padding-individual-expected.html [new file with mode: 0644]
LayoutTests/svg/custom/svg-root-padding-individual.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGRoot.cpp