gecko-dev/layout/reftests/flexbox/flexbox-resizeviewport-2-helper.html

33 lines
729 B
HTML
Raw Normal View History

Bug 1174003 part 5: [css-flexbox] Remove is-{main,cross}-axis-horizontal checks from ReflowFlexItem. r=mats This patch mostly[1] doesn't affect behavior. It just changes some ReflowInput width/height-setting logic to use ISize/BSize setters instead of width/height setters. To help with this, I'm also adding some more getters to answer the question "is this flex item's {inline,block} axis the same as the flex container's {main,cross} axis", for convenience/readability at callsites. (All of these getters are simply giving a different view of the same underlying single bit of information.) [1] One way this patch *kind of* affects behavior: it generalizes the conditions under which we set the NS_FRAME_CONTAINS_RELATIVE_BSIZE flag on a flex item. But that doesn't actually have any user-visible effects right now, because that flag's only purpose is to determine whether we should reflow, and currently we always reflow all flex items. If/when that changes, though (i.e. when we start reflowing flex items more selectively), this patch is adding a reftest that may test this generalized behavior. (The reftest actually trivially passes right now, due to unrelated bug 1441348.) MozReview-Commit-ID: 4NEKLBAjowh --HG-- rename : layout/reftests/flexbox/flexbox-resizeviewport-1-helper.html => layout/reftests/flexbox/flexbox-resizeviewport-2-helper.html rename : layout/reftests/flexbox/flexbox-resizeviewport-1-ref.xhtml => layout/reftests/flexbox/flexbox-resizeviewport-2-ref.xhtml rename : layout/reftests/flexbox/flexbox-resizeviewport-1.xhtml => layout/reftests/flexbox/flexbox-resizeviewport-2.xhtml extra : rebase_source : c6535e1cdcb1757a16cd02e0d485638827344c23
2018-02-27 23:40:18 +00:00
<!--
Any copyright is dedicated to the Public Domain.
http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- Helper-file for reftest flexbox-resizeviewport-2.xhtml
I'm intentionally using quirks-mode (no doctype), so that
a 100% width (block-size) will work. -->
<html>
<head>
<style>
html { writing-mode: vertical-rl; }
div.flexbox {
display: flex;
width: 100%;
border: 2px dashed black;
}
div.a {
flex: 1;
background: pink;
}
div.b {
flex: 1;
background: teal;
}
</style>
</head>
<body>
<div class="flexbox">
<div class="a"></div><div class="b"></div>
</div>
</body>
</html>