summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-02-28LibWeb: Add support for 'view-box' attribute to SVGsTobias Christiansen
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-28LibWeb: Make SVGSVGElement's view_box() constTobias Christiansen
2022-02-28LibWeb: Allow <input type="button/submit/reset"> to be styledVrins
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-28LibWeb: Remove unused variable in required_box_type_transformation()Andreas Kling
2022-02-28LibWeb: Store box's containing line box fragment in FormattingStateAndreas Kling
Layout should not change any properties of a box until the moment a FormattingState is committed.
2022-02-28LibWeb: Use copy-on-write to make cloning a FormattingState much cheaperAndreas Kling
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-28LibWeb: Don't crash on content with SVG elements outside of <svg>Andreas Kling
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-28LibWeb: Move some of PaintContext out of lineAndreas Kling
2022-02-28LibWeb: Don't blockify or inlinify boxes with already-correct typeAndreas Kling
If something is already a block on the outside, we don't want to overwrite its inside display type.
2022-02-28LibWeb: Blockify children of parents with display:grid or display:flexAndreas Kling
2022-02-28LibWeb: Split CSS box type transformations into a helper functionAndreas Kling
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-28LibWeb: Improve Layout::Box has-definite-size? computationAndreas Kling
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-28LibWeb: Store bottom edge location with each LineBoxAndreas Kling
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-28LibWeb: For height:auto blocks, measure from top of *top* line boxAndreas Kling
We were incorrectly checking for negative top edges in the *last* line box only.
2022-02-28LibWeb: Add FormattingState::clone()Andreas Kling
This makes a deep copy of a FormattingState.
2022-02-28LibWeb: Store Layout::Box overflow data in Optional instead of OwnPtrAndreas Kling
2022-02-28LibWeb: Use Vector<LineBoxFragment> instead of NonnullOwnPtrVectorAndreas Kling
This removes one step of indirection, but more importantly, makes it easy to copy these objects. :^)
2022-02-28LibWeb: Use coordinate instead of WeakPtr for box->fragment connectionAndreas Kling
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-28LibWeb: Pass state to create_independent_formatting_context_if_needed()Andreas Kling
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-28groupdel: Port to LibMainTheOddGarlic
2022-02-28useradd: Port to LibMainTheOddGarlic
2022-02-28TextEditor: Support multiline highlighting for trailing spaceLucas CHOLLET
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-28TextEditor: Fix highlighting bug in wrapping modeLucas CHOLLET
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-28Piano: Respect logarithmic parameters in sliderskleines Filmröllchen
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-28LibDSP: Allow ProcessorRangeParameter to specify if it's a log valuekleines Filmröllchen
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-28Services: Port FileOperation to LibMainLenny Maiorani
2022-02-28LibCore: Add rmdir system call wrapperLenny Maiorani
2022-02-28Applications: Change static constexpr variables to constexprLenny Maiorani
Function-local `static constexpr` variables can be `constexpr`. This can reduce memory consumption, binary size, and offer additional compiler optimizations.
2022-02-28LibVT: Fix crash from integer overflow in text wrappingMacDue
Fixes #12786
2022-02-27LanguageServers/Cpp: Make find declaration of enums workItamar
2022-02-27LanguageServers/Cpp: Make find declaration for a declaration node workItamar
The CppComprehensionEngine can now find the declaration of a declaration node of type class/namespace/function.
2022-02-27LibCpp: Set end position for the return type node of FunctionType nodesItamar
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-27LanguageServers/Cpp: Make go to declaration of a namespace workItamar
The CppComprehensionEngine can now find the declaration of a reference to a namespace.
2022-02-27Everywhere: Make JSON serialization fallibleIdan Horowitz
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.
2022-02-27Utilities: Port pathchk to LibMainMichał Lach
2022-02-27Spreadsheet: Add sumProduct(If) functionsu9g
2022-02-27Spreadsheet: Add max(If)/min(If) function for rangesu9g
2022-02-27Spreadsheet: Add Range(s).first() functionsu9g
2022-02-26TextEditor: Save wrapping mode settingsthankyouverycool
2022-02-26TextEditor: Add missing syntax Alt-menu shortcutsthankyouverycool
2022-02-26LibGUI: Set Editors to wrap at words when MultiLinethankyouverycool
And default to NoWrap when they are type SingleLine.
2022-02-27LibLine: Update inline search cursor after kill_line (^U) commandNícolas F. R. A. Prado
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.
2022-02-26Utilities+Meta: Check icons in markdown-checkkleines Filmröllchen
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.
2022-02-26Utilities: Check help:// manpage links in markdown-checkkleines Filmröllchen
2022-02-26Utilities: Perform most markdown-check link checking with URLskleines Filmröllchen
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.
2022-02-26Utilities: Allow link checking in markdown-check to fail during visitkleines Filmröllchen
With a special flag, we can now invalidate the links early on.
2022-02-26Utilities: Partially revert 9ec2b37kleines Filmröllchen
This removed checks for missing manpages, which we now need again as the manpages are checked again.
2022-02-26LibMain: Update header includesLenny Maiorani
2022-02-26LibCrypto: Simplify and move CRC32 table to cpp fileLenny Maiorani
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[]`.
2022-02-26LibAudio: Add an array conversion transitional API to Bufferkleines Filmröllchen
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 :^)