mirror of
https://github.com/servo/servo.git
synced 2025-08-13 01:15:34 +01:00
geckolib: Return @font-face rules to Gecko in the expected cascade order.
This commit is contained in:
parent
0eabba3c6f
commit
f26a7e9372
2 changed files with 18 additions and 4 deletions
|
@ -3449,8 +3449,10 @@ pub extern "C" fn Servo_StyleSet_GetFontFaceRules(raw_data: RawServoStyleSetBorr
|
|||
.map(|(d, _)| d.font_faces.len() as u32)
|
||||
.sum();
|
||||
|
||||
// Reversed iterator because Gecko expects rules to appear sorted
|
||||
// UserAgent first, Author last.
|
||||
let font_face_iter = data.extra_style_data
|
||||
.iter_origins()
|
||||
.iter_origins_rev()
|
||||
.flat_map(|(d, o)| d.font_faces.iter().zip(iter::repeat(o)));
|
||||
|
||||
unsafe { rules.set_len(len) };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue