mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Propagate text-decoration-* properties to anonymous wrappers
Fixes an issue where old prices were not displayed with strike-through text on the PlayStation store. :^)
This commit is contained in:
parent
415ea4ec0c
commit
8a6c8a1c27
Notes:
github-actions[bot]
2024-09-03 15:41:51 +00:00
Author: https://github.com/awesomekling
Commit: 8a6c8a1c27
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1265
Reviewed-by: https://github.com/AtkinsSJ ✅
4 changed files with 30 additions and 0 deletions
|
@ -0,0 +1,10 @@
|
||||||
|
<!doctype html>
|
||||||
|
<link rel="match" href="reference/text-decoration-in-anonymous-wrapper-ref.html" />
|
||||||
|
<style type="text/css">
|
||||||
|
.strike {
|
||||||
|
text-decoration-line: line-through;
|
||||||
|
text-decoration-color: red;
|
||||||
|
text-decoration-thickness: 4px;
|
||||||
|
text-decoration-style: dotted;
|
||||||
|
}
|
||||||
|
</style><div class="strike">strike
|
14
Tests/LibWeb/Ref/text-decoration-in-anonymous-wrapper.html
Normal file
14
Tests/LibWeb/Ref/text-decoration-in-anonymous-wrapper.html
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
<!doctype html>
|
||||||
|
<link rel="match" href="reference/text-decoration-in-anonymous-wrapper-ref.html" />
|
||||||
|
<style type="text/css">
|
||||||
|
.strike {
|
||||||
|
text-decoration-line: line-through;
|
||||||
|
text-decoration-color: red;
|
||||||
|
text-decoration-thickness: 4px;
|
||||||
|
text-decoration-style: dotted;
|
||||||
|
}
|
||||||
|
.messer-upper {
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
</style><div class="strike">strike<div class="messer-upper"></div>
|
Binary file not shown.
Before Width: | Height: | Size: 268 KiB After Width: | Height: | Size: 234 KiB |
|
@ -975,6 +975,12 @@ JS::NonnullGCPtr<NodeWithStyle> NodeWithStyle::create_anonymous_wrapper() const
|
||||||
{
|
{
|
||||||
auto wrapper = heap().allocate_without_realm<BlockContainer>(const_cast<DOM::Document&>(document()), nullptr, computed_values().clone_inherited_values());
|
auto wrapper = heap().allocate_without_realm<BlockContainer>(const_cast<DOM::Document&>(document()), nullptr, computed_values().clone_inherited_values());
|
||||||
wrapper->mutable_computed_values().set_display(CSS::Display(CSS::DisplayOutside::Block, CSS::DisplayInside::Flow));
|
wrapper->mutable_computed_values().set_display(CSS::Display(CSS::DisplayOutside::Block, CSS::DisplayInside::Flow));
|
||||||
|
|
||||||
|
// NOTE: These properties are not inherited, but we still have to propagate them to anonymous wrappers.
|
||||||
|
wrapper->mutable_computed_values().set_text_decoration_line(computed_values().text_decoration_line());
|
||||||
|
wrapper->mutable_computed_values().set_text_decoration_thickness(computed_values().text_decoration_thickness());
|
||||||
|
wrapper->mutable_computed_values().set_text_decoration_color(computed_values().text_decoration_color());
|
||||||
|
wrapper->mutable_computed_values().set_text_decoration_style(computed_values().text_decoration_style());
|
||||||
return *wrapper;
|
return *wrapper;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue