fune/gfx
Jonathan Kew 80bd914f0b Bug 1782385 - Improve sizing heuristics in nsTextControlFrame::CalcIntrinsicSize. r=emilio
This is somewhat arbitrary, as the behavior of the 'size' attribute is not clearly specified
for non-fixed-width fonts where "character width" is a vague concept. So there's no absolute
"right" or "wrong" result, but there are cases where our current behavior feels quite wrong
to authors.

There are two adjustments here that aim to make the behavior more consistent and predictable.
First, rather than using the font's "average" char width (which is itself not a clearly-
defined or reliably-set metric) as the basic multiplier for the 'size' attribute, prefer
to use the width of the zero glyph (0), if present. This makes size-attribute-based input
fields behave more consistently with fields sized using the CSS 'ch' unit, rather than
having apparently-random inconsistencies between the two.

Second, the existing code adds a "padding" factor based on the font's maxAdvance, but this
can be quite excessive with modern fonts, where there may be outliers such as logo glyphs
or long ligatures that are much wider than typical characters. E.g. the macOS system font
has a triple-em-dash ligature; or the Ubuntu font, which declares an advanceWidthMax of
3511 units, although the widest glyph I can find is the "ffl" ligature with a width of 1053
units.

To limit the effect that such outliers (or incorrect metadata) can have, I'm proposing to
clamp the "max" width that we use here to twice the "char width" derived from the zero glyph
or the font's declared average. So we're still doing the "IE-like" addition of some extra
width when using non-fixed-space fonts, but it won't become as huge as it currently does
in some cases (depending on font details).

Differential Revision: https://phabricator.services.mozilla.com/D176922
2023-05-09 14:49:08 +00:00
..
2d Bug 1831188: Process pending deletions in DrawEventRecorderPrivate::DetachResources. r=aosmond 2023-05-03 21:47:12 +00:00
angle Bug 1794292 - [ANGLE] cherry-pick init-gl-point-size. r=gfx-reviewers,bradwerth 2023-03-30 21:54:32 +00:00
cairo
config Bug 1830792 - [3/4] Remove is-nightly check for bug 1704954 mitigation r=gfx-reviewers,bradwerth 2023-05-03 14:24:35 +00:00
docs
gl Bug 1828071 [Linux] Rename nsDMABufDevice to DMABufDevice and nsGbmLib to GbmLib r=emilio 2023-04-26 12:52:09 +00:00
graphite2 Bug 1829053 - Enable graphite malloc wrapping in the wasm sandbox. r=shravanrn 2023-05-08 22:29:13 +00:00
harfbuzz Bug 1820063 - Update harfbuzz to 7.1.0 r=jfkthame 2023-03-03 09:20:12 +00:00
ipc Bug 1827222 - GPUProcessManager should not allow (re)initialization during shutdown. r=jnicol 2023-05-02 14:56:26 +00:00
layers Bug 1826687 - Fix Android SurfaceTexture handling with async RemoteTexture r=gfx-reviewers,lsalzman 2023-05-08 20:07:53 +00:00
ots Bug 1827704 - Migrate to the upstream wasm2c for RLBox sandboxing r=glandium 2023-04-21 01:31:35 +00:00
qcms Bug 1799258 - [qcms] Add query for profile data and lut tables. r=jrmuizel 2023-03-13 21:04:09 +00:00
skia Bug 1830006 - Do not use malloc.h on OpenBSD. r=aosmond 2023-04-26 16:58:44 +00:00
src Bug 1782385 - Improve sizing heuristics in nsTextControlFrame::CalcIntrinsicSize. r=emilio 2023-05-09 14:49:08 +00:00
tests Bug 1830792 - [3/4] Remove is-nightly check for bug 1704954 mitigation r=gfx-reviewers,bradwerth 2023-05-03 14:24:35 +00:00
thebes Bug 1816189 - Part 4: Add random noise when extracting data from canvas element when canvas randomization is enabled. r=tjr,lsalzman 2023-05-08 14:04:35 +00:00
vr Bug 1824465 - Part 16: Make PVRManager refcounted, r=ipc-reviewers,mccr8 2023-04-19 22:10:09 +00:00
webrender_bindings Bug 1826687 - Fix Android SurfaceTexture handling with async RemoteTexture r=gfx-reviewers,lsalzman 2023-05-08 20:07:53 +00:00
wgpu_bindings Bug 1829305: build(webgpu): track wgpu-hal for wgpu_bindings source deps r=webgpu-reviewers,jimb 2023-04-25 21:13:58 +00:00
wr Bug 1828248 - Use QCOM_tiled_rendering when rendering color and picture cache targets. r=gfx-reviewers,nical 2023-05-09 10:04:53 +00:00
ycbcr
metrics.yaml
moz.build Bug 1822594 - remove webrender test schedule. r=jmaher,ahal 2023-03-20 10:45:48 +00:00