Commit Graph

52973 Commits

Author SHA1 Message Date
ronak69
e0e027c17c Meta: Remove .gitignore from Base/
Base/.gitignore leaks into serenity's file-system. It can be safely
removed by adding equivalent un-ignore pattern in top-level .gitignore.
2023-08-04 13:15:24 +02:00
Fabian Neundorf
413e212ea8 Piano: Cache buffers in Track and WaveWidget
The Track itself caches the Samples after each processing step which
allows it to be queried without the need to process it every time.

This result is queried by the WaveWidget which then caches the result to
prevent unnecessary heap allocations every paint event.
2023-08-04 12:56:27 +02:00
Fabian Neundorf
885e35e92c Piano: Use Sample struct from LibDSP
Removes the Sample struct inside Piano and replaces it with the struct
from LibDSP.

It automatically scales the height of the wave depending on the maximum
amplitude, as the Samples now contain floats and not integers.
2023-08-04 12:56:27 +02:00
Aliaksandr Kalenik
0019b901a0 LibWeb: Remove hardcoded span = 2 while sizing spanning items in GFC 2023-08-04 12:41:11 +02:00
Andreas Kling
a6e08e85d2 Meta: Update maintainer section in CONTRIBUTING.md 2023-08-04 12:37:44 +02:00
Andreas Kling
67c60aa009 Meta: Prune CODEOWNERS file 2023-08-04 12:32:13 +02:00
Torstennator
5e6f5a524a PixelPaint: New submenu for masking actions
This patch moves the mask related menu actions into a submenu in order
to keep the menu more clear.
2023-08-04 12:11:13 +02:00
Torstennator
d8320d0a14 WindowServer: Fix menu height when invisible items are involved
This patch checks for visible items to determine the menu height. Now
the last visible item is used to determine the height of the menu.
Before this patch that menu height could be wrong e.g. if the last item
was not visible.
2023-08-04 12:11:13 +02:00
Torstennator
8c681a1603 PixelPaint: Add color-masking for editing masks
This patch adds the ability to refine a editing mask by a color-range
based on the pixels of the content image. This is useful for image
editing where mask restirction via luminosity might not fit or just
certain color ranges should be edited.
2023-08-04 12:11:13 +02:00
Torstennator
df4904f61d PixelPaint: Use editing masks in filter gallery
With this change the image modifications of a filter is only applied to
regions of the image where a editing mask is defined. If no editing
mask is defined the filter modifications are applied to the whole
image.
2023-08-04 12:11:13 +02:00
Torstennator
dbbf54df2c PixelPaint: Add luminosity masking for editing masks
This adds a function where editing masks can be refined by selecting
a luminosity range that is applied to the content image and mapped to
the editing mask. This function allows the editing of image regions
that match only certain luminosity values.
2023-08-04 12:11:13 +02:00
Torstennator
660d6f171c PixelPaint: Add function to visualize editing-masks
This patch adds a function to make the editing-eask visible while
beeing in mask-mode so that the user can see which parts are covered
by the masks and can therefore be modified by other tools that support
editing masks.
2023-08-04 12:11:13 +02:00
Torstennator
69650a5812 LibGUI: Add new RangeSlider widget
A new widget that allows the selection of a range between a defined min
and max value.
2023-08-04 12:11:13 +02:00
Ali Mohammad Pur
da7bf5f785 Shell: Add support for the '!' POSIX pipeline prefix
This prefix simply inverts the exit code of the pipeline, which we
implement using the 'not' builtin.
2023-08-04 13:28:59 +03:30
Ali Mohammad Pur
b6d7c5fb0e Shell: Correctly track nested expansions in POSIX mode
Previously any expansion closing sequence would've caused the entire
expansion chain to be terminated, fix this by keeping track of active
expansions and running the parser in 'skip' mode.

Fixes #19110.
2023-08-04 13:28:59 +03:30
Karol Kosek
d1f98108a9 Meta: Add ImageFormats/JPEGWriter.cpp to gn build 2023-08-04 11:05:55 +02:00
Karol Kosek
68ef7dba70 LibWeb: Add support for encoding Canvas to JPEG 2023-08-04 11:05:55 +02:00
Karol Kosek
b731705fec LibWeb: Implement HTMLCanvasElement.toBlob() 2023-08-04 11:05:55 +02:00
Karol Kosek
3239f0fb7b LibWeb: Implement HTMLCanvasElement.toDataURL() closer to spec
- Requesting an unsupported image type will now fallback to PNG
  (which is now always the case),
- Errors should return 'data:,' instead of empty string,
- Added spec comments
2023-08-04 11:05:55 +02:00
Jelle Raaijmakers
55af4addc8 CI: Disable aarch64 tests
For some reason, the tests are flaky for the aarch64 architecture when
running on a CI runner. This causes a lot of unnecessary red crosses for
PRs and since the test outcome doesn't seem to be too trustworthy, we
are better off not running these tests for now.
2023-08-04 10:27:03 +02:00
Andreas Kling
b6d9b3e886 Meta: Update maintainer list in CONTRIBUTING.md 2023-08-04 09:59:09 +02:00
Zaggy1024
a112e2f8c5 LibAudio: Add a seek point at the first sample in MP3Loader
A previous commit made it so that SeekTable doesn't provide a seek
point from `seek_point_before()` if there is not a seek point before
the requested sample index. However, MP3Loader was only setting a seek
point after the first 10 frames, meaning that it would do nothing when
seeking back to 0.

To fix this, add a seek point at byte 0 for the first sample, so that
`seek_point_before()` will never fail.
2023-08-04 08:53:19 +01:00
Andreas Kling
cf9565551a LibWeb: Don't filter CSS rules into separate list based on @namespace
Instead, perform the filtering for each rule as we go. This avoids
creating a separate list of rules, which was ~5% of runtime when
mousing around on the Discord web interface.
2023-08-04 05:28:41 +02:00
Andreas Kling
bb39ca9b4a LibWeb: Add fast_is<SVGGraphicsElement>()
This dynamic_cast was ~6% of runtime when mousing around on Discord.
2023-08-04 05:28:41 +02:00
Andreas Kling
37a618b7ad LibWeb: Add missing visit in CSSStyleSheet::visit_edges()
Gotta visit m_default_namespace_rule.
2023-08-04 05:28:41 +02:00
Tim Ledbetter
d0fd925126 watch: Use alternate buffer to display output 2023-08-04 05:25:44 +02:00
Tim Ledbetter
ba1c4bc1d1 watch: Use stdout rather than stderr to display output
Previously, the header was printed to stderr.

This matches the behavior of watch on Linux.
2023-08-04 05:25:44 +02:00
Tim Ledbetter
2f3c41e033 watch: Replace LibC function calls with their LibCore equivalents 2023-08-04 05:25:44 +02:00
Bastiaan van der Plaat
958c79da64 LibWeb: Don't clear clip rect history but restore previous state 2023-08-03 20:08:53 +01:00
Bastiaan van der Plaat
9469531100 LibWeb: Convert text_indent css pixels to device pixels 2023-08-03 20:08:53 +01:00
Bastiaan van der Plaat
148d74b103 LibWeb: Use CSS text-indent property on input type="submit" elements 2023-08-03 20:08:53 +01:00
Sebastian Zaha
a89e95f57c Meta: Port GCC compile option from cmake to gn
The GCC build is extremely noisy without -Wno-literal-suffix. (Tested on
 GCC12)
2023-08-03 09:52:54 -06:00
Aliaksandr Kalenik
1e953f2acc LibWeb: Reset planned_increase while distributing space to "fr" tracks
Fixes bug when planned_increase is not reset after adding it to
base_size.
2023-08-03 17:05:57 +02:00
Sergey Bugaev
f0a5276063 LibWebView: Create BGRA bitmaps instead of BGRx
This helps the GTK version of Ladybird to import them into the GTK
rendering machinery, since GdkMemoryFormat supports BGRA and BGR, but
not BGRx.
2023-08-03 15:49:47 +01:00
MacDue
abd53a8719 Ladybird: Use AK::Url rather than prefix list to check if URL is valid
If a URL is not valid we try navigating to https:// + the url. It's
better to ask AK::Url if it thinks the url is valid than put a big list
of prefixes here, with this obscure protocols like Gemini are now
recognised and with `--enable-lagom-networking` can be viewed in
Ladybird (thanks to #2218).
2023-08-03 15:02:47 +02:00
Niklas Poslovski
6ea4be36b5 LibCore: Fallback to fstat() on systems without d_type support 2023-08-03 12:25:07 +01:00
Andreas Kling
4011a107a4 LibWeb: Propagate overflow modes from <html> or <body> to viewport
This patch implements "Overflow Viewport Propagation" from CSS-OVERFLOW.
It fixes an issue where many websites were not scrollable because they
had `overflow: scroll` on the body element and we didn't propagate it.
2023-08-03 13:21:26 +02:00
Andreas Kling
09eed8eea2 LibWeb+headless-browser: Include paint tree in layout test output
This will give us a more comprehensive look at what actually gets
rendered in the end, and also allows us to catch more behavior changes.
2023-08-03 13:21:26 +02:00
Andrew Kaster
7d7c419ce6 Ladybird: Add WebSocket server for use by Lagom networking
Hide its use behind the same flag as RequestServer in WebContent.
2023-08-03 09:55:20 +02:00
Andrew Kaster
dd694215bc LibWebView+LibProtocol: Allow app to pass custom WebSocketClients 2023-08-03 09:55:20 +02:00
Andrew Kaster
a1e5a6ac40 Ladybird: Remove Qt dependency from RequestServer
This requires two parts: Core::System::current_executable_path(), and
passing the serenity-resource-root as an argument to the process.
2023-08-03 09:55:20 +02:00
Andrew Kaster
bb831a27dd LibCore: Add Core::System::current_executable_path()
This is based on Jakt::File::current_executable_path() and all the other
sources I looked at to figure out the per-platform way to do this. My
goodness, every platform has its own bespoke way.
2023-08-03 09:55:20 +02:00
Andrew Kaster
88ccaae11e Ladybird: Rename classes ending with Ladybird
Now that all the classes for Ladybird are in the Ladybird namespace, we
don't need them named as Ladybird::FooBarLadybird. For the Qt-specific
classes, we can tack on a Qt at the end for clarity, but FontPlugin and
ImageCodecPlugin no longer have anything to do with Qt.
2023-08-03 09:55:20 +02:00
Andrew Kaster
506b03740c Ladybird: Move classes and types into the Ladybird namespace
We were super inconsistent about this, with most "new" classes living in
the Ladybird namespace, while "old" ones were in the global namespace,
or even sitting in the Browser namespace.
2023-08-03 09:55:20 +02:00
Sam Atkins
73fa58da34 LibWeb: Implement the CSS outline-offset property
This allows you to push the outline a certain distance away from the
border (or inside it, if the offset is negative).
2023-08-03 05:25:48 +02:00
Sam Atkins
fe7e797483 LibWeb: Implement the CSS outline property :^)
...along with `outline-color`, `outline-style`, and `outline-width`.

This re-uses the existing border-painting code, which seems to work well
enough!

This replaces the previous code for drawing focus-outlines, with generic
outline painting for any elements that want it. Focus outlines are now
instead supported by this code in Default.css:

```css
:focus-visible {
    outline: auto;
}
```
2023-08-03 05:25:48 +02:00
Sam Atkins
5640779838 LibWeb: Allow single-value shorthand properties to parse as CompositeSV
Don't give up if we can't parse that single value for the property
directly, but let the parsing code carry on and see if we can produce a
CompositeStyleValue.
2023-08-03 05:25:48 +02:00
Sam Atkins
d98bc0da87 LibWeb: Make it clearer that several line-styles are not implemented 2023-08-03 05:25:48 +02:00
Sam Atkins
14e6bae593 LibWeb: Implement the :focus-visible pseudo-class
This is very naive for now, and matches whenever `:focus` does.
2023-08-03 05:25:48 +02:00
Sam Atkins
8520afaa11 LibWeb: Rename PaintPhase::FocusOutline -> Outline
Any element can have an outline, whether because of focus or not.
2023-08-03 05:25:48 +02:00