This allows selection to work within shadow roots and prevents the
selection being cleared if the mouse moves outside of the current
document or shadow root.
This call is used to inform the chrome that it should display a tooltip
now and avoid any hovering timers. This is used by <video> tags to
display the volume percentage when it is changed.
Now instead of sending the position in which the user entered the
tooltip area, send just the text, and let the chrome figure out how to
display it.
In the case of Qt, wait for 600 milliseconds of no mouse movement, then
display it under the mouse cursor.
about:blank in most other browsers has a white background regardless of
dark mode. So rather than messing with that, remove the contents of the
NTP for now, and set a dark background-color in dark mode.
Previously, unnecessary boundary checks were being done when
constructing the range objects used to represent find in page matches.
These checks are no longer performed leading to a significant speedup
when performing find in page queries on pages containing a lot of text.
The first step of the find in page algorithm is to walk the layout tree
of each document on the page and construct a list of strings against
which to search for matches.
Previously, this was being done for each new query, even when the
page content hadn't been updated. The output of this process is now
cached in the viewport node of the associated document. This ensures
that this process is no longer repeated unnceessarily.
Unit tests on macOS deadlock because the WebContent process is waiting
for the next opportunity to render before a screenshot is taken. For
some reason unknown to myself, this opportunity never arrives. In
order to not deadlock, screenshot requests are now also processed
separately from rendering.
Since "Character" tokens do not have an "end position", viewing source
drops the source contents following the final non-"Character" token.
By handling the EOF token and breaking out of the loop, we avoid this
issue.
This allows developers on macOS to open Ladybird.app in Instruments.
Add some documentation for how to use the command as well. It is enabled
automatically when CMAKE_BUILD_TYPE is not Release or RelWithDebInfo.
This is an attempt to fix the hanging CI on macOS caused by some
screenshot requests being stuck unprocessed. With this change, we at
least make sure that the HTML event loop processing, which triggers
repainting, will happen as long as there are navigables that need to be
repainted.
By Setting setBordered propperty on header buttons to `Yes` this
path makes the whole button clickable. Previously the only the
icon was clickable, now it's easy to click.
This avoids an unecessary lossy conversion for the current time from
double to i32. And avoids an UBSAN failure on macOS that's dependent
on the current uptime.
From SkPaint.h:
"Sets the thickness of the pen used by the paint to outline the shape.
A stroke-width of zero is treated as "hairline" width. Hairlines are
always exactly one pixel wide in device space (their thickness does not
change as the canvas is scaled)."
While we expect stroke-width=0 to simply not be painted.
As recommended by the CMake docs, let's tolerate systems or setups that
don't have backtrace(3) in the `<execinfo.h>` header file, such as those
using libbacktrace directly.
This ensures that removing the last view from a WebContentClient will
close its associated process, assuming the WebContent process is not
hung. A more drastic measure will be needed to trigger forcefully
killing the process when it doesn't respond to this request.
This large commit also refactors LibWebView's process handling to use
a top-level Application class that uses a new WebView::Process class to
encapsulate the IPC-centric nature of each helper process.
Doing so results in incorrect values being created, ultimately leading
to traps or errors.
(cherry picked from commit f6c3b333334f7bb5314a844804cb259cf277005e)
The ChunkIterator now limits a chunk to using only one font (before, it
was possible to have a chunk with >1 font, when `unicode-range` CSS
property is used).
This change allows us to reduce some complexity in the text shaping and
painting code and makes us compatible with the APIs in Skia and
HarfBuzz.
Typeface is a more widely used name for the data represented by
class previously named VectorFont.
Now:
- Typeface represents decoded font that is not ready for rendering
- ScaledFont represents the combination of typeface and size for
rendering