Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Issue 9617034: Merge 109104 - Percent width/height SVG not always scaled on window resize (Closed)

Created:
8 years, 9 months ago by Vangelis Kokkevis
Modified:
8 years, 9 months ago
Reviewers:
Vangelis Kokkevis
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Visibility:
Public.

Description

Merge 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11504 lines, -9386 lines) Patch
M LayoutTests/ChangeLog View 2 chunks +11472 lines, -3 lines 0 comments Download
A + LayoutTests/fast/repaint/percent-minheight-resize.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/fast/repaint/percent-minheight-resize-expected.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/svg/custom/svg-percent-scale.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/svg/custom/svg-percent-scale-expected.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/svg/custom/svg-percent-scale-vonly.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/svg/custom/svg-percent-scale-vonly-expected.html View 0 chunks +-1 lines, --1 lines 0 comments Download
M Source/WebCore/ChangeLog View 2 chunks +1 line, -9383 lines 0 comments Download
M Source/WebCore/rendering/RenderBlockLineLayout.cpp View 1 chunk +1 line, -1 line 0 comments Download
M Source/WebCore/rendering/RenderBox.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/WebCore/rendering/RenderBox.cpp View 1 chunk +7 lines, -0 lines 0 comments Download
M Source/WebCore/rendering/RenderReplaced.cpp View 1 chunk +1 line, -3 lines 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGRoot.h View 1 chunk +2 lines, -0 lines 0 comments Download
M Source/WebCore/rendering/svg/RenderSVGRoot.cpp View 3 chunks +24 lines, -2 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
Vangelis Kokkevis
8 years, 9 months ago (2012-03-07 01:42:41 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698