These classes are used as-is in all chromes. Move them to LibWebView so
that non-Serenity chromes don't have to awkwardly reach into its headers
and sources.
`BODY[HEADER.FIELDS (...)]` gives us a part of a message that we have to
parse ourselves. Looking at the FIXME, we didn't do much good job doing
it, so let's better replace it with much simpler and probably preferred
way (FETCH command has ALL and FULL macro types that also include it.)
The tradeoff is that we get more data than we use currently (CC, BCC,
unparsed date format, message id, etc.).
Additionally this commit will try to decode 'encoded-words' in sender
names, because they are here more common.
Preparation for a sortable mailbox. Otherwise the model would resort
itself and select mail again forever.
Arrow keys will no longer load mail automatically, now you also need to
hit Enter.
Parsing mail headers and its date format is a rather tedious task,
especially if you want to support the obsolete syntax, so let's ask the
server to do it for us!
This will convert the date to our local time and display it in a
sortable and fixed-width format "%Y-%m-%d %H:%M:%S".
Rather than modify the transform of the parent (which could change
independently), this adds a new override element_transform() where
element specific tranfroms can be applied. This will always stay in
sync with the attributes.
A ref test comparing a .svg and .html version of the same file is
added as due to differences in attribute parsing order, the .svg version
was previously drawn incorrectly.
Fixes#20859
Promises can take an Error type now for quite some time, so let's use it
instead of returning an empty Optional type in the result field. :^)
Ideally we should give a more detailed info of what failed to parse, but
this will do for now.
None of the existing tests contain a URL which has a fragment in them,
but this does verify that the URL parser does not actually find any!
Also, this should let us verify the correctness of URLs which actually
do contain fragments.
This part of the spec is mostly useful for our debugging for now, but
could eventually be hooked up so that the user can see any reported
validation errors.
The main change here is that we now follow the spec by asserting the URL
is not special. Previously I could not find a way to enable this without
getting assertions when browsing the web - but that seems to no longer
be the case (probably from some other fixes which have since been made).
Previously, we always assumed that local includes are relative to the
parent directory of a file. This effectively banned style-wise
multi-directory subprojects which are not libraries, since there was no
way to cleanly reference local file from a different directory.
This commit relaxes the restrictions by introducing
LOCAL_INCLUDE_ROOT_OVERRIDES. Entry in the set changes root of the
local includes to itself for all files in its subtree.
Previously, the corner overlap algorithm implementation did not shrink
the border radii for zero width/height boxes, which resulted in
incorrect painting.
With this the implementation is updated to more closely follow the spec
steps, which naturally handles the zero width/height case. This makes
use of the `CSSPixelFraction` class for lossless comparison and
multiplication of the scaling factor for the radii.
Co-authored-by: Zaggy1024 <Zaggy1024@gmail.com>
This class will allow us to compare the ratio of two `CSSPixels` values
losslessly.
Not only that, but an operation like `a * (b / c)` should no longer
be lossy, since the operation can be carried out as `(a * b) / c`
implicitly instead.
Since we always pass the px value as an argument to resolved(), we can
pass it directly as CSSPixels instead of wrapping it in Length. This
approach allows us to avoid converting to a double, resulting in fewer
precision issues.
If we set m_waiting_for_messages to true for the intial message request,
we might never receive a response, and block the console from requesting
any more messages indefinitely. Instead, issue a non-blocking initial
request, which is how the Qt and Serenity chromes behaved before the
ConsoleClient abstraction.
This also changes ConsoleClient::clear() to use run_javascript() rather
than js_console_input(), as that is also how the chromes used to behave.
This adds menu items to open an interactive JavaScript console for a web
page. This more or less mimics the Qt implementation of the console.
Hooks are included to tie the lifetime of the console window with the
tab it belongs to; if the tab is closed, the console window is closed.
This creates WebView::ConsoleClient to handle functionality that will be
common to the JS consoles of all Ladybird chromes. This will let each
chrome focus on just the UI.
Note that this includes the `console.group` functionality that only the
Serenity chrome previously had. This was a FIXME in the Qt chrome, and
it is implemented such that all chromes will receive this functionality
for free.