Age | Commit message (Collapse) | Author |
|
This patch begins the support for the 'view-box' attribute that can be
attached to <svg>'s.
The FormattingContext determines the size of the Element according to
the specified 'width' and 'height' or if they are not given by the
'viewbox' or by the bounding box of the path if nothing is specified.
When we try to paint a SVG Path that belongs to a <svg> that has the
'view-box' and a specified 'height'/'width', all the parts of the path
get scaled/moved accordingly.
There probably are many edge cases and bugs still to be found, but this
is a nice start. :^)
|
|
|
|
Previously we used a native ui button to draw the buttons.
These buttons can however not be styled with css.
To allow these to be styled with css, we create a button with
the UA stylesheet that resembles the system ui button.
|
|
|
|
Layout should not change any properties of a box until the moment a
FormattingState is committed.
|
|
Instead of making a full copy of every NodeState when cloning a
FormattingState, we make NodeState ref-counted and implement a basic
copy-on-write mechanism.
FormattingState::get_mutable() now makes a deep copy of the NodeState
when first accessed *if* it is shared with other FormattingStates.
|
|
We'll have to do something more proper to support this scenario
eventually, but for now let's at least not crash just because somebody
put an SVG <path> inside an HTML element.
|
|
|
|
If something is already a block on the outside, we don't want to
overwrite its inside display type.
|
|
|
|
Let's have one function that determines the type of transformation
needed, and another to actually perform the transformation.
This makes it much easier to read, and we don't have to duplicate the
logic for doing the transformation.
|
|
We now consider a layout box as having definite size in these cases:
- The size is a <length>.
- The size is a <percentage> and the containing block has definite size.
This is not complete, but a bit more accurate than what we had before.
|
|
Previously we were computing the bottom edge of a line box by finding
the bottommost fragment on the line.
That method didn't give correct results for line boxes with no fragments
(which is exactly what you get when inserting a bunch of <br> elements.)
To cover all situations, we now keep track of the bottommost edge in the
LineBox object itself.
|
|
We were incorrectly checking for negative top edges in the *last* line
box only.
|
|
This makes a deep copy of a FormattingState.
|
|
|
|
This removes one step of indirection, but more importantly, makes it
easy to copy these objects. :^)
|
|
Using WeakPtr to remember which LineBoxFragment owns which Box was
imposing some annoying constraints on the layout code. Importantly, it
was forcing us to heap-allocate fragments, which makes it much harder to
clone a FormattingState.
This patch replaces the WeakPtr with a coordinate system instead.
Fragments are referred to by their line box index + fragment index
within the line box.
|
|
Instead of using the current m_state implicitly, make this function take
a FormattingState&. This will allow us to use it for throwaway layouts.
|
|
|
|
|
|
The last commit fixes a bug, but also exposes the fact that trailing
space highlighting isn't really supported on multiple lines. This patch
correct the wrong behavior by adding an offset to adjust rectangle's
position.
|
|
Before this patch the highlighted rectangle wasn't placed on the right
spot. Now the red highlighting is correctly placed at the end of the
line. This was due to a function called with a wrong argument.
|
|
If the underlying parameter is logarithmic, the slider respects that and
switches to a logarithmic display. Currently, the used base is e, and
we'll have to see in practice if 2 or 10 might be better. The parameters
that make use of this, as can be seen in the previous commit, are all of
the time dependent parameters such as the synth envelope parameters, as
with these, usually fine-grained control at small time scales and
coarser control at large time scales is desired.
This was a good opportunity to refactor the slider step count into a
constant.
|
|
This doesn't affect the parameter's own behavior but is part of the
parameter meta-data, just as the name. If a parameter is logarithmic,
UI elements should represent it with an interface that scales
logarithmically.
|
|
|
|
|
|
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
|
|
Fixes #12786
|
|
|
|
The CppComprehensionEngine can now find the declaration of a
declaration node of type class/namespace/function.
|
|
Previously we didn't set the end position for the return type node of
function FunctionType nodes.
This caused a VERIFY failure crash when dumping an AST that contains
such nodes.
|
|
The CppComprehensionEngine can now find the declaration of a reference
to a namespace.
|
|
This allows us to eliminate a major source of infallible allocation in
the Kernel, as well as lay down the groundwork for OOM fallibility in
userland.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
And default to NoWrap when they are type SingleLine.
|
|
After the kill_line (^U) command was used, searching backwards in the
history would still filter based on the text previous to the deletion.
Update the inline search cursor like already done in other internal
functions, so the text used for search is the current one.
|
|
We use the environment variable SERENITY_SOURCE_DIR to resolve and check
icon links. This is a bit inconvenient as SERENITY_SOURCE_DIR needs to
be set correctly before invoking the markdown checker, but as we use it
through the check-markdown script anyways, I think it's not a problem.
|
|
|
|
This should be much more robust against weirdly-formatted links that are
still valid URLs, additionally, future URL checkers can immediately
take advantage of the already-existing URL object.
Note that not all markdown links are valid URLs or paths, and that that
is intentional (e.g. only fragments, relative links etc.). We don't just
fail when something is not a URL.
|
|
With a special flag, we can now invalidate the links early on.
|
|
This removed checks for missing manpages, which we now need again as the
manpages are checked again.
|
|
|
|
CRC32 table is generated at compile-time and put into a static
variable in the header file. This can be moved to be a function
instead of a class, be moved to the `.cpp` file` and generated as an
array instead of a class which only implements `operator[]`.
|
|
Of course, Buffer is going to be removed very soon, but much of the
WavLoader behavior still depends on it. Therefore, this intermediary
API will allow adopting the Loader infrastructure without digging too
deep into the WavLoader legacy code. That's for later :^)
|