mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 09:19:03 +00:00
InlinePaintable was an ad-hoc paintable type required to support the
fragmentation of inline nodes across multiple lines. It existed because
there was no way to associate multiple paintables with a single layout
node. This resulted in a lot of duplicated code between PaintableBox and
InlinePaintable. For example, most of the CSS properties like
background, border, shadows, etc. and hit-testing are almost identical
for both of them. However, the code had to be duplicated to account for
the fact that InlinePaintable creates a box for each line. And we had
quite many places that operate on paintables with a code like:
```
if (box.is_paintable_box()) {
// do something
} else (box.is_inline_paintable()) {
// do exactly the same as for paintable box but using InlinePaintable
}
```
This change replaces the usage of `InlinePaintable` with
`PaintableWithLines` created for each line, which is now possible
because we support having multiple paintables per layout node. By doing
that, we remove lots of duplicated code and bring our implementation
closer to the spec.
64 lines
3.2 KiB
Plaintext
64 lines
3.2 KiB
Plaintext
Test hr.width = "100" maps to width: 100px
|
|
Test hr.width = " 00110 " maps to width: 110px
|
|
Test hr.width = "120." maps to width: 120px
|
|
Test marquee.hspace = "100" maps to marginLeft: 100px
|
|
Test marquee.hspace = " 00110 " maps to marginLeft: 110px
|
|
Test marquee.hspace = "120." maps to marginLeft: 120px
|
|
Test marquee.hspace = "100" maps to marginRight: 100px
|
|
Test marquee.hspace = " 00110 " maps to marginRight: 110px
|
|
Test marquee.hspace = "120." maps to marginRight: 120px
|
|
Test marquee.vspace = "100" maps to marginTop: 100px
|
|
Test marquee.vspace = " 00110 " maps to marginTop: 110px
|
|
Test marquee.vspace = "120." maps to marginTop: 120px
|
|
Test marquee.vspace = "100" maps to marginBottom: 100px
|
|
Test marquee.vspace = " 00110 " maps to marginBottom: 110px
|
|
Test marquee.vspace = "120." maps to marginBottom: 120px
|
|
Test marquee.width = "100" maps to width: 100px
|
|
Test marquee.width = " 00110 " maps to width: 110px
|
|
Test marquee.width = "120." maps to width: 120px
|
|
Test marquee.height = "100" maps to height: 100px
|
|
Test marquee.height = " 00110 " maps to height: 110px
|
|
Test marquee.height = "120." maps to height: 120px
|
|
Test object.hspace = "100" maps to marginLeft: 100px
|
|
Test object.hspace = " 00110 " maps to marginLeft: 110px
|
|
Test object.hspace = "120." maps to marginLeft: 120px
|
|
Test object.hspace = "100" maps to marginRight: 100px
|
|
Test object.hspace = " 00110 " maps to marginRight: 110px
|
|
Test object.hspace = "120." maps to marginRight: 120px
|
|
Test object.vspace = "100" maps to marginTop: 100px
|
|
Test object.vspace = " 00110 " maps to marginTop: 110px
|
|
Test object.vspace = "120." maps to marginTop: 120px
|
|
Test object.vspace = "100" maps to marginBottom: 100px
|
|
Test object.vspace = " 00110 " maps to marginBottom: 110px
|
|
Test object.vspace = "120." maps to marginBottom: 120px
|
|
Test object.width = "100" maps to width: 100px
|
|
Test object.width = " 00110 " maps to width: 110px
|
|
Test object.width = "120." maps to width: 120px
|
|
Test object.height = "100" maps to height: 100px
|
|
Test object.height = " 00110 " maps to height: 110px
|
|
Test object.height = "120." maps to height: 120px
|
|
Test embed.hspace = "100" maps to marginLeft: 100px
|
|
Test embed.hspace = " 00110 " maps to marginLeft: 110px
|
|
Test embed.hspace = "120." maps to marginLeft: 120px
|
|
Test embed.hspace = "100" maps to marginRight: 100px
|
|
Test embed.hspace = " 00110 " maps to marginRight: 110px
|
|
Test embed.hspace = "120." maps to marginRight: 120px
|
|
Test embed.vspace = "100" maps to marginTop: 100px
|
|
Test embed.vspace = " 00110 " maps to marginTop: 110px
|
|
Test embed.vspace = "120." maps to marginTop: 120px
|
|
Test embed.vspace = "100" maps to marginBottom: 100px
|
|
Test embed.vspace = " 00110 " maps to marginBottom: 110px
|
|
Test embed.vspace = "120." maps to marginBottom: 120px
|
|
Test embed.width = "100" maps to width: 0px
|
|
Test embed.width = " 00110 " maps to width: 0px
|
|
Test embed.width = "120." maps to width: 0px
|
|
Test embed.height = "100" maps to height: 0px
|
|
Test embed.height = " 00110 " maps to height: 0px
|
|
Test embed.height = "120." maps to height: 0px
|
|
Test tr.height = "100" maps to height: 100px
|
|
Test tr.height = " 00110 " maps to height: 110px
|
|
Test tr.height = "120." maps to height: 120px
|
|
Test col.width = "100" maps to width: 100px
|
|
Test col.width = " 00110 " maps to width: 110px
|
|
Test col.width = "120." maps to width: 120px
|