mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
fonts: Add support for generic font families and font size configuration (#32673)
This adds support for generic font families in Servo and allows for configuration of them as well as their default font sizes. One interesting fix here is that now monospace default to 13px, like it does in other browsers. In addition to that, this exposes a new interface in Stylo which allows setting a default style. This is quite useful for fonts, but also for other kinds of default style settings -- like text zoom. Fixes #8371. Fixes #14773. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
956b7f62e0
commit
77e9e3deba
32 changed files with 397 additions and 300 deletions
|
@ -1350,14 +1350,9 @@ impl<'table> TableCellStyleInfo<'table> {
|
|||
};
|
||||
{
|
||||
let cell_flow = &self.cell.block_flow;
|
||||
let initial = ComputedValues::initial_values();
|
||||
|
||||
let build_dl = |sty: &ComputedValues, state: &mut &mut DisplayListBuildState| {
|
||||
let background = sty.get_background();
|
||||
// Don't redraw backgrounds that we've already drawn
|
||||
if std::ptr::eq(background, initial.get_background()) {
|
||||
return;
|
||||
}
|
||||
let background_color = sty.resolve_color(background.background_color.clone());
|
||||
cell_flow.build_display_list_for_background_if_applicable_with_background(
|
||||
state,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue