Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Fix cross-direction stretch for replaced elements in row flexbox
https://bugs.webkit.org/show_bug.cgi?id=94237 Patch by Shezan Baig <sbaig1@bloomberg.net> on 2012-08-21 Reviewed by Ojan Vafai. Source/WebCore: When stretching, don't take into account the instrinsic size of child replaced elements. Only the fixed size, min size, and max size of the child should be taken into account. The logic that computed this was moved from RenderBox::computeLogicalHeight to a new helper method called logicalHeightConstrainedByMinMax. This helper method is now used from RenderFlexibleBox::applyStretchAlignmentToChild, instead of using RenderBox::computeLogicalHeight. A similar change will need to be made for column-flowing flexboxes. This will be addressed in https://webkit.org/b/94604. No new tests. The existing css3/flexbox/flexitem.html test was extended to cover this case. * rendering/RenderBox.cpp: (WebCore::RenderBox::logicalHeightConstrainedByMinMax): New helper method that is used by RenderBox::computeLogicalHeight and also by RenderFlexibleBox::applyStretchAlignmentToChild. (WebCore): (WebCore::RenderBox::computeLogicalHeight): Updated to use the new logicalHeightConstrainedByMinMax helper method. * rendering/RenderBox.h: (RenderBox): * rendering/RenderFlexibleBox.cpp: (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild): Use logicalHeightConstrainedByMinMax instead of computeLogicalHeight. LayoutTests: Fix test cases for images stretching in the cross direction. Also, added test cases for stretching/shrinking iframes, seamless iframes, and also tests for vertically flowing flexboxes. * css3/flexbox/flexitem-expected.txt: * css3/flexbox/flexitem.html: Canonical link: https://commits.webkit.org/112489@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@126257 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
1 parent
25d8522
commit 8de74ae54d84069d4176926c9997f58bcaa5ea2b
Showing
7 changed files
with
168 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters