author Ted Campbell <>
Thu, 26 Jan 2023 15:53:21 +0000
changeset 650660 4af274d4ee613437631074174934b5739d002880
parent 395806 fa4b66ef6331bb6358dea77f96283d60be251af5
permissions -rw-r--r--
Bug 1811411 - Add profiler marker when discarding JitCode r=jandem Similar to the Discard marker, it seems useful to have a profile marker for discard events since they can toss a lot of Jit code. Differential Revision:

<!DOCTYPE html>
     Any copyright is dedicated to the Public Domain.
  <meta charset="utf-8">
  <title>CSS Grid Test: Clamp 'automatic minimum size' to definite max-sizing of block item with margin:auto</title>
  <link rel="author" title="Mats Palmgren" href="">
  <link rel="help" href="">
  <link rel="match" href="grid-item-auto-min-size-clamp-005-ref.html">
  <style type="text/css">
body,html { color:black; background:white; font:16px/1 monospace; padding:0; margin:0; }

.grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(auto, 15px));
  grid-template-rows:    repeat(2,minmax(auto, 10px));
  grid-gap: 1px;
  align-items: start;
  justify-items: start;
  float: left;
  border: 1px dashed;
  margin-right: 16px;
  margin-bottom: 14px;
.sz {
  width: 40px;
  height: 40px;

.definite {
  grid-template-columns: repeat(2,15px);
  grid-template-rows:    repeat(2,10px);
.min {
  grid-template-columns: repeat(2,minmax(min-content, 15px));
  grid-template-rows:    repeat(2,minmax(min-content, 10px));
.max {
  grid-template-columns: repeat(2,minmax(max-content, 15px));
  grid-template-rows:    repeat(2,minmax(max-content, 10px));

.larger .grid {
  grid-template-columns: repeat(2,minmax(auto, 25px));
  grid-template-rows:    repeat(2,minmax(auto, 28px));
.larger .definite {
  grid-template-columns: repeat(2,25px);
  grid-template-rows:    repeat(2,28px);
.larger .min {
  grid-template-columns: repeat(2,minmax(min-content, 25px));
  grid-template-rows:    repeat(2,minmax(min-content, 28px));
.larger .max {
  grid-template-columns: repeat(2,minmax(max-content, 25px));
  grid-template-rows:    repeat(2,minmax(max-content, 28px));

.stretch .grid {
  align-items: stretch;
  justify-items: stretch;

span {
  grid-area: 1 / 1;
  font-size: 48px;
  background: grey;
  background-clip: content-box;
  border: 1px solid;
  padding: 1px 3px 5px 7px;
  margin: auto;
.span2 {
  grid-area: 1 / 1 / span 2 / span 2;
.larger .grid .span2 {
  font-size: 16px;

x {
  grid-area: 1 / 1;
  min-width: 0;
  min-height: 0;
  align-self: stretch;
  justify-self: stretch;
  background: cyan;
c {
  display: block;
  width: 20px;
  height: 32px;

br {
  clear: both;

<div id="tests">
<div class="grid"><x></x><span><c>X</c></span></div>
<div class="grid definite"><x></x><span><c>X</c></span></div>
<div class="grid"><x></x><span class="span2"><c>X</c></span></div>
<div class="grid definite"><x></x><span class="span2"><c>X</c></span></div>

<div class="grid sz"><x></x><span><c>X</c></span></div>
<div class="grid sz definite"><x></x><span><c>X</c></span></div>
<div class="grid sz"><x></x><span class="span2"><c>X</c></span></div>
<div class="grid sz definite"><x></x><span class="span2"><c>X</c></span></div>


<div class="grid min"><x></x><span><c>X</c></span></div>
<div class="grid min"><x></x><span class="span2"><c>X</c></span></div>
<div class="grid sz min"><x></x><span><c>X</c></span></div>
<div class="grid sz min"><x></x><span class="span2"><c>X</c></span></div>

<div class="grid max"><x></x><span><c>X</c></span></div>
<div class="grid max"><x></x><span class="span2"><c>X</c></span></div>
<div class="grid sz max"><x></x><span><c>X</c></span></div>
<div class="grid sz max"><x></x><span class="span2"><c>X</c></span></div>



var tests = document.getElementById('tests');

var n = tests.cloneNode(true);
var wrap = document.createElement('div');
wrap.className = 'larger';

/* TODO: sort out first
var n = tests.cloneNode(true);
var wrap = document.createElement('div');
wrap.className = 'stretch';

var n = tests.cloneNode(true);
var wrap = document.createElement('div');
wrap.className = 'stretch larger';