haikuwebkit/LayoutTests/fast/hidpi/percent-height-image-nested...

25 lines
432 B
HTML
Raw Permalink Normal View History

<!doctype html>
<head>
<style>
.flex { display: flex }
Laili restaurant menu page does not display full menu https://bugs.webkit.org/show_bug.cgi?id=173062 rdar://problem/32436486 Reviewed by Simon Fraser. Source/WebCore: Percentage heights inside auto containing blocks were handled correctly by hasReplacedLogicalHeight, which checked hasAutoHeightOrContainingBlockWithAutoHeight properly. min-max-height were not handled properly though and need to do the same check. There is also now a quirk for iBooks to preserve the old behavior, since they depend on the old behavior to constrain the height of images to a page. Test: fast/replaced/max-height-percent-inside-auto-block.html * rendering/RenderBox.cpp: (WebCore::RenderBox::replacedMinMaxLogicalHeightComputesAsNone): Add a new helper that resolves min and max logical height values to none for replaced elements with percentage min/max heights inside auto containing blocks. (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight): Change the min/max-height constraint function for replaced elements to call the new helper function. * rendering/RenderBox.h: * rendering/RenderBoxModelObject.h: Move a function from private to protected so that RenderBox can access it. LayoutTests: * fast/hidpi/percent-height-image-nested-expected.html: * fast/hidpi/percent-height-image-nested.html: * fast/multicol/pagination/RightToLeft-max-width.html: * fast/replaced/max-height-percent-inside-auto-block-expected.html: Added. * fast/replaced/max-height-percent-inside-auto-block.html: Added. * platform/mac/fast/multicol/pagination/RightToLeft-max-width-expected.txt: Canonical link: https://commits.webkit.org/189967@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@217943 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-06-08 20:06:44 +00:00
img { max-height:100%; max-width:100%; }
body, html { height:100% }
html { overflow:hidden }
</style>
</head>
<body>
<div class="flex">
<div class="flex">
<div>
<img src="resources/blue-1500-2000-px.png">
</div>
</div>
</div>
</div>
<script>
document.body.offsetWidth
document.body.style.width = '20%'
document.body.offsetHeight
</script>