author Ting-Yu Lin <>
Thu, 29 Oct 2020 22:43:53 +0000
changeset 555163 9a7e5873fac52c3fea4e8d9843e0aaf8e9158eb7
parent 448947 6f3709b3878117466168c40affa7bca0b60cf75b
permissions -rw-r--r--
Bug 1672462 - Compute flex item's content size suggestion in inline axis via nsIFrame::ComputeSize. r=emilio Flex item's content size suggestion is the min-content size in the main axis. Quoting from the CSS Sizing spec, section "5.1. Intrinsic Sizes", The min-content size of a box in each axis is the size it would have if it was a float given an auto size in that axis (and no minimum or maximum size in that axis) and if its containing block was zero-sized in that axis. (In other words, the minimum size it has when sized as “shrink-to-fit”.) However, all the frame types' GetMinISize() doesn't consider aspect ratio (either the intrinsic aspect ratio on images or svg, or the preferred aspect ratio set by the aspect-ratio property). That is, we currently don't allow `aspect ratio * definite block-size` as part of the equation in `inline-size:min-content` (bug 1646100 or bug 1670151). Luckily, nsIFrame::ComputeSize() already takes care of this [2]. We just need to add a flag to let ComputeSize() behave as if the flex item had an auto inline size. The code should be similar to FloatMarginISize() in BlockReflowInput.cpp except we are calculate the flex item's content-box size. [1] [2],2735-2736 Differential Revision:

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:expandtab:shiftwidth=2:tabstop=2:
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at */


#include "ARIAGridAccessible.h"

namespace mozilla {
namespace a11y {

typedef class ARIAGridAccessible ARIAGridAccessibleWrap;
typedef class ARIAGridCellAccessible ARIAGridCellAccessibleWrap;

}  // namespace a11y
}  // namespace mozilla