Oriol Brufau
bc7cced03c
Element collapsing thru should collapse with its children ( #32060 )
...
If the top and bottom margins of an element collapse through, then this
patch treats the bottom margin as collapsing with its children, even if
`height` doesn't compute to zero.
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-04-12 15:06:12 +00:00
Oriol Brufau
95654b789c
Treat indefinite percentages as auto for margin collapse ( #32059 )
...
The top and bottom margins of an element can collapse through if its
height is auto or zero. Indefinite percentages behave as auto, so they
shouldn't prevent the margins from collapsing.
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-04-12 12:14:35 +00:00
Martin Robinson
efa0d45757
Remove FontContextHandle
( #32038 )
...
The `FontContextHandle` was really only used on FreeType platforms to
store the `FT_Library` handle to use for creating faces. Each
`FontContext` and `FontCacheThread` would create its own
`FontContextHandle`. This change removes this data structure in favor of
a mutex-protected shared `FontContextHandle` for an entire Servo
process. The handle is initialized using a `OnceLock` to ensure that it
only happens once and also that it stays alive for the entire process
lifetime.
In addition to greatly simplifying the code, this will make it possible
for different threads to share platform-specific `FontHandle`s, avoiding
multiple allocations for a single font.
The only downside to all of this is that memory usage of FreeType fonts
isn't measured (though the mechanism is still there). This is because
the `FontCacheThread` currently doesn't do any memory measurement.
Eventually this *will* happen though, during the font system redesign.
In exchange, this should reduce the memory usage since there is only a
single FreeType library loaded into memory now.
This is part of #32033 .
2024-04-12 10:39:32 +00:00
Oriol Brufau
e9591ce62f
Obey min-height and max-height on floated elements ( #32057 )
...
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-04-12 10:21:02 +00:00
eri
88d4aff595
clippy: Fix comparison_*
warnings ( #32058 )
2024-04-12 08:08:38 +00:00
Gae24
509b858f15
mach: Remove unused --angle
command line argument ( #32050 )
...
* removed unused angle command line argument
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
* Removed argument from smoketest in Windows workflows
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
---------
Signed-off-by: Gae24 <96017547+Gae24@users.noreply.github.com>
2024-04-12 08:06:09 +00:00
Philip Lamb
10ec8565ea
Fixes for HTTP header compliance. ( #32024 )
...
- Fix 400 errors from nginx in response to Servo requests by implementing conformant albeit non-normative removal of whitespace from `Accept` and `Accept-Language` HTTP headers. (To match behaviour of Firefox, Safari, and Chrome) https://datatracker.ietf.org/doc/html/rfc7231#section-5.3.2
- Provide `Host` header as REQUIRED by HTTP protocol https://www.rfc-editor.org/rfc/rfc9110#field.host
- Update tests.
2024-04-11 21:51:23 +00:00
Oluwatobi Sofela
62a25fdcc4
clippy: Fix question_mark warning ( #32051 )
2024-04-11 21:48:43 +00:00
Oluwatobi Sofela
9db9dddb88
clippy: Fix iter_cloned_collect warning ( #32053 )
2024-04-11 21:46:48 +00:00
eri
b3d9924396
clippy: Fix redundant_*
warnings ( #32056 )
...
* clippy: Fix `redundant_field_names` warnings
* clippy: Fix other `redundant_*` warnings
* docs: Update docstring comments
2024-04-11 21:46:18 +00:00
Oluwatobi Sofela
e3ad76d994
clippy: Fix needless_late_init warning ( #32052 )
2024-04-11 21:44:08 +00:00
Oluwatobi Sofela
e8e909b78c
clippy: Fix needless_lifetimes warning ( #32049 )
2024-04-11 21:43:35 +00:00
dependabot[bot]
0a860bd928
build(deps): bump pathfinder_simd from 0.5.2 to 0.5.3 ( #32055 )
...
Bumps [pathfinder_simd](https://github.com/servo/pathfinder ) from 0.5.2 to 0.5.3.
- [Release notes](https://github.com/servo/pathfinder/releases )
- [Commits](https://github.com/servo/pathfinder/commits )
---
updated-dependencies:
- dependency-name: pathfinder_simd
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 17:29:24 +00:00
dependabot[bot]
cd642f2e6b
build(deps): bump jobserver from 0.1.28 to 0.1.29 ( #32054 )
...
Bumps [jobserver](https://github.com/alexcrichton/jobserver-rs ) from 0.1.28 to 0.1.29.
- [Commits](https://github.com/alexcrichton/jobserver-rs/commits )
---
updated-dependencies:
- dependency-name: jobserver
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-11 17:22:18 +00:00
cathiechen
4e4a4c0a28
Implement form-associated custom elements and their ElementInternals ( #31980 )
...
* FACEs work, setFormValue test is awful so now has _mozilla backup
* 1. Impl Validatable in ElementInternals instead of HTMLElement. 2. Reuse the code in Validatable trait. 3. The form associated custom element is not a customized built-in element.
* add some comments
* support readonly attribute and complete barred from constraint validation
* Addressed the code review comments
* Updated the legacy-layout results
* Fixed the WPT failures in ElementInternals-validation.html
* Addressed the code review comments
* Review suggestions
* Fixed silly mistakes and update the test result outside elementinternals
* update the test results
---------
Co-authored-by: Patrick Shaughnessy <pshaughn@comcast.net>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-04-11 13:17:11 +00:00
Alex Touchet
2eb959a159
Update core-graphics ( #32045 )
2024-04-11 12:54:41 +00:00
dependabot[bot]
d9f067e998
build(deps): bump combine from 4.6.6 to 4.6.7 ( #32041 )
...
Bumps [combine](https://github.com/Marwes/combine ) from 4.6.6 to 4.6.7.
- [Changelog](https://github.com/Marwes/combine/blob/master/CHANGELOG.md )
- [Commits](https://github.com/Marwes/combine/compare/v4.6.6...v4.6.7 )
---
updated-dependencies:
- dependency-name: combine
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 22:22:58 +00:00
dependabot[bot]
29a7396878
build(deps): bump anyhow from 1.0.81 to 1.0.82 ( #32042 )
...
Bumps [anyhow](https://github.com/dtolnay/anyhow ) from 1.0.81 to 1.0.82.
- [Release notes](https://github.com/dtolnay/anyhow/releases )
- [Commits](https://github.com/dtolnay/anyhow/compare/1.0.81...1.0.82 )
---
updated-dependencies:
- dependency-name: anyhow
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 19:37:49 +00:00
dependabot[bot]
927faec82e
build(deps): bump cfg-expr from 0.15.7 to 0.15.8 ( #32044 )
...
Bumps [cfg-expr](https://github.com/EmbarkStudios/cfg-expr ) from 0.15.7 to 0.15.8.
- [Release notes](https://github.com/EmbarkStudios/cfg-expr/releases )
- [Changelog](https://github.com/EmbarkStudios/cfg-expr/blob/main/CHANGELOG.md )
- [Commits](https://github.com/EmbarkStudios/cfg-expr/compare/0.15.7...0.15.8 )
---
updated-dependencies:
- dependency-name: cfg-expr
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 17:11:54 +00:00
dependabot[bot]
797b3f9618
build(deps): bump encoding_rs from 0.8.33 to 0.8.34 ( #32043 )
...
Bumps [encoding_rs](https://github.com/hsivonen/encoding_rs ) from 0.8.33 to 0.8.34.
- [Commits](https://github.com/hsivonen/encoding_rs/compare/v0.8.33...v0.8.34 )
---
updated-dependencies:
- dependency-name: encoding_rs
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 17:07:50 +00:00
dependabot[bot]
fb3b3032ae
build(deps): bump quote from 1.0.35 to 1.0.36 ( #32040 )
...
Bumps [quote](https://github.com/dtolnay/quote ) from 1.0.35 to 1.0.36.
- [Release notes](https://github.com/dtolnay/quote/releases )
- [Commits](https://github.com/dtolnay/quote/compare/1.0.35...1.0.36 )
---
updated-dependencies:
- dependency-name: quote
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 16:58:52 +00:00
Oriol Brufau
5acfce5b89
Upgrade Stylo to 2023-12-01 ( #32032 )
...
* Upgrade Stylo to 2023-12-01
* Fixup for https://phabricator.services.mozilla.com/D191362
* Fixup for https://phabricator.services.mozilla.com/D191522
* Fixup for https://phabricator.services.mozilla.com/D191613
* Fixup for https://phabricator.services.mozilla.com/D191161
* Fixup for https://phabricator.services.mozilla.com/D191615
* Fixup for https://phabricator.services.mozilla.com/D193048
* Fixup for https://phabricator.services.mozilla.com/D193547
* Update test expectations
2024-04-10 13:03:56 +00:00
komuhangi
89a4820519
Fixed some clippy warnings in components ( #32025 )
...
* Fixed some clippy warnings in components
* Updated the simplification of bolean expressions in componets/script/dom/range.rs
2024-04-10 07:50:01 +00:00
dependabot[bot]
245269c649
build(deps): bump gstreamer from 0.22.3 to 0.22.4 ( #32029 )
...
Bumps gstreamer from 0.22.3 to 0.22.4.
---
updated-dependencies:
- dependency-name: gstreamer
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 20:45:22 +00:00
dependabot[bot]
267320c127
build(deps): bump glib from 0.19.3 to 0.19.4 ( #32031 )
...
Bumps [glib](https://github.com/gtk-rs/gtk-rs-core ) from 0.19.3 to 0.19.4.
- [Release notes](https://github.com/gtk-rs/gtk-rs-core/releases )
- [Changelog](https://github.com/gtk-rs/gtk-rs-core/blob/master/CHANGELOG.md )
- [Commits](https://github.com/gtk-rs/gtk-rs-core/compare/0.19.3...0.19.4 )
---
updated-dependencies:
- dependency-name: glib
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 17:19:07 +00:00
dependabot[bot]
7f4608b200
build(deps): bump rustversion from 1.0.14 to 1.0.15 ( #32030 )
...
Bumps [rustversion](https://github.com/dtolnay/rustversion ) from 1.0.14 to 1.0.15.
- [Release notes](https://github.com/dtolnay/rustversion/releases )
- [Commits](https://github.com/dtolnay/rustversion/compare/1.0.14...1.0.15 )
---
updated-dependencies:
- dependency-name: rustversion
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 17:14:33 +00:00
dependabot[bot]
9e1831876b
build(deps): bump backtrace from 0.3.69 to 0.3.71 ( #32028 )
...
Bumps [backtrace](https://github.com/rust-lang/backtrace-rs ) from 0.3.69 to 0.3.71.
- [Release notes](https://github.com/rust-lang/backtrace-rs/releases )
- [Commits](https://github.com/rust-lang/backtrace-rs/compare/0.3.69...0.3.71 )
---
updated-dependencies:
- dependency-name: backtrace
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 17:12:34 +00:00
Oriol Brufau
586a70887d
Bump Stylo to servo/stylo#28 ( #31991 )
2024-04-09 14:26:32 +00:00
Azhar Ismagulova
581913f77e
clippy: fix warnings in components/script ( #32023 )
2024-04-09 09:34:52 +00:00
iterminatorheart
8d513cf4c7
feat: use set_poll, set_wait, set_exit of control_flow ( #32012 )
...
Co-authored-by: xiandu.wl <xiandu.wl@antgroup.com>
2024-04-09 09:17:10 +00:00
dependabot[bot]
0a8b461dbc
build(deps): bump uluru from 3.0.0 to 3.1.0 ( #32013 )
...
Bumps [uluru](https://github.com/servo/uluru ) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/servo/uluru/releases )
- [Commits](https://github.com/servo/uluru/compare/v3.0.0...v3.1.0 )
---
updated-dependencies:
- dependency-name: uluru
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 08:32:19 +00:00
dependabot[bot]
810d76460c
build(deps): bump bumpalo from 3.15.4 to 3.16.0 ( #32020 )
...
Bumps [bumpalo](https://github.com/fitzgen/bumpalo ) from 3.15.4 to 3.16.0.
- [Changelog](https://github.com/fitzgen/bumpalo/blob/main/CHANGELOG.md )
- [Commits](https://github.com/fitzgen/bumpalo/compare/3.15.4...3.16.0 )
---
updated-dependencies:
- dependency-name: bumpalo
dependency-type: indirect
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 08:31:43 +00:00
Martin Robinson
dd9f62adcc
chore: Clean up use of gfx
and constellation
types ( #31981 )
...
This change contains three semi-related clean ups:
1. the `to_webrender()` and `from_webrender()` functions on Pipeline are
turned into more-idiomatic `From` and `Into` implementations.
2. `combine_id_with_fragment_type` now returns a `u64` as that is what is
expected for all callers and not a `usize`.
3. The `query_scroll_id` query is removed entirely. The
`ExternalScrollId` that this queries is easily generated directly
from the node's opaque id. Querying into layout isn't necessary at
all.
2024-04-09 06:43:48 +00:00
dependabot[bot]
b79e2a0b65
build(deps): bump cc from 1.0.89 to 1.0.92 ( #32021 )
...
Bumps [cc](https://github.com/rust-lang/cc-rs ) from 1.0.89 to 1.0.92.
- [Release notes](https://github.com/rust-lang/cc-rs/releases )
- [Commits](https://github.com/rust-lang/cc-rs/compare/1.0.89...1.0.92 )
---
updated-dependencies:
- dependency-name: cc
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:58:46 +00:00
dependabot[bot]
09b20c87b8
build(deps): bump getrandom from 0.2.12 to 0.2.14 ( #32022 )
...
Bumps [getrandom](https://github.com/rust-random/getrandom ) from 0.2.12 to 0.2.14.
- [Changelog](https://github.com/rust-random/getrandom/blob/master/CHANGELOG.md )
- [Commits](https://github.com/rust-random/getrandom/compare/v0.2.12...v0.2.14 )
---
updated-dependencies:
- dependency-name: getrandom
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:58:18 +00:00
dependabot[bot]
309f54a8f8
build(deps): bump gstreamer-audio from 0.22.0 to 0.22.4 ( #32019 )
...
Bumps gstreamer-audio from 0.22.0 to 0.22.4.
---
updated-dependencies:
- dependency-name: gstreamer-audio
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:51:39 +00:00
dependabot[bot]
6b006c015d
build(deps): bump glib-macros from 0.19.3 to 0.19.4 ( #32017 )
...
Bumps [glib-macros](https://github.com/gtk-rs/gtk-rs-core ) from 0.19.3 to 0.19.4.
- [Release notes](https://github.com/gtk-rs/gtk-rs-core/releases )
- [Changelog](https://github.com/gtk-rs/gtk-rs-core/blob/master/CHANGELOG.md )
- [Commits](https://github.com/gtk-rs/gtk-rs-core/compare/0.19.3...0.19.4 )
---
updated-dependencies:
- dependency-name: glib-macros
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:51:00 +00:00
dependabot[bot]
20faebace6
build(deps): bump downcast-rs from 1.2.0 to 1.2.1 ( #32016 )
...
Bumps [downcast-rs](https://github.com/marcianx/downcast-rs ) from 1.2.0 to 1.2.1.
- [Changelog](https://github.com/marcianx/downcast-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/marcianx/downcast-rs/compare/v1.2.0...v1.2.1 )
---
updated-dependencies:
- dependency-name: downcast-rs
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:50:22 +00:00
dependabot[bot]
641699dbd9
build(deps): bump gstreamer-video from 0.22.1 to 0.22.4 ( #32018 )
...
Bumps gstreamer-video from 0.22.1 to 0.22.4.
---
updated-dependencies:
- dependency-name: gstreamer-video
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:49:42 +00:00
dependabot[bot]
3d431d9e0f
build(deps): bump warp from 0.3.6 to 0.3.7 ( #32014 )
...
Bumps [warp](https://github.com/seanmonstar/warp ) from 0.3.6 to 0.3.7.
- [Release notes](https://github.com/seanmonstar/warp/releases )
- [Changelog](https://github.com/seanmonstar/warp/blob/master/CHANGELOG.md )
- [Commits](https://github.com/seanmonstar/warp/compare/v0.3.6...v0.3.7 )
---
updated-dependencies:
- dependency-name: warp
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:49:14 +00:00
dependabot[bot]
04a537a2da
build(deps): bump half from 2.4.0 to 2.4.1 ( #32015 )
...
Bumps [half](https://github.com/starkat99/half-rs ) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/starkat99/half-rs/releases )
- [Changelog](https://github.com/starkat99/half-rs/blob/main/CHANGELOG.md )
- [Commits](https://github.com/starkat99/half-rs/compare/v2.4.0...v2.4.1 )
---
updated-dependencies:
- dependency-name: half
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 16:47:25 +00:00
Daniel Adams
e38b34a629
Gamepad: Remove GamepadList and fix dropped connection event on startup ( #31684 )
...
* Replace GamepadList
* Fix initial gamepad connection event from gilrs getting dropped
* Fix gamepad reconnection issues, use MutNullableDom
* Reduce some repetition in handle_gamepad_events
* Address feedback, move some steps to navigator methods
* Refactor internal navigator gamepad methods
* Add note re: unused gilrs index, adjust navigator gamepad methods
2024-04-08 09:43:48 +00:00
shanehandley
ddbec46e1f
fix: Handle table.deleteRow with no rows ( #32009 )
...
* fix: Handle table.deleteRow with no rows
* Respond to review, update legacy layout expectations
2024-04-07 15:09:22 +00:00
komuhangi
e0e3408650
Fixed some clippy warnings by replacing 'match' with 'if' ( #32007 )
2024-04-07 07:39:05 +00:00
Servo WPT Sync
05f1bbf0a9
Update web-platform-tests to revision b'b73a0a32890ff293961eb55bb90ba57a5a711f48' ( #32010 )
2024-04-07 02:58:36 +00:00
dependabot[bot]
1ffa61aabf
build(deps): bump ab_glyph from 0.2.23 to 0.2.24 ( #32006 )
...
Bumps [ab_glyph](https://github.com/alexheretic/ab-glyph ) from 0.2.23 to 0.2.24.
- [Release notes](https://github.com/alexheretic/ab-glyph/releases )
- [Commits](https://github.com/alexheretic/ab-glyph/compare/ab-glyph-0.2.23...ab-glyph-0.2.24 )
---
updated-dependencies:
- dependency-name: ab_glyph
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 17:10:19 +00:00
Aarya Khandelwal
275fad8b78
Clippy: Fix the error of variants having the same prefix. ( #31953 )
...
* fix error: all variants have same prefix
* made the suggested changes
* fixed errors caused by commit
* silenced the clippy warning.
* ran ./mach fmt
* Update components/script/dom/htmlmediaelement.rs
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
---------
Co-authored-by: Samson <16504129+sagudev@users.noreply.github.com>
2024-04-05 16:31:41 +00:00
Martin Robinson
9ee45425e9
ci: Retry hdiutil create
with randomize backoff ( #32005 )
...
Regularly we see that `hdiutil creat` when creating a DMG on the MacOS
builder fails with "Resource busy." This change is an attempt to
mitigate that by retrying the command 3 time with a randomized backoff.
2024-04-05 10:51:24 +00:00
Martin Robinson
77b2e88fb7
gfx: Do not apply scale to CoreText
font metrics ( #31996 )
...
Since the original version of the CoreText font code, it has scaled the
metrics from CoreText by an unusual scale:
```
let scale = px_to_pt(self.ctfont.pt_size()) / (ascent + descent);
```
It's unclear what this scale was trying to accomplish. Note that it's
passing the return value of `pt_size()` to `px_to_pt` which seems
backward. This scale seems bogus, but perhaps it's based on a
misconception about what its returned from CoreText. Unlike the return
values of `CGFont` methods, which are returned in font units, the ones
from `CTFont` are "scaled according to the point size and matrix of the
font reference."
Indeed, when just interpreting these values as pixel values, the results
more or less match Firefox and Chrome. This becomes much more obvious
now that we have support for `ex` units. Even when not using `ex`, you
can sometimes see the top parts of glyphs cut off due to this scaling.
This change removes the scaling and simply interpets the return values
of `CTFont` methods as pixels. It addresses all of the issues mentioned
above. Note that this path will eventually just be a fallback path and
metrics will come from sfnt tables in the future.
2024-04-05 10:22:36 +00:00
dependabot[bot]
14bf1c5434
build(deps): bump h2 from 0.3.25 to 0.3.26 ( #31999 )
...
Bumps [h2](https://github.com/hyperium/h2 ) from 0.3.25 to 0.3.26.
- [Release notes](https://github.com/hyperium/h2/releases )
- [Changelog](https://github.com/hyperium/h2/blob/v0.3.26/CHANGELOG.md )
- [Commits](https://github.com/hyperium/h2/compare/v0.3.25...v0.3.26 )
---
updated-dependencies:
- dependency-name: h2
dependency-type: indirect
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 08:26:01 +00:00