summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-18LibWeb: Add SVGFormattingContext to handle SVG box treesAndreas Kling
Instead of trying to layout SVG boxes as if they are regular CSS boxes, let's invent an "SVG formatting context" and let it manage SVG boxes. To facilitate this, Layout::SVGBox no longer inherits from ReplacedBox, and is instead a simple, "inline-block" style BlockBox.
2021-09-18LibWeb: Make SVG boxes red in layout tree dumpsAndreas Kling
2021-09-17LibC: Implement towctransTim Schumacher
2021-09-17LibC: Implement iswctypeTim Schumacher
2021-09-17LibC: Implement wctransTim Schumacher
2021-09-17LibC: Implement wctypeTim Schumacher
2021-09-17LibC: Change wctrans_t to be a long instead of int*Tim Schumacher
The POSIX manpage just says that wctrans_t should be "a scalar type that can hold values which represent locale-specific character mappings", and doing switch statements with ints is much more pleasant than with pointers.
2021-09-17LibWeb: Flexbox: Take parent's width in the flex container for layoutingTobias Christiansen
If our parent in the FlexFormattingContext also was a flex-container, we didn't give our children any meaningful width to play with into layout_inside(), which resulted in way too narrow layouting. Now the width of the parent gets borrowed if the own width isn't specified.
2021-09-17LibGfx: Don't crash on request to draw impossible circle segmentTobias Christiansen
The previous VERIFY_NOT_REACHED() could be reached when there were equal coodinates. This could be the case for a small radius which lead to rounding making the two coordinates equal.
2021-09-17Magnifier: Add 8x magnification and pausingMarcus Nilsson
This adds an option for even more magnification, when you really need to count pixels, as well as pausing the capture by pressing Space and switching between magnification levels with keys 2, 4 & 8.
2021-09-17LibJS: Convert Now AOs to ThrowCompletionOrLinus Groh
2021-09-17LibJS: Convert PlainDateTime AOs to ThrowCompletionOrLinus Groh
2021-09-17LibJS: Convert PlainDate AOs to ThrowCompletionOrLinus Groh
2021-09-18LibGfx: Implement cubic bezier curves by splitting them to subcurvesAli Mohammad Pur
This makes them significantly more nicer-looking, and fixes a FIXME :^)
2021-09-18LibGfx: Switch Painter.{h,cpp} to use east-constAli Mohammad Pur
2021-09-18LibWeb: Use Gfx::AntiAliasingPainter to draw SVG pathsAli Mohammad Pur
This is still quite bad, but it's much more pleasing to look at when drawing random SVGs :^)
2021-09-18LibGfx: Start a very basic anti-aliased Painter implementationAli Mohammad Pur
This can currently draw AA lines (and by proxy, AA paths), and passes all its output through a 2D affine transform to an underlying Gfx::Painter.
2021-09-17LibWeb: Replace hard-coded defaults in Node::apply_style()Sam Atkins
This now uses the values in `InitialValues`, which is not ideal, but it's better to have our defaults defined in two places, than in 3. The default for `border-colors` is `currentcolor`, so we shortcut that here and just grab the value of the `color` property. As noted, this is not perfect, but it's somewhat better.
2021-09-17LibWeb: Use initial values from Properties.json inside CSS ParserSam Atkins
This replaces several hard-coded initial values, with use of `property_initial_value()`.
2021-09-17LibWeb: Correct some initial values and add missing onesSam Atkins
- The `text-decoration-foo` values now match the spec. - Added values for `border-foo` since those are needed soon. - Make `color`'s initial value be `-libweb-palette-base-text`.
2021-09-17LibWeb: Add some more CSS identifiersSam Atkins
These are used by the "initial" values in Properties.json
2021-09-17LibWeb: Generate shorthand initial values after their longhandsSam Atkins
When parsing shorthand values, we'd like to use `property_initial_value()` to get their longhand property values, instead of hard-coding them as we currently do. That involves recursively calling that function while the `initial_values` map is being initialized, which causes problems because the shorthands appear alphabetically before their longhand components, so the longhands aren't initialized yet! The solution here is to perform 2 passes when generating the code, outputting properties without "longhands" first, and the rest after. This could potentially cause issues when shorthands have multiple levels, in particular `border` -> `border-color` -> `border-left-color`. But, we do not currently define a default value for `border`, and `border-color` takes only a single value, so it's fine for now. :^)
2021-09-17LibWeb: Stop treating EOF as a valid part of an identifierSam Atkins
This was specifically causing the string "0" to be parsed as an invalid Dimension token with no units, instead of as a Number. That then caused out generated `property_initial_value()` function to fail for those values.
2021-09-17LibWeb: Make "currentcolor" lowercase in Properties.jsonSam Atkins
It's technically case-insensitive, but the spec always defines it as "currentcolor" so it feels wrong to capitalise it differently there.
2021-09-17LibWeb: Persuade CSS Parser that idents like `currentcolor` are colorsSam Atkins
Shorthand properties were only checking for `ColorStyleValue`s, which excludes identifier colors. Now they accept them too, including the various `-libweb-foo` colors. :^)
2021-09-17LibWeb: Implement `currentcolor` special valueSam Atkins
The `currentcolor` identifier represents the current value of the `color` property. This is the default value for `border-color` and `text-decoration-color`, and is generally useful to have. :^)
2021-09-17LibWeb: Make StyleValue::to_color() take a Node instead of the DocumentSam Atkins
This is in preparation for the `currentcolor` value, which needs to know what Node it's on so it can check the `color`.
2021-09-17SystemMonitor: Make process memory statistics more human readableJulian Offenhäuser
These are the only instances in SystemMonitor which still show memory statistics in KiB only. They will now adapt to the input size better.
2021-09-17Utilities: Add a basic `diff` utilityMustafa Quraish
2021-09-17LibDiff: Add new API to generate hunks from two pieces of textMustafa Quraish
For now this is just a standard implementation of the longest common subsequence algorithm over the lines, except that it doesn't do any coalescing of the lines. This isn't really ideal since we get a single Hunk per changed line, and is definitely something to improve in the future.
2021-09-17AK/Vector: Add `Vector::reverse()` methodMustafa Quraish
This reverses the contents of the vector in-place.
2021-09-17Kernel: Don't link Prekernel against kernel_heapNico Weber
This was added in b5c98ede084e5d29, but it looks like a copy-paste mistake from Kernel/CMakeLists.txt. Unbreaks building for aarch64.
2021-09-17LibJS: Increase time between garbage collectionsAndreas Kling
This patch ups the max number of heap allocations between each GC from 10'000 to 100'000. This is still relatively aggressive but already does a good job of cutting down on time spent in GC.
2021-09-17LibWeb: Don't request WebContent repaint while we have repaints pendingAndreas Kling
This prevents flickering by ensuring that WebContent is only ever painting into the back buffer bitmap. Without this change, it was possible for WebContent to paint into the front buffer bitmap.
2021-09-17LibWeb: Make a SharedBitmap struct for OOPWV bitmapsAndreas Kling
Instead of having separate members for "bitmap ID" and "bitmap", let's wrap them in a struct.
2021-09-17LibGfx: Avoid invalidation when Path::close() is a no-opAndreas Kling
If the path is already closed, calling close() is a no-op, and we don't need to invalidate the split lines cache.
2021-09-17LibGfx: Make Painter::fill_path() take Path by const referenceAndreas Kling
Taking a mutable reference here made the API look very strange.
2021-09-17LibGfx: Make Path::bounding_box() and Path::split_lines() constAndreas Kling
Use a const_cast internally when segmentizing. As far as clients are concerned, these are const operations.
2021-09-17LibGfx: Move FastBoxBlurFilter to its own .cpp fileAndreas Kling
2021-09-17LibGfx: Don't use unbounded VLA's in FastBoxBlurFilterAndreas Kling
These would cause the stack to overflow when LibWeb tried rendering a CSS box-shadow for a large enough element. Use Vector (with *some* inline capacity for smaller images) to avoid this issue. If these heap allocations turn out to be too much work, we can add something like a persistent scratch buffer cache.
2021-09-17LibWeb: Skip rendering box-shadow blur if we don't have memory for itAndreas Kling
A slight loss in graphical fidelity is better than not rendering the page at all.
2021-09-17LibGfx: Make some coding style fixes to FastBoxBlurFilterAndreas Kling
2021-09-17LibWeb: Make ComputedValues return larger items by const referenceAndreas Kling
2021-09-17LibWeb: Add the IdleDeadline interface from the RequestIdleCallback specAndreas Kling
2021-09-17LibWeb: Add HTML::Task::Source::IdleTaskAndreas Kling
This represents what the spec calls the "idle-task task source".
2021-09-17CI: Add missing `$` to Sonar Cloud build stepsAndrew Kaster
Without the `$` GitHub Actions doesn't do the environment variable replacement and CMake thinks we want a source directory of `./}}`
2021-09-17PixelPaint: Allow selecting a custom aspect ratio for RectangleToolMustafa Quraish
If you enter a custom aspect ratio, and are not holding down shift, the rectangle will be constrained to the entered aspect ratio
2021-09-17PixelPaint: Allow selecting a custom aspect ratio for EllipseToolMustafa Quraish
If you enter a custom aspect ratio, and are not holding down shift, the bounding rect for the ellipse will be constrained to the entered aspect ratio
2021-09-17LibGfx+PixelPaint: Add `Point::end_point_for_aspect_ratio` methodMustafa Quraish
Previously we only had `Point::end_point_for_square_aspect_ratio`, which was convenient for PixelPaint but assumed the aspect ratio was always fixed at 1. This patch replaces it with a new mthod that takes in an arbitrary aspect ratio and computes the end point based off that. There's some explicit casting going on in `Point.cpp` to ensure that the types line up, since we're templating Point based on `T`.`
2021-09-17Meta: Set SERENITY_ARCH if it is not set in debug-kernel.shBrian Gianforcaro
This appears to have regressed recently in commit 783a58dbc.