Flexbox doesn't need to compute logical height for stretched items in row flow
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 19:46:51 +0000 (19:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 23 Aug 2012 19:46:51 +0000 (19:46 +0000)
commit8c7b9c8e5a0f1bb2c514b81f4a4a9a8d6a169baf
treeb6373549d6178ea688df238ec3e5e27138b1ab01
parent231189b588c64c00f0fbbcc4517a1d5e41afdfca
Flexbox doesn't need to compute logical height for stretched items in row flow
https://bugs.webkit.org/show_bug.cgi?id=94807

Patch by Shezan Baig <shezbaig.wk@gmail.com> on 2012-08-23
Reviewed by Tony Chang.

Change logicalHeightConstrainedByMinMax to
constrainLogicalHeightByMinMax. The new method doesn't compute the
MainOrPreferred logical height (that computation has been moved back to
computeLogicalHeight). RenderFlexibleBox now just constrains the
stretchedLogicalHeight by min/max.

No new tests. This is a cleanup of bug 94237.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax): Instead of
computing the MainOrPreferred logical height, just constrain the given
logical height by MinSize and MaxSize.
(WebCore::RenderBox::computeLogicalHeight): Compute the MainOrPreferred
logical height before constraining by min/max.
* rendering/RenderBox.h:
(RenderBox):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Use
constrainLogicalHeightByMinMax to constrain the stretchedLogicalHeight.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126468 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderBox.h
Source/WebCore/rendering/RenderFlexibleBox.cpp