Commit graph

35002 commits

Author SHA1 Message Date
Idan Horowitz
5238e38886 Base: Remove TelnetServer and WebServer from the generated manpage list
These are no longer autogenerated.
2022-02-28 20:30:35 +02:00
Sam Atkins
6940660dec Base: Remove usermod and wc from the generated manpage list
These now have customizations that CI doesn't like.
2022-02-28 18:36:28 +01:00
Sam Atkins
5563381b28 Base: Make it obvious which pseudo-element tests are unimplemented
(Sorry Linus!)
2022-02-28 16:50:19 +01:00
Tobias Christiansen
8461791ce2 LibWeb: Add support for 'view-box' attribute to SVGs
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. :^)
2022-02-28 16:49:24 +01:00
Tobias Christiansen
4f1df48bd9 LibWeb: Make SVGSVGElement's view_box() const 2022-02-28 16:49:24 +01:00
Vrins
a8cfb34551 LibWeb: Allow <input type="button/submit/reset"> to be styled
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.
2022-02-28 15:46:06 +00:00
Andreas Kling
c8f6a20c02 LibWeb: Remove unused variable in required_box_type_transformation() 2022-02-28 15:14:32 +01:00
Andreas Kling
f8aa0c144f LibWeb: Store box's containing line box fragment in FormattingState
Layout should not change any properties of a box until the moment a
FormattingState is committed.
2022-02-28 14:17:44 +01:00
Andreas Kling
aa72ebf7aa LibWeb: Use copy-on-write to make cloning a FormattingState much cheaper
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.
2022-02-28 14:17:44 +01:00
Andreas Kling
0a533da22f LibWeb: Don't crash on content with SVG elements outside of <svg>
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.
2022-02-28 14:17:44 +01:00
Andreas Kling
ed089586ea LibWeb: Move some of PaintContext out of line 2022-02-28 14:17:44 +01:00
Andreas Kling
ee50a4e060 LibWeb: Don't blockify or inlinify boxes with already-correct type
If something is already a block on the outside, we don't want to
overwrite its inside display type.
2022-02-28 14:17:44 +01:00
Andreas Kling
c9ab9e2c64 LibWeb: Blockify children of parents with display:grid or display:flex 2022-02-28 14:17:44 +01:00
Andreas Kling
20caea2f86 LibWeb: Split CSS box type transformations into a helper function
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.
2022-02-28 14:17:44 +01:00
Andreas Kling
cd5c17d88e LibWeb: Improve Layout::Box has-definite-size? computation
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.
2022-02-28 14:17:44 +01:00
Andreas Kling
c6cf240f9a LibWeb: Store bottom edge location with each LineBox
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.
2022-02-28 14:17:44 +01:00
Andreas Kling
4b6295e667 LibWeb: For height:auto blocks, measure from top of *top* line box
We were incorrectly checking for negative top edges in the *last* line
box only.
2022-02-28 14:17:44 +01:00
Andreas Kling
19954dfdf8 LibWeb: Add FormattingState::clone()
This makes a deep copy of a FormattingState.
2022-02-28 14:17:44 +01:00
Andreas Kling
1d05823810 LibWeb: Store Layout::Box overflow data in Optional instead of OwnPtr 2022-02-28 14:17:44 +01:00
Andreas Kling
916bbf5910 LibWeb: Use Vector<LineBoxFragment> instead of NonnullOwnPtrVector
This removes one step of indirection, but more importantly, makes it
easy to copy these objects. :^)
2022-02-28 14:17:44 +01:00
Andreas Kling
16a47165ee LibWeb: Use coordinate instead of WeakPtr for box->fragment connection
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.
2022-02-28 14:17:44 +01:00
Andreas Kling
726edd2d3b LibWeb: Pass state to create_independent_formatting_context_if_needed()
Instead of using the current m_state implicitly, make this function take
a FormattingState&. This will allow us to use it for throwaway layouts.
2022-02-28 14:17:44 +01:00
Timur Sultanov
ffbd630ca6 AK: Add tests for integer values formatting in printf 2022-02-28 14:08:24 +01:00
Timur Sultanov
406b3fc3fe AK: Correctly process precision modifiers in printf 2022-02-28 14:08:24 +01:00
TheOddGarlic
6cda142c28 groupdel: Port to LibMain 2022-02-28 14:05:04 +01:00
TheOddGarlic
6499699d6d useradd: Port to LibMain 2022-02-28 14:05:04 +01:00
Kyle Anthony Williams
3b61fbf15f Base: Clarify that TelnetServer must be run as root 2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
a732d26a7b Base: Add gist to and modify description of usermod man page
This patch brings the man page usermod into line with its
siblings useradd and usermod.
2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
0abdecf2b6 Base: Move EchoServer man page to section 8 2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
0c33b494b8 Base: Combine TelnetServer man pages :^)
Two different man pages for TelnetServer could be found in sections
1 and 8 of Serenity's manual. This patch combines both and places
the page in section 8.
2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
f5c517015d Base: Change gist of Shell man page
Pre-patch, the man page encased the name of the program in quotes,
which is inconsistent with other man pages, unnecessarily
repeated "Shell" in the gist, and included "the" in the gist,
which is also inconsistent with other man pages.
2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
2266020bc0 Base: Add gists to man pages that lack one
Sources:
Eyes: https://www.x.org/releases/X11R7.6/doc/man/man1/xeyes.1.xhtml
wc: FreeBSD manual.
2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
aae047e347 Base: Move WebServer man page to section 8 2022-02-28 14:01:41 +01:00
Kyle Anthony Williams
aedf6042a9 Base: Add "Open" link to Eyes, Help man pages 2022-02-28 14:01:41 +01:00
Lucas CHOLLET
1172fd682a TextEditor: Support multiline highlighting for trailing space
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.
2022-02-28 14:00:27 +01:00
Lucas CHOLLET
9c2e89e8b8 TextEditor: Fix highlighting bug in wrapping mode
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.
2022-02-28 14:00:27 +01:00
kleines Filmröllchen
889315e8aa Piano: Respect logarithmic parameters in sliders
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.
2022-02-28 13:59:31 +01:00
kleines Filmröllchen
e7d84da3da LibDSP: Allow ProcessorRangeParameter to specify if it's a log value
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.
2022-02-28 13:59:31 +01:00
kleines Filmröllchen
98058f7efe AK: Add FixedPoint base 2 logarithm
The log base 2 is implemented using the binary logarithm algorithm
by Clay Turner (see the link in the comment)
2022-02-28 13:59:31 +01:00
kleines Filmröllchen
30002c2ccb AK: Add bit shift to FixedPoint 2022-02-28 13:59:31 +01:00
kleines Filmröllchen
5d6e3441fe AK: Fix FixedPoint to integral comparisons
Add tests to ensure that the fixed point numbers compare correctly to
integrals
2022-02-28 13:59:31 +01:00
Lenny Maiorani
f5fd2f3857 Services: Port FileOperation to LibMain 2022-02-28 13:57:26 +01:00
Lenny Maiorani
b455363ce7 LibCore: Add rmdir system call wrapper 2022-02-28 13:57:26 +01:00
Lenny Maiorani
1dd70a6f49 Applications: Change static constexpr variables to constexpr
Function-local `static constexpr` variables can be `constexpr`. This
can reduce memory consumption, binary size, and offer additional
compiler optimizations.
2022-02-28 13:54:27 +01:00
roughjericho
7012a5eb0b Base: Tweak the Plum theme's Ruler color
Fixes cell borders in Spreadsheet being the same color as the rest of
the cell when the Plum theme is being used.
2022-02-28 13:46:58 +01:00
MacDue
8b2025d8fc LibVT: Fix crash from integer overflow in text wrapping
Fixes #12786
2022-02-28 10:29:48 +01:00
Karol Kosek
0d0e5323dd Base: Flip U+2190 and U+2192 horizontaly in Katica Regular 10
Two arrows (LEFTWARDS ARROW and RIGHTWARDS ARROW) were pointing
in the opposite direction.

https://www.unicode.org/charts/PDF/U2190.pdf
2022-02-27 23:41:17 +00:00
Itamar
7fa7c7d63c LanguageServers/Cpp: Make find declaration of enums work 2022-02-27 21:42:05 +01:00
Itamar
4335bd453d LanguageServers/Cpp: Make find declaration for a declaration node work
The CppComprehensionEngine can now find the declaration of a
declaration node of type class/namespace/function.
2022-02-27 21:42:05 +01:00
Itamar
abc420b15a LibCpp: Set end position for the return type node of FunctionType nodes
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.
2022-02-27 21:42:05 +01:00