Changeset 160159 in webkit
- Timestamp:
- Dec 4, 2013, 9:11:06 PM (13 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 3 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/css/viewport-percentage-compute-box-height-expected.html (added)
-
LayoutTests/fast/css/viewport-percentage-compute-box-height.html (added)
-
LayoutTests/fast/css/viewport-percentage-compute-box-width-expected.html (added)
-
LayoutTests/fast/css/viewport-percentage-compute-box-width.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r160150 r160159 1 2013-12-04 Gurpreet Kaur <k.gurpreet@samsung.com> 2 3 % unit heights don't work if parent block height is set in vh 4 https://bugs.webkit.org/show_bug.cgi?id=118516 5 6 Reviewed by Simon Fraser. 7 8 From Blink r156449 by <srinivasa.ragavan.venkateswaran@intel.com> 9 10 * fast/css/viewport-percentage-compute-box-height-expected.html: Added. 11 * fast/css/viewport-percentage-compute-box-height.html: Added. 12 * fast/css/viewport-percentage-compute-box-width-expected.html: Added. 13 * fast/css/viewport-percentage-compute-box-width.html: Added. 14 Added new tests for verifying that percentage unit height/width works 15 if parent block height/width is set in vh/vw units. 16 1 17 2013-12-04 Filip Pizlo <fpizlo@apple.com> 2 18 -
trunk/Source/WebCore/ChangeLog
r160158 r160159 1 2013-12-04 Gurpreet Kaur <k.gurpreet@samsung.com> 2 3 % unit heights don't work if parent block height is set in vh 4 https://bugs.webkit.org/show_bug.cgi?id=118516 5 6 Reviewed by Simon Fraser. 7 8 From Blink r156449 by <srinivasa.ragavan.venkateswaran@intel.com> 9 10 An element having height as percentage needs to have the 11 containingblock's height or availableheight to calculate its 12 own height. The containing block having a height set in vh 13 unit was not being considered for calculating the child's 14 height. 15 16 Tests: fast/css/viewport-percentage-compute-box-height.html 17 fast/css/viewport-percentage-compute-box-width.html 18 19 * rendering/RenderBox.cpp: 20 (WebCore::RenderBox::computePercentageLogicalHeight): 21 Correct child's height(in pecentage) was not being calculated 22 incase of parent having height set in vh unit. Added condition 23 to calculate the containing block height in terms of viewport size. 24 1 25 2013-12-04 Roger Fong <roger_fong@apple.com> 2 26 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r159779 r160159 2727 2727 // return value from the recursive call will not have been adjusted 2728 2728 // yet. 2729 LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight()); 2730 availableHeight = std::max<LayoutUnit>(0, contentBoxHeight); 2731 } 2732 } else if (cbstyle.logicalHeight().isViewportPercentage()) { 2733 LayoutUnit heightWithScrollbar = valueForLength(cbstyle.logicalHeight(), 0, &view()); 2734 if (heightWithScrollbar != -1) { 2735 LayoutUnit contentBoxHeightWithScrollbar = cb->adjustContentBoxLogicalHeightForBoxSizing(heightWithScrollbar); 2736 // We need to adjust for min/max height because this method does 2737 // not handle the min/max of the current block, its caller does. 2738 // So the return value from the recursive call will not have been 2739 // adjusted yet. 2729 2740 LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight()); 2730 2741 availableHeight = std::max<LayoutUnit>(0, contentBoxHeight);
Note:
See TracChangeset
for help on using the changeset viewer.