We now support generating top-left submatrices from a `Gfx::Matrix`
and we move the normal transformation calculation into
`SoftGPU::Device`. No functional changes.
We were normalizing data read from vertex attribute pointers based on
their usage, but there is nothing written about this behavior in the
spec or in man pages.
When we implement `glVertexAttribPointer` however, the user can
optionally enable normalization per vertex attribute pointer. This
refactors the `VertexAttribPointer` to have a `normalize` field so we
can support that future implementation.
We were transforming the vertices' normals twice (bug 1) and
normalizing them after lighting (bug 2). In the lighting code, we were
then diverting from the spec to deal with the normal situation, which
is now no longer needed.
This fixes the lighting of Tux in Tux Racer.
This patch reimplements inset property resolution based on the new
CSS Positioned Layout specification. Nothing should change for
left/right insets, but we gain support for top/bottom. :^)
Relatively positioned boxes should not affect the *layout* of their
siblings. So instead of applying relative inset as a layout-time
translation on the box, we now perform the adjustment at the paintable
level instead.
This makes position:relative actually work as expected, and exposes some
new bugs we need to take care of for Acid2. :^)
Before this the flex layout didn't take into account the applied
borders or padding while laying out the items.
The child's top and left borders would get painted over the
parent's borders, also due to it not taking borders into account,
children with borders would overlap each other.
Due to it not taking padding into account, the children would get
drawn outside the parent element.
Some ISPs may MITM DNS requests coming from clients, changing the case
of domain name in response. LookupServer will refuse responses from
any DNS server in that case. This commit changes the behaviour to
perform a case-insensitive equality check.
If a C++ object already has a JS wrapper, we don't need to go through
the expensive type checks to figure out which kind of wrapper to create.
Instead, just return the wrapper we already have!
This gives a noticeable increase in smoothness on Acid3, where ~10% of
CPU time was previously spent doing RTTI type checks in wrap(). With
these changes, it's down to ~1%.
This reverts commit 2b2915656d.
While this adjustment is bogus, it is currently responsible for putting
CenterLeft aligned scalable text in the right position.
This is going to take a bunch of work to get right.
We've gotten ourselves into a bit of a mess by mixing pixel and point
sizes in multiple places. Step one towards getting out of this mess
is adding explicit accessors for the unit you're trying to fetch.
The core of the issue comes from bitmap fonts storing integer pixel
sizes and scaled (TTF) fonts storing float point sizes.
This is useful, for instance, in games in which you can switch held
items using the scroll wheel. In order to implement this, they
previously would have to either add a hard-coded division by 4, or look
up your mouse settings to adjust correctly.
This commit adds an MouseEvent.wheel_raw_delta_x() and
MouseEvent.wheel_raw_delta_y().
...but never allow the resulting height to become negative. This solves
an issue seen on Acid3 where elements with negative vertical margins
expanded the size of their height:auto container instead of shrinking
it, which is the correct behavior. This now works :^)
CSS 2.2 says "Horizontal margins never collapse."
So instead of collapsing them, we now add them together, which makes
negative margins between floating boxes work beautifully.
Instead of TextNode::ChunkIterator having two bool members to remember
things across calls to next(), this patch reorganizes the loop in next()
so that preserved newline/whitespace chunks are emitted right away
instead of in an awkward deferred way.
Instead of emitting a Text item with the "should_force_break" flag set
to true, newlines in newline-preserving text content now timply turn
into ForcedBreak items. This makes the <pre> element work again.
From the HTML spec:
Modulo platform conventions, it is suggested that the following
elements should be considered as focusable areas and be sequentially
focusable:
...
- button elements
- select elements
- textarea elements
...
Also add a spec link to the existing HTMLAnchorElement::is_focusable().
Note that this still doesn't allow triggering keyboard-focused buttons,
checkboxes, or radio buttons - we don't seem to run the expected
activation behavior for any of them.
From the HTML spec:
Modulo platform conventions, it is suggested that the following
elements should be considered as focusable areas and be sequentially
focusable:
...
- input elements whose type attribute are not in the Hidden state
...
Previously BGRx8888 was used, which produces artifacts with the new
antialiased window frames with border radii, which require alpha
blending whilst painting.
I believe this is all of them, but I may have missed some.
Several properties technically do not allow negative numbers but the
description says to accept these as valid, and then clamp them
afterwards to the desired range. As such, we don't reject them during
parsing.
This commit limits the autocomplete processes to effectively have
readonly access to the fs, and only enough pledges to get the dynamic
loader working.
This removes them from the main invocation example in --help, as well as
hides them from autocomplete results (we were previously special-casing
"help" and "version").
A program can either respond to `--complete -- some args to complete`
directly, or add a `_complete_<program name>` invokable (i.e. shell
function, or just a plain binary in PATH) that completes the given
command and lists the completions on stdout.
Should such a completion fail or yield no results, we'll fall back to
the previous completion algorithm.