mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:57:35 +00:00
LibWeb: Track quote-nesting level while building the layout tree
This makes multiple levels of quote actually use different quotation marks, instead of always the first available pair of them. Each Layout::Node remembers what the quote-nesting level was before its content was evaluated, so that we can re-use this number in `apply_style()`. This is a bit hacky, since we end up converting the `content` value into a string twice. `StyleProperties::content()` now takes an initial quote-nesting level, and returns the final level after that content.
This commit is contained in:
parent
493dd5d93c
commit
9e99368694
8 changed files with 372 additions and 14 deletions
|
@ -743,7 +743,8 @@ void NodeWithStyle::apply_style(const CSS::StyleProperties& computed_style)
|
|||
if (auto outline_width = computed_style.property(CSS::PropertyID::OutlineWidth); outline_width->is_length())
|
||||
computed_values.set_outline_width(outline_width->as_length().length());
|
||||
|
||||
computed_values.set_content(computed_style.content());
|
||||
// FIXME: Stop generating the content twice. (First time is in TreeBuilder.)
|
||||
computed_values.set_content(computed_style.content(initial_quote_nesting_level()).content_data);
|
||||
computed_values.set_grid_auto_columns(computed_style.grid_auto_columns());
|
||||
computed_values.set_grid_auto_rows(computed_style.grid_auto_rows());
|
||||
computed_values.set_grid_template_columns(computed_style.grid_template_columns());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue