зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1316534 Part 4 - Fix some incorrect flexbox tests. r=dholbert
test_dynamic_reflow_root_disallowal.html: in the next part, we can calculate `min-size:auto` as the minimum of specified size and content size correctly regardless of the value of `flex-basis`. If we do not reset the `inline-size` (or `block-size`) to `auto`, the flex item's min-width (or min-height) will always be its specified size (`width:10px` or `height:10px` set in `gReflowRootCandidateStyles`), and changing `inner` to the content size from `width:20px` to `width:40px` will have no effect. flex-minimum-{width,height}-flex-items-005.xht: To make the flex item resolve min-height:auto as the specified size, the content (image) size must be larger than it. So here we change the image size to 200x200. Google Chrome can also pass this test after this patch. Differential Revision: https://phabricator.services.mozilla.com/D90619
This commit is contained in:
Родитель
564bb2b2b9
Коммит
67b8f275d9
|
@ -248,17 +248,17 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1508420
|
|||
// Testing the magic "min-main-size:auto" keyword
|
||||
// and other intrinsic min/max sizes
|
||||
{ desc: "flex-min-inline-size-auto",
|
||||
candStyle: "flex:0 5px;min-inline-size:auto",
|
||||
candStyle: "flex:0 5px; inline-size:auto; min-inline-size:auto",
|
||||
},
|
||||
{ desc: "flex-min-inline-size-min-content",
|
||||
candStyle: "flex:0 5px;min-inline-size:min-content",
|
||||
candStyle: "flex:0 5px; inline-size:auto; min-inline-size:min-content",
|
||||
},
|
||||
{ desc: "flex-min-block-size-auto",
|
||||
candStyle: "flex:0 5px;min-block-size:auto",
|
||||
candStyle: "flex:0 5px; block-size:auto; min-block-size:auto",
|
||||
isContainerColumnOriented: true,
|
||||
},
|
||||
{ desc: "flex-min-block-size-auto",
|
||||
candStyle: "flex:0 5px;min-block-size:min-content",
|
||||
candStyle: "flex:0 5px; block-size:auto; min-block-size:min-content",
|
||||
isContainerColumnOriented: true,
|
||||
},
|
||||
];
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto" title="4.5. Implied Minimum Size of Flex Items" />
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
|
||||
<meta name="assert" content="Checks that minimum height for flex items is the specified size, as the min-content size of the image corresponds to that." />
|
||||
<meta name="assert" content="Checks that automatic minimum height for flex items is the specified size suggestion, when that is the smallest of the available suggestions." />
|
||||
<style type="text/css"><![CDATA[
|
||||
#reference-overlapped-red {
|
||||
position: absolute;
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
<div id="reference-overlapped-red"></div>
|
||||
<div id="constrained-flex">
|
||||
<img id="test-flex-item-overlapping-green" src="support/60x60-green.png" />
|
||||
<img id="test-flex-item-overlapping-green" src="support/200x200-green.png" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com" />
|
||||
<link rel="help" href="http://www.w3.org/TR/css-flexbox-1/#min-size-auto" title="4.5. Implied Minimum Size of Flex Items" />
|
||||
<link rel="match" href="../reference/ref-filled-green-100px-square.xht" />
|
||||
<meta name="assert" content="Checks that minimum width for flex items is the specified size, as the min-content size of the image corresponds to that." />
|
||||
<meta name="assert" content="Checks that automatic minimum width for flex items is the specified size suggestion, when that is the smallest of the available suggestions." />
|
||||
<style type="text/css"><![CDATA[
|
||||
#reference-overlapped-red {
|
||||
position: absolute;
|
||||
|
@ -30,7 +30,7 @@
|
|||
|
||||
<div id="reference-overlapped-red"></div>
|
||||
<div id="constrained-flex">
|
||||
<img id="test-flex-item-overlapping-green" src="support/60x60-green.png" />
|
||||
<img id="test-flex-item-overlapping-green" src="support/200x200-green.png" />
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Загрузка…
Ссылка в новой задаче