Also add some tests that ensure that the input and output streams match
each other, because I can't wrap my head around what the internal
representation looks like.
This moves the CSS gradient painting to the painter creating:
- Painter::fill_rect_with_linear_gradient()
- Painter::fill_rect_with_conic_gradient()
- Painter::fill_rect_with_radial_gradient()
This has a few benefits:
- The gradients can now easily respect the painter scale
- The Painter::fill_pixels() escape hatch can be removed
- We can remove the old fixed color stop gradient code
- The old functions are now just a shim
- Anywhere can now easily use this gradient painting code!
This only leaves the color stop resolution in LibWeb (which is fine).
Just means in LibGfx you have to actually specify color stop positions.
(Also while here add a small optimization to avoid generating
excessively long gradient lines)
This change fixes problem that y position of blocks with
clearance might not include border_top and padding_top
by changing `place_block_level_element_in_normal_flow_vertically`
to accept y position without `border_box_top` and adding it
on the last step when clearance is already taken in account.
Bug reproducer:
```html
<style>
.a {
border: 10px salmon solid;
width: 50px;
height: 50px;
float: left;
}
.b {
clear: both;
border: 20px slateblue solid;
width: 50px;
height: 50px;
}
</style>
<div class="a"></div><div class="b"></div><div class="c"></div>
```
Resolves issue where a panic would occur if the file system failed to
initialize or mount, due to how the FileSystem was already added to
VFS's list. The newly-created FileSystem destructor would fail as a
result of the object still remaining in the IntrusiveList.
Since AK can't refer to LibUnicode directly, the strategy here is that
if you need case transformations, you can link LibUnicode and receive
them. If you try to use either of these methods without linking it, then
you'll of course get a linker error (note we don't do any fallbacks to
e.g. ASCII case transformations). If you don't need these methods, you
don't have to link LibUnicode.
DeprecatedFlyString relies heavily on DeprecatedString's StringImpl, so
let's rename it to A) match the name of DeprecatedString, B) write a new
FlyString class that is tied to String.
Previously, we would assume that all standard 14 fonts use a
TrueTypeFont dictionary. Now we render them in Type1Font as well,
given that it doesn't contain a PostScript font program.
While this subtable ID is supposed to be deprecated, it is used heavily
in PDF files.
It supports mapping one or two-byte values, with quite a large list of
encodings to tell you which one to expect.
For our use case, we ignore this encoding ID and just pick the first
subtable with this platform ID. Unsupported encodings will get caught
by Subtable::glyph_id_for_code_point() anyway.
The ports `libvorbis`, `readline` and `timidity` would not install on
macOS as a result of using `sed -i` without an extension provided. GNU
sed is available through Homebrew, but it does not replace `sed` by
default.
Instead, provide a new `sed_in_place` function that calls `sed` with the
right arguments.
This patch replaces the bespoke rendering engine in Presenter with a
simple pipeline that turns presentations into single-page HTML files.
The HTML is then loaded into an OutOfProcessWebView.
This achieves a number of things, most importantly:
- Access to all the CSS features supported by LibWeb
- Sandboxed, multi-process rendering
The code could be simplified a lot further, but I wanted to get the new
architecture in place without changing anything about the file format.
By setting this hint, you indicate to OOPWV that the content inside will
scale itself to the viewport size. In such situations, it's fine for
OOPWV to reuse a scaled version of an outdated backing store while the
view is being resized.
Clicking analyze or deleting a file would always cause the tree view in
the widget to reset back to viewing the root. This was changed to stay
in the directory currently being viewed
The tree map widget keeps the current path to allow the user to navigate
between directories. This path was being kept as indices into the
children array. The indices might change after the tree is regenerated
and this change is required to keep the user's current place after a
re-analysis
Made the member fields of Tree and TreeNode structures private and moved
the functions in main.cpp that accessed the internals of these
structures inside the TreeNode class
The TreeMapNode and TreeMap structs inside TreeMapWidget.h both had
single implementers, TreeNode and Tree inside main.cpp. The indirection
was removed and the new structures were moved to their own file
Introduce `table_box()` function that returns table formatting
context root box casted to `TableBox` similar to how it's done
in other formatting contexts like `root()` in BFC and
`flex_container` in FFC. And replace `context_box()` calls
in TFC with calls to `table_box()`.