I misunderstood the spec step for checking whether the host 'ends with a
number'. We can't simply check for it if ends with a number, this check
is actually an algorithm which is required to avoid detecting hosts that
end with a number from an IPv4 host.
Implement this missing step, and add a test to cover this.
Type0 fonts can be either CFF-based or TrueType-based.
Create a subclass for each, put in some spec text, and
give each case a dedicated error code, so that `--debugging-stats`
can tell me which branch is more common.
After the CSSPixels implementation evolved from a wrapper of double
to a fixed-point saturated math arithmetic implementation, it makes
sense to have separate tests for it.
Using fixed-point saturated arithmetics for CSSPixels allows to avoid
accumulating floating-point errors.
This implementation is not complete yet: currently saturated
arithmetics implemented only for addition. But it is enough to not
regress any of layout tests we have :)
See https://github.com/SerenityOS/serenity/issues/18566
This is the preparation to use fixed-point to represent CSSPixels.
Previously, it was acceptable to divide CSSPixels by zero, resulting
in inf, but after migrating to fixed-point stored as an integer, it
would lead to undefined behavior.
clamp_to_int clamps value to valid range of int values so resulting
value does not overflow.
It is going to be used to clamp float or double values to int that
represents fixed-point value of CSSPixels.
This is preparation for introducing fixed-point CSSPixels in upcoming
commits.
Infinity is a valid state for the growth limit value of a grid track.
It was possible to use INFINITY when CSSPixels were represented using
floating point, but it won't work after the transition to fixed point,
which is represented using integers. This change addresses this by
using -1 as a special value to represent the infinite state of the
growth limit.
If a line is hidden by a folding region, then it needs to not take up
any vertical space, or else we just get a glitchy blank line instead of
a folded one. This change corrects the logic when wrapping is not
enabled.
Tries to render all pages of a PDF and then produces a report on which
unimplemented things were encountered.
Example, for pdf_reference_1-7.pdf:
113 times: Rendering of feature not supported: Type0 font not imp...
on pages: 170 (3x) 217 (2x) 250 (9x) 252 (2x) 329 (6x)...
21 times: Rendering of feature not supported: unknown color space
on pages: 489 (4x) 490 (5x) 491 (3x) 492 (5x) 493 (4x)
4 times: Rendering of feature not supported: CCITTFaxDecode Filte...
on pages: 494 (4x)
(Actually, rendering crashes for some page in that file at the moment.
This was with a local change to only render the first 800 pages to work
around that. So this is also good for finding crashes.)
All the logic is exactly the same as for x2 upsampling, so this commit
essentially boils down to adding arrays for default weights and the
logic to select the correct array.
None of the methods actually do anything, but we now create an
actual SeparationColorSpace object for /Separation color spaces.
This fixes a crash on page 810 of pdf_reference_1-7.pdf.
Previously, we'd log a "separation color space not supported" error,
which would lead to Renderer not updating its current color space.
It'd stay a DeviceCYMK color space, which would then later assert
when it got a 1-argument array as color (which now the
SeparationColorSpace gets instead, which logs an "unimplemented"
error for that instead of asserting).
Returning a reference resulted in Mail's use of Promise causing a crash.
Also, awaiting an already-awaited promise is an odd thing to do anyway,
so let's just make it release the resolved/rejected value instead of
returning a reference to it.
Co-Authored-By: Valtteri Koskivuori <vkoskiv@gmail.com>
There is now a `on_color_changed` callback that clients can optionally
hook into to receive real-time updates while the user is picking a
color. If the user hits Cancel, the callback gets called once more with
the color passed in while constructing `ColorPicker`. If the user hits
OK, the same happens with the currently selected color instead.
Programs therefore can perform all their updates with this callback, and
only care about `ExecResult` if they want to make a decision, like if we
should write the result to `ConfigServer`, for example.
Instead, they're now turned into a diagnostic like other rendering
problems, looking like so:
Internal error while processing PDF file:
Unsupported chroma subsampling factors
Makes us no longer crash rendering page 1141 of pdf_reference_1.7-pdf.
That way, we render an incomplete page and log a message instead of
crashing the viewer application.
Lets us survive e.g. page 489 of pdf_reference_1-7.pdf.
Follow the computing column measures section of the specification, which
gives an algorithm for setting intrinsic percentage widths when spanning
columns are involved.
To allow us to add tests that are failing now, but can be enabled as
soon as a change is made to make it pass (without any opportunity to
forget about enabling it).
Additionally, support is added for `xfailIf`, for tests that are
expected to fail given a certain condition, but are expected to pass
otherwise. This is intended to be used for tests that fail in bytecode
mode, but pass in AST (and vice versa).
This is intended to be used in adding test-js tests where there is
different behaviour between the AST interpreter and bytecode mode.
In particular, this is useful for tests which fail in AST, but pass in
bytecode, as the AST interpreter is run in CI but bytecode is not.
This is meant to be used in a similar manner to skipping tests, with the
extra advantage that if the test begins passing unexpectedly, the test
will fail.
Being notified of unexpected passes allows for the test to be updated to
the correct expectation.
As part of this move properties/methods to the correct subclass
(position related properties go under SVGTextPositioningElement).
SVG text element hierarchy:
SVGTextContentElement
^- SVGTextPositioningElement
^- SVGTextElement
^- SVGTSpanElement
^- SVGTextPathElement (TODO)
^- SVGTRefElement (TODO)
It's `"`, not `''`.
Now the `text_next_line_show_string_set_spacing` gets called and logs
a TODO at page render time if `"` is used in a PDF:
warning: Rendering of feature not supported:
draw operation: text_next_line_show_string_set_spacing
It caused a parse error (also at page render time) previously:
[parse_value @ .../LibPDF/Parser.cpp:104]
Parser error at offset 611: Unexpected char """