When deciding on a box type transformation (blockify/inlinify) for a
pseudo element, we have to use the originating element as a reference
rather than the parent.
(The originating element *is* the parent for its pseudo elements.)
This can occur if a mouse click on a mouse event tracking node causes a
page navigation. As the old document is torn down, the event handler may
have a stale reference to the tracking node. If a subsequent mouse event
occurs on that node, we would crash trying to access the node's styled
properties that are no longer valid.
To fix this, when we are deciding what node to send the event to, and we
have a mouse event tracking node, check if that node still wants the
event. If not, clear the tracking node.
For example, it's possible to access Node::computed_values() on a node
that neither has style nor a parent with style. This ultimately results
in a null pointer dereference when we return parent()->computed_values()
as a fallback. This can be a little tricky to track down due to these
functions being inlined, so add an explicit verification.
We fail to build `getconf.c` from the builtin examples. And therefore
don't install the rest. If we remove it, we successfully build the
rest of the examples.
If there is a remaining margin-bottom in margin collapsing state
tracker after laying out all boxes in the current BFC, it must be
assigned to the last in-flow child since margin collapsing cannot
occur across a formatting context boundary.
The current issue where margin-bottom may be counted twice due to
"collapse through" margins in the last in-flow child box is addressed
with this fix by excluding such boxes during the search for a box to
assign the remaining margin.
Test case coming with this fix has a layout bug with incorrectly
computed line height.
The WebContent process behaves a bit awkwardly on macOS. When we launch
the process, we have to create a QGuiApplication to access system fonts.
But on macOS, doing so creates an entry in the Dock, and also causes the
WebContent to be focused. So if you enter cmd+Q without first focusing
the Ladybird GUI, WebContent is closed, while the Ladybird process keeps
running.
This shouldn't have been moved to EventLoopManager, as the manager is
global and one-per-process, and the implementation is one-per-loop.
This makes cross-thread event posting work again, and unbreaks
SoundPlayer (and probably other things as well.)
We currently query Qt for system fonts using QFont::setStyleHint(). The
docs from Qt have the following note regarding this API on X11:
Qt does not support style hints on X11 since this information is not
provided by the window system.
This prevents any monospace font from working on X11 systems. For now,
work around this by specifying the font-family for fonts which Qt has
listed as mapping to a CSS generic font-family.
Also adds tests for finding declaration of arrays inside
CppComprehension which requires proper parsing for passing.
Side-effect of this patch: if we ctrl+click on array variables, it
should jump to the correct declaration inside HackStudio.
We were going about this the wrong way:
* We should not send `SDL_QUIT` events; SDL2 is doing this for us
already when the last window is closed, for example.
* The `SDL_WINDOWEVENT_CLOSE` event does not represent a closed window,
but rather a _request_ from the window manager to close a window.
This resolves the issue with the PrBoom+ port where the quit screen
would not be shown when trying to close the main window.
This appears to be consistent with other engines, and fixes many pages
where we were misinterpreting super large z-index values as something
else entirely.