Relative-height block SVG root not layed out on container height change
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Mar 2012 00:37:32 +0000 (00:37 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 20 Mar 2012 00:37:32 +0000 (00:37 +0000)
commit4969ef27decfd760693465d9cf1b7dde44683c89
tree2970348f031e7eb0f0867cfdcba7d44c295de739
parent935b5c4b6709abed47f6dd039c55c4b59d404529
Relative-height block SVG root not layed out on container height change
https://bugs.webkit.org/show_bug.cgi?id=81513

Patch by Florin Malita <fmalita@google.com> on 2012-03-19
Reviewed by Dirk Schulze.

Source/WebCore:

Tests: svg/custom/svg-percent-scale-block-expected.html
       svg/custom/svg-percent-scale-block.html

A couple of places still have style()->logical{Min,Max,}Height percent checks,
which do not work for SVG elements. This patch adds a virtual hasRelativeLogicalHeight()
RenderBox method to replace the explicit style checks.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::layoutBlockChildren):
Use virtual hasRelativeLogicalHeight() instead of logical height style checks.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasRelativeLogicalHeight):
(WebCore):
* rendering/RenderBox.h:
(RenderBox):
Add virtual hasRelativeLogicalHeight().

* rendering/RenderView.cpp:
(WebCore::RenderView::layout):
Use virtual hasRelativeLogicalHeight() instead of logical height style checks, if possible.

* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::hasRelativeLogicalHeight):
(WebCore):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
Add hasRelativeLogicalHeight() override.

LayoutTests:

* svg/custom/svg-percent-scale-block-expected.html: Added.
* svg/custom/svg-percent-scale-block.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111279 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/svg/custom/svg-percent-scale-block-expected.html [new file with mode: 0644]
LayoutTests/svg/custom/svg-percent-scale-block.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBlock.cpp
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.cpp
Source/WebCore/rendering/svg/RenderSVGRoot.h