The Cache entries found in `DiskBackedFileSystem` are now stored in a
`KBuffer` object, instead of relying on `kmalloc_eternal`. The number
of entries was exceeding that of the number of bytes allocated to
`kmalloc_eternal`, which in turn caused `mount()` to fail epically
when called.
This patch adds basic support for external stylesheets. It currently
only works with file:// URLs.
We do a synchronous full relayout after loading a stylesheet, which is
definitely on the aggressive side, but it gives us something to work
on improving. :^)
Now programs can catch the SIGSEGV signal when they segfault.
This commit also introduced the send_urgent_signal_to_self method,
which is needed to send signals to a thread when handling exceptions
caused by the same thread.
Added the exception_code field to RegisterDump, removing the need
for RegisterDumpWithExceptionCode. To accomplish this, I had to
push a dummy exception code during some interrupt entries to properly
pad out the RegisterDump. Note that we also needed to change some code
in sys$sigreturn to deal with the new RegisterDump layout.
This kind of thing is a bit annoying. On Serenity, size_t is the same
size as u32, but not the same type. Because of "long" or whatever.
This patch makes String not complain about duplicate overloads.
Since LayoutText always inherits style, it shouldn't store any style of
its own. This patch adds a LayoutNodeWithStyle class to sit between
LayoutNode and everyone who wants to inherit from LayoutNode except
LayoutText :^)
Since LayoutText can never have children, we also know that the parent
of any LayoutNode is always going to be a LayoutNodeWithStyle.
So this patch makes LayoutNode::parent() return LayoutNodeWithStyle*.
Also added a script to handle creation of GPT partitioned disk (with
GRUB config file). Block limit will be used to disallow potential access
to other partitions.
This patch adds the 17 color names from CSS2.1, as well as support for
the "#rgb" shorthand where each component is a hex digit that gets
multiplied by 17.
This is a lot nicer than first_child_with_tag_name(...).
The is<T>(Node) functions are obviously unoptimized at the moment,
and this is about establishing pleasant patterns right now. :^)
This patch implements two more selector features:
- "div + p" matches the <p> sibling immediately after a <div>.
- "div ~ p" matches all <p> siblings after a <div>.
These helpers return the next/previous sibling Node that's actually an
element. This will be useful in the CSS engine since CSS doesn't care
about text nodes.
This allows any external actor to signal that the document layout may be
stale. This can be used when loading resources, changing the size or
placement of an element, adding/removing nodes, or really any time.
Since LayoutText inherits all of its style information from its parent
Element anyway, it makes more sense to load the font at a higher level.
And since the font depends only on the style and nothing else, this
patch moves font loading (and caching) into StyleProperties. This could
be made a lot smarter to avoid loading the same font many times, etc.
There's no need for LayoutText to inherit from LayoutInline.
I had the wrong idea here: I was thinking that everything that can be
laid out inline should inherit from LayoutInline, but that's clearly
not sufficient for something like LayoutReplaced which can be laid out
in either way.
"div p" now generates a Selector with two components where the second
component is a type=TagName, value="p", relation=Descendant.
We still don't handle matching of these, but at least we parse them.
The default style for "a" tags now has { color: -libhtml-link; }.
We implement this vendor-specific property by querying the containing
document for the appropriate link color.
Currently we only use the basic link color, but in the future this can
be extended to remember visited links, etc.
The parser now kinda recognizes immediate child selectors, !important,
and various other little things.
It's still extremely far from robust and/or correct. :^)