mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:57:35 +00:00
LibWeb: Implement font-size: math
This is a MathML extension, basically a big hack to make parts of equations smaller, such as sub/superscripts. The important thing is, it works. :^)
This commit is contained in:
parent
6476dea898
commit
f7209fb9d4
5 changed files with 104 additions and 12 deletions
39
Tests/LibWeb/Layout/expected/css-font-size-math.txt
Normal file
39
Tests/LibWeb/Layout/expected/css-font-size-math.txt
Normal file
|
@ -0,0 +1,39 @@
|
|||
Viewport <#document> at (0,0) content-size 800x600 children: not-inline
|
||||
BlockContainer <html> at (0,0) content-size 800x600 [BFC] children: not-inline
|
||||
BlockContainer <body> at (8,8) content-size 784x78.609375 children: inline
|
||||
line 0 width: 78.9375, height: 78.609375, bottom: 78.609375, baseline: 60.90625
|
||||
frag 0 from TextNode start: 0, length: 1, rect: [8,25 39.09375x55.8125]
|
||||
"H"
|
||||
frag 1 from TextNode start: 0, length: 1, rect: [47,38 19.78125x39.625]
|
||||
"e"
|
||||
frag 2 from TextNode start: 0, length: 1, rect: [67,47 6.8125x28.125]
|
||||
"l"
|
||||
frag 3 from TextNode start: 0, length: 1, rect: [74,53 4.84375x19.96875]
|
||||
"l"
|
||||
frag 4 from TextNode start: 0, length: 1, rect: [79,57 8.40625x14.171875]
|
||||
"o"
|
||||
InlineNode <span>
|
||||
TextNode <#text>
|
||||
InlineNode <span>
|
||||
TextNode <#text>
|
||||
InlineNode <span>
|
||||
TextNode <#text>
|
||||
InlineNode <span>
|
||||
TextNode <#text>
|
||||
InlineNode <span>
|
||||
TextNode <#text>
|
||||
TextNode <#text>
|
||||
|
||||
ViewportPaintable (Viewport<#document>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<HTML>) [0,0 800x600]
|
||||
PaintableWithLines (BlockContainer<BODY>) [8,8 784x78.609375]
|
||||
InlinePaintable (InlineNode<SPAN>)
|
||||
TextPaintable (TextNode<#text>)
|
||||
InlinePaintable (InlineNode<SPAN>)
|
||||
TextPaintable (TextNode<#text>)
|
||||
InlinePaintable (InlineNode<SPAN>)
|
||||
TextPaintable (TextNode<#text>)
|
||||
InlinePaintable (InlineNode<SPAN>)
|
||||
TextPaintable (TextNode<#text>)
|
||||
InlinePaintable (InlineNode<SPAN>)
|
||||
TextPaintable (TextNode<#text>)
|
10
Tests/LibWeb/Layout/input/css-font-size-math.html
Normal file
10
Tests/LibWeb/Layout/input/css-font-size-math.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
<style>
|
||||
body {
|
||||
font: 72px SerenitySans;
|
||||
}
|
||||
span {
|
||||
font-size: math;
|
||||
math-depth: add(1);
|
||||
}
|
||||
</style>
|
||||
<span>H<span>e<span>l<span>l<span>o</span></span></span></span></span>
|
Loading…
Add table
Add a link
Reference in a new issue