In order to correctly calculate the width of the header add the
top left x coordinate + the width of the content. Previously was
using the width returned by the visible_content_rect(), which
when there was no content would be null. This would be problematic
as it would lead to not rendering the headers of tables when there was
no content (for example in the SystemsMonitor in the Networks tab).
Now, regardless of whether there is content or not in the table,
the header is visible.
AFAICT, css-values-4 tells us that clamping numbers to a range where
min>max is okay. That means we can't use AK::clamp() since it will
VERIFY that max>=min.
This patch adds a css_clamp() helper (locally in FFC for now).
This fixes an issue where a bunch of sites were crashing due to the
VERIFY in AK::clamp().
This is the vectorized version of `gl_tex_parameter`, which sets the
parameters of a texture's sampler. We currently only support one single
pname, `GL_TEXTURE_BORDER_COLOR`, which sets the border color of a texel
for if it is sampled outside of a mip-map's range.
We were mistakenly treating inline replaced elements as if they are the
start of a regular display:inline element. This meant that we collected
the horizontal start and end metrics from the box model, and then added
those to the inline-level item produced by InlineLevelIterator.
This effectively meant that <img>, <svg> and other replaced elements got
double-sized values for margin/border/padding on the left and right
sides. (Which manifested as a mysterious margin around the element.)
Previously, we were running the "load fonts if needed" machine at the
start of every style computation. That was a lot of unnecessary work,
especially on sites with lots of style rules, since we had to traverse
every style sheet to see if any @font-face rules needed loading.
With this patch, we now load fonts once per sheet, right after adding
it to a document's style sheet list.
Give the Paintable class some basic helpers for traversing the paint
tree. Note that they actually piggy-back on the layout tree for links
between nodes.
A change was made prior to percent encode plus signs in order to fix an
issue with the Google cookie consent page.
Unforunately, this was treating a symptom of a problem and not the root
cause and is incorrect behavior.
When cloning the PaintContext we should be using the painter backed by
the bitmap created for this stacking context layer.
Fixes: 54c3053bc3 ("LibWeb: Preserve paint state when painting...")
Any left-over comments in the pending_comments vector are now inserted
as sub object children, as these are serialized last and will therefore
show up in their expected location.
The spec notes that this AO is unused by ECMA-262, but is provided for
ECMAScript hosts. Move the definition to a common location to allow
test-js to also use it.