Age | Commit message (Collapse) | Author |
|
|
|
|
|
Part of the fix-linkage patch is removed as the changes are no
longer required.
|
|
|
|
Also preserve the `-j$(nproc)` flag.
|
|
Also added the recommended CFLAGS.
|
|
Three optimizations are applied:
1. If the list of vertices to clip is empty, return immediately after
clearing the output list.
2. Remember the previous vertex instead of recalculating whether it is
within the clip plane.
3. Instead of copying and swapping lists around, operate on the input
and output lists directly. This prevents a lot of `malloc`/`free`
traffic as a result of vector assignments.
This takes the clipping code CPU load from 3.9% down to 1.8% for
Quake 3 on my machine.
|
|
|
|
This keeps us from accidentally overwriting an already set region name,
for example when we are mapping a file (as, in this case, the file name
is already stored in the region).
|
|
The existing code looks innocently correct, implementing the following
step:
3. If IsCallable(func) is false, set func to the intrinsic function
%Object.prototype.toString%.
as
return ObjectPrototype::to_string(vm, global_object);
However, this misses the fact that the next step calls the function with
the previously ToObject()'d this value (`array`):
4. Return ? Call(func, array).
This doesn't happen in the current implementation, which will use the
unaltered this value from the Array.prototype.toString() call, and make
another, unequal object in %Object.prototype.toString%. Since both that
and Array.prototype.toString() do a Get() call on said object, this
behavior is observable (see newly added test).
Fix this by actually doing what the spec says and calling the fallback
function the regular way.
|
|
|
|
This is an editorial change in the Temporal spec.
See: https://github.com/tc39/proposal-temporal/commit/01714a5
|
|
For inline-blocks and inline replaced elements, we previously fell into
a code path that tried to find a corresponding line box fragment to
invalidate. However, we don't need to do any of that, all we need to do
is get the absolute rect from our paintable, and invalidate that.
This makes CRC2D invalidations happen immediately instead of as a side
effect of some other invalidation.
|
|
|
|
Having all spec comments verbatim on their own line with no additions
made by us will make it easier to automate comparing said comments to
their current spec counterparts.
|
|
I noticed we were missing this when I added to PerformEval :^)
|
|
|
|
While adding spec comments to PerformEval, I noticed we were missing
multiple steps.
Namely, these were:
- Checking if the host will allow us to compile the string
(allowing LibWeb to perform CSP for eval)
- The parser's initial state depending on the environment around us
on direct eval:
- Allowing new.target via eval in functions
- Allowing super calls and super properties via eval in classes
- Disallowing the use of the arguments object in class field
initializers at eval's parse time
- Setting ScriptOrModule of eval's execution context
The spec allows us to apply the additional parsing steps in any order.
The method I have gone with is passing in a struct to the parser's
constructor, which overrides the parser's initial state to (dis)allow
the things stated above from the get-go.
|
|
We already had the CSSRule::Type enum, but the values were not aligned
with the CSSOM spec. This patch takes care of that, and then exposes
the type of a CSSRule to JavaScript via the "type" attribute.
|
|
|
|
This flag is used to prevent reparsing the style attribute after it is
automatically updated after using the CSSOM API to mutate style.
|
|
We already had setProperty() but it was full of ad-hoc idiosyncracies.
This patch aligns setProperty() with the CSSOM spec and also implements
removeProperty() since that's actually needed by setProperty() now.
Some things fixed by this:
- We now support the "priority" parameter to setProperty()
- Element "style" attributes now update to reflect CSSOM mutations
|
|
Previously draw_text_run only passed a single code point to
draw_glyph_or_emoji. This lead e.g. to broken unicode flag support.
Improve this by passing along the code_point iterator, so the emoji code
can detect the correct emojis and advance it as needed.
|
|
|
|
This is a pretty trivial change so they're all batched together.
|
|
This saves work in places that previously had to create a
`Vector<String>` anyway, or repeatedly cast the char* to a String.
Plus, Strings are nicer than char*. :^)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is a single function, which behaves like the various LibC exec()
functions depending on the passed parameters. No direct equivalent is
made for execl() - you have to wrap your arguments in a Span of some
kind.
On Serenity, this calls the syscall directly, whereas Lagom forwards to
the appropriate LibC function.
|
|
|
|
|
|
* Similarly to clipPath, this doesn't need to get rendered, so return no
LayoutNode.
|
|
|
|
|
|
Previously we transformed each rasterized point when drawing a line.
Now we transform the lines' endpoints instead.
That means running two transforms per line instead of transforms for
each pixel. It is not clear that the overhead for the fast path is
still worth it. If we still want to optimize identity and translations,
it is probably better to do that inside AffineTransform.
In addition this will behave nicer if the transform includes scaling.
Previously this would rasterize lines before scaling. Which means
drawing too many points when scaling down, and not drawing enough
points when scaling up.
With the new approach we will automatically rasterize at pixel scale.
This is essentially the same as OpenGL, where vertices are transformed
and rasterization happens in screen space.
|
|
|
|
If the transform is a simple translation, we don't need to run the big
and slow transform rasterizer.
|
|
When calling layout_inside() on a flex item that can't have children of
its own, layout_inside() will not return an independent formatting
context, so we need to handle that case here.
|
|
We never really hit this code path before, but now that IMG elements can
be block-level, we need to get them hooked up with box model metrics.
|
|
This is a hack that allows block-level replaced elements to be flex
items. Flexbox layout currently assumes (in many places) that it's
always possible to create an independent formatting context for each of
its items.
|
|
Previously we forced all image elements to be inline-level. Now they can
participate in block layout if they prefer. :^)
|
|
|
|
|
|
If a layout box claims to have both intrinsic width and height, we can
simply return those instead of performing any kind of layout.
|