Skip to content

Commit 5c3bfc8

Browse files
committed
Write about layout
1 parent aa28d84 commit 5c3bfc8

File tree

3 files changed

+31
-20
lines changed

3 files changed

+31
-20
lines changed

_posts/2025-11-02-this-month-in-servo.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ Servo now supports `new KeyboardEvent({keyCode})` and `({charCode})` (@atbrakhi,
2828

2929
**ImageData** can now be sent over **postMessage()** and **structuredClone()** (@Gae24, #40084).
3030

31+
## Layout engine
32+
33+
Our layout engine can now render text in **synthetic bold** (@minghuaw, @mrobinson, #39519, #39681, #39633, #39691, #39713), and now selects more appropriate fallback fonts for **Kanji** in **Japanese text** (@arayaryoma, #39608).
34+
35+
**‘initial-scale’** now does the right thing in **<meta name=viewport>** (@atbrakhi, @shubhamg13, @mrobinson, #40055).
36+
37+
We’ve improved the way we handle **‘border-radius’** (@Loirooriol, #39571) and **margin collapsing** (@Loirooriol, #36322).
38+
While they’re fairly unassuming fixes on the surface, both of them allowed us to **find interop issues** in the big incumbent engines (@Loirooriol, [#39540](https://github.com/servo/servo/issues/39540), [#36321](https://github.com/servo/servo/issues/36321)) and **help improve web standards** (@noamr, @Loirooriol, [csswg-drafts#12961](https://github.com/w3c/csswg-drafts/issues/12961), [csswg-drafts#12218](https://github.com/w3c/csswg-drafts/issues/12218)).
39+
40+
In other words, Servo is good for the web, even if you’re not using it yet!
41+
3142
## Embedding and ecosystem
3243

3344
Our HTML-compatible **XPath** implementation now lives in its [own](https://github.com/servo/servo/tree/cd4c032908211fa2c26df550f6766080d1d28969/components/xpath) [crate](https://doc.servo.org/xpath/), and it’s no longer limited to the Servo DOM (@simonwuelker, #39546).

outline.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -102,27 +102,27 @@
102102
- https://github.com/servo/servo/pull/40108 (@mrobinson, @atbrakhi, #40108) script: Have the renderer process root viewport handle keyboard scrolling (#40108)
103103
input
104104
- layout
105-
- https://github.com/servo/servo/pull/36322 (@Loirooriol, #36322) layout: Let min/max constraints avoid collapsing bottom margins (#36322)
105+
- DONE https://github.com/servo/servo/pull/36322 (@Loirooriol, #36322) layout: Let min/max constraints avoid collapsing bottom margins (#36322)
106106
layout
107-
- https://github.com/servo/servo/pull/39571 (@Loirooriol, #39571) layout: Avoid negative corner radii values for border-radius (#39571)
107+
- DONE https://github.com/servo/servo/pull/39571 (@Loirooriol, #39571) layout: Avoid negative corner radii values for border-radius (#39571)
108108
layout
109-
- https://github.com/servo/servo/pull/39519 (@minghuaw, #39519) fonts: Initial draft of synthetic bold face for FreeType (#39519)
109+
- DONE https://github.com/servo/servo/pull/39519 (@minghuaw, #39519) fonts: Initial draft of synthetic bold face for FreeType (#39519)
110110
layout
111111
- https://github.com/servo/servo/pull/39591 (@mrobinson, @Loirooriol, #39591) layout: Clone static position rectangles when caching in `IndependentFormattingContext` (#39591)
112112
layout; incremental
113-
- https://github.com/servo/servo/pull/39681 (@minghuaw, @mrobinson, #39681) fonts: Use OS/2 table to determine if font face is already bold when synthesizing bold face for FreeType platform (#39681)
113+
- DONE https://github.com/servo/servo/pull/39681 (@minghuaw, @mrobinson, #39681) fonts: Use OS/2 table to determine if font face is already bold when synthesizing bold face for FreeType platform (#39681)
114114
layout
115-
- https://github.com/servo/servo/pull/39633 (@minghuaw, #39633) fonts: Add synthetic bold face support for Windows (#39633)
115+
- DONE https://github.com/servo/servo/pull/39633 (@minghuaw, #39633) fonts: Add synthetic bold face support for Windows (#39633)
116116
layout
117-
- https://github.com/servo/servo/pull/39691 (@minghuaw, #39691) fonts: Add synthetic bold face support for macos (#39691)
117+
- DONE https://github.com/servo/servo/pull/39691 (@minghuaw, #39691) fonts: Add synthetic bold face support for macos (#39691)
118118
layout
119-
- https://github.com/servo/servo/pull/39713 (@minghuaw, #39713) fonts: Do not apply synthetic bold if font is already bold for webfont on FreeType platform (#39713)
119+
- DONE https://github.com/servo/servo/pull/39713 (@minghuaw, #39713) fonts: Do not apply synthetic bold if font is already bold for webfont on FreeType platform (#39713)
120120
layout
121-
- https://github.com/servo/servo/pull/39608 (@arayaryoma, #39608) fonts: Do not fall back to non-Japanese fonts for Han in Japanese language documents (#39608)
121+
- DONE https://github.com/servo/servo/pull/39608 (@arayaryoma, #39608) fonts: Do not fall back to non-Japanese fonts for Han in Japanese language documents (#39608)
122122
layout; better automatic font selection for japanese text on macOS and unix
123-
- https://github.com/servo/servo/pull/39803 (@yezhizhen, #39803) fonts: Fix compilation warning due to added fallback mechanism (#39803)
123+
- SKIP https://github.com/servo/servo/pull/39803 (@yezhizhen, #39803) fonts: Fix compilation warning due to added fallback mechanism (#39803)
124124
layout; font fallback for japanese text
125-
- https://github.com/servo/servo/pull/40055 (@atbrakhi, @shubhamg13, @mrobinson, #40055) compositor: Have viewport meta tag affect the layout viewport (#40055)
125+
- DONE https://github.com/servo/servo/pull/40055 (@atbrakhi, @shubhamg13, @mrobinson, #40055) compositor: Have viewport meta tag affect the layout viewport (#40055)
126126
layout
127127
- https://github.com/servo/servo/pull/39930 (@longvatrong111, #39930) Box tree construction: only unset pseudo elements if the box is rebuilt (#39930)
128128
layout

tools/commits.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
# Testing: No changes
101101
# Fixes: #36833
102102
+https://github.com/servo/servo/pull/36322 (@Loirooriol, #36322) layout: Let min/max constraints avoid collapsing bottom margins (#36322)
103-
layout
103+
;layout
104104
# When `block-size` was intrinsic and there was no block-end padding or margin, we were allowing the block-end margin of
105105
# the box to collapse with the block-end margin of its contents.
106106
# However, due to `min-block-size` or `max-block-size`, the final size can be different than the intrinsic size of the
@@ -136,7 +136,7 @@
136136
# need these metrics to be added to Perfetto also.
137137
# Testing: Verified by using Perfetto traces
138138
+https://github.com/servo/servo/pull/39571 (@Loirooriol, #39571) layout: Avoid negative corner radii values for border-radius (#39571)
139-
layout
139+
;layout
140140
# The `border-radius` property provides the radii for the border box. For the curvature of the padding and content boxes,
141141
# we then subtract the border and padding sizes. However, we weren't flooring the result by zero, which could make the
142142
# background completely disappear when using `background-clip: padding-box` or `background-clip: content-box`.
@@ -286,7 +286,7 @@
286286
# rebase manually by commenting `@dependabot rebase`.
287287
# [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end)
288288
+https://github.com/servo/servo/pull/39519 (@minghuaw, #39519) fonts: Initial draft of synthetic bold face for FreeType (#39519)
289-
layout
289+
;layout
290290
# This is an initial attempt at implementing synthetic bold face for font families that lack actual bold faces. The
291291
# overall approach borrowed implementations from Chromium and FireFox. WPT expectations will be updated after
292292
# https://github.com/servo/stylo/pull/244 lands
@@ -883,7 +883,7 @@
883883
# triggered when the button up and down cross frame boundaries.
884884
# Testing: This should be covered by existing tests.
885885
+https://github.com/servo/servo/pull/39681 (@minghuaw, @mrobinson, #39681) fonts: Use OS/2 table to determine if font face is already bold when synthesizing bold face for FreeType platform (#39681)
886-
layout
886+
;layout
887887
# The previous implementation in #39519 mistakenly used the `FontTemplateDescriptor` to determine whether the font face
888888
# itself is already bold. This PR fixes that by using the `usWeightClass` in the `OS/2` table of the font face to
889889
# determine if the font face is bold already.
@@ -1070,7 +1070,7 @@
10701070
# Testing: No behaviour change Fixes: #39497 Fixes: #39649
10711071
>>> 2025-10-10T06:17:29Z
10721072
+https://github.com/servo/servo/pull/39633 (@minghuaw, #39633) fonts: Add synthetic bold face support for Windows (#39633)
1073-
layout
1073+
;layout
10741074
# This PR follows #39519 and adds synthetic bold face support for Windows platform.
10751075
# Testing: There are existing WPT testcases for font synthesis (wpt/css/css-fonts/font-synthesis-*). A new test that
10761076
# checks for "double emboldening" (a bold font gets emboldened again) is getting added to the upstream WPT repo
@@ -1190,7 +1190,7 @@
11901190
# Testing: Unneeded, no change in behavior
11911191
# Stylo PR: https://github.com/servo/stylo/pull/251
11921192
+https://github.com/servo/servo/pull/39691 (@minghuaw, #39691) fonts: Add synthetic bold face support for macos (#39691)
1193-
layout
1193+
;layout
11941194
# This PR follows https://github.com/servo/servo/pull/39519 and adds synthetic bold face support for MacOs platform.
11951195
# Testing: There are existing WPT testcases for font synthesis (wpt/css/css-fonts/font-synthesis-*). A new test checking
11961196
# that a bold face font does not get "double emboldened" is getting added in #39713 Part of #39637
@@ -1273,7 +1273,7 @@
12731273
# Testing: Unnecessary, there should be no behavior change Fixes: #39710
12741274
# Stylo PR: https://github.com/servo/stylo/pull/250
12751275
+https://github.com/servo/servo/pull/39713 (@minghuaw, #39713) fonts: Do not apply synthetic bold if font is already bold for webfont on FreeType platform (#39713)
1276-
layout
1276+
;layout
12771277
# This is to fix my oversight in the previous PR #39681 where the use of OS/2 table to determine a synthetic bold face
12781278
# should be applied is not applied to web font.
12791279
# Testing: Added a new test `tests/wpt/mozilla/tests/css/font_synthesis_weight_webfont_bold.html` that checks if an
@@ -1456,7 +1456,7 @@
14561456
# order matters. This PR addresses this.
14571457
# Testing: Added 8 subtests to wdspec. Fixes: Part of #38083.
14581458
+https://github.com/servo/servo/pull/39608 (@arayaryoma, #39608) fonts: Do not fall back to non-Japanese fonts for Han in Japanese language documents (#39608)
1459-
layout; better automatic font selection for japanese text on macOS and unix
1459+
;layout; better automatic font selection for japanese text on macOS and unix
14601460
# ## Motivations
14611461
# This PR improves fallback font algorithm for Japanese documents on macos and Linux.
14621462
# For Japanese documents, we generally use a same font for Hiragana/Katakana/Kanji(Han). Since their is a fallback
@@ -1670,7 +1670,7 @@ https://github.com/servo/servo/pull/39775 (@TimvdLippe, #39775) Add policy conta
16701670
# `import_key_hmac` and `import_key_pbkdf2` are removed since they are no longer in use.
16711671
# Testing: Refactoring. Existing WPT tests suffice. Fixes: Part of #39368
16721672
+https://github.com/servo/servo/pull/39803 (@yezhizhen, #39803) fonts: Fix compilation warning due to added fallback mechanism (#39803)
1673-
layout; font fallback for japanese text
1673+
;layout; font fallback for japanese text
16741674
# #39608 added a mechanism to read document language from layout. It was used to make sure fallback font for
16751675
# Hiragana/Katakana/Kanji is same for Japanese document.
16761676
# Right now, the mechanism is only used for FreeType/macOS. For Windows, it already did the job correctly even before
@@ -2766,7 +2766,7 @@ https://github.com/servo/servo/pull/39794 (@TimvdLippe, #39794) Implement docume
27662766
# (which need to be upgraded to 2.0) and a few other crates.
27672767
# Testing: No testing needed.
27682768
+https://github.com/servo/servo/pull/40055 (@atbrakhi, @shubhamg13, @mrobinson, #40055) compositor: Have viewport meta tag affect the layout viewport (#40055)
2769-
layout
2769+
;layout
27702770
# The CSS specifications defines two viewports[^1], the "layout viewport" and the visual viewport. The layout viewport
27712771
# affects layout and the visual viewport is the result of applying pinch zoom. This changes makes it so that the
27722772
# initial-scale property of `` affects the layout viewport.

0 commit comments

Comments
 (0)