DescriptionMerge 109104 - Percent width/height SVG not always scaled on window resize
https://bugs.webkit.org/show_bug.cgi?id=79490
Patch by Florin Malita <fmalita@google.com> on 2012-02-28
Reviewed by Nikolas Zimmermann.
Source/WebCore:
Tests: fast/repaint/percent-minheight-resize-expected.html
fast/repaint/percent-minheight-resize.html
svg/custom/svg-percent-scale-expected.html
svg/custom/svg-percent-scale-vonly-expected.html
svg/custom/svg-percent-scale-vonly.html
svg/custom/svg-percent-scale.html
Fix a couple of problems preventing correct SVG scaling on window resize:
- RenderReplaced::computePreferredLogicalWidths is not SVG attribute aware and computes
a non-zero m_minPreferredLogicalWidth even when the SVG widh/height are percentages.
- RenderBlock::layoutInlineChildren is also not SVG attribute aware and does not trigger
percent height child layouts on vertical-only resizes.
* rendering/RenderBlockLineLayout.cpp:
(WebCore::RenderBlock::layoutInlineChildren):
Use hasRelativeDimensions() instead of direct width/height->isPercent tests. This also fixes
an HTML issue where percent {min,max}Height inline elements are not updated on vertical-only resizes.
* rendering/RenderBox.cpp:
(WebCore::RenderBox::hasRelativeDimensions):
(WebCore):
* rendering/RenderBox.h:
(RenderBox):
Add virtual hasRelativeDimensions() method.
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::computePreferredLogicalWidths):
Use hasRelativeDimensions() instead of direct width/height->isPercent tests.
* rendering/svg/RenderSVGRoot.cpp:
(WebCore::RenderSVGRoot::computeReplacedLogicalHeight):
(WebCore::RenderSVGRoot::willBeDestroyed):
Register percent-height SVG elements with the gPercentHeightDescendantsMap, and clean-up on destruction
or height unit change.
(WebCore::RenderSVGRoot::hasRelativeDimensions):
(WebCore):
* rendering/svg/RenderSVGRoot.h:
(RenderSVGRoot):
SVG-aware hasRelativeDimensions() override.
LayoutTests:
* fast/repaint/percent-minheight-resize-expected.html: Added.
* fast/repaint/percent-minheight-resize.html: Added.
* svg/custom/svg-percent-scale-expected.html: Added.
* svg/custom/svg-percent-scale-vonly-expected.html: Added.
* svg/custom/svg-percent-scale-vonly.html: Added.
* svg/custom/svg-percent-scale.html: Added.
TBR=commit-queue@webkit.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=109991
Patch Set 1 #
Created: 8 years, 9 months ago
(Patch set is too large to download)
Messages
Total messages: 1 (0 generated)
|