Commit graph

32016 commits

Author SHA1 Message Date
Andreas Kling ad6694d0db Meta: Update year range in LICENSE :^) 2022-01-02 18:08:02 +01:00
Lucas CHOLLET 4d557a4b81 rm: Check before removing '/'
A simple check to not erase '/' by mistake.
2022-01-02 17:37:35 +01:00
Sam Atkins 416033a660 LibWeb: Support range syntax for media queries
This means you can now do queries like:

```css
@media (400px <= width < 800px) { }
```

Chromium and Firefox which I tested with both don't support this yet, so
that's cool. :^)
2022-01-02 15:43:51 +01:00
Sam Atkins c3bf9e5b79 LibWeb: Rewrite media-query parsing to match spec grammar
Past me decided that the grammar was overly verbose and I could do it
better myself. Which seemed fine until the spec changed and I didn't
know how to integrate the changes. Lesson learned! :^)

Rather than have a function for every single part of the grammar, I have
written some as lambdas, and combned `<media-condition>` and
`<media-condition-without-or>` into one function. But otherwise it's
close to the spec, with comments listing the part of the grammar being
parsed, so hopefully it will be easier to make future adjustments!

This does not add any new functionality.
2022-01-02 15:43:51 +01:00
Sam Atkins b6fe7cc324 LibWeb: Make MediaCondition a top-level type and add factory methods 2022-01-02 15:43:51 +01:00
Sam Atkins ae4f0000c8 LibWeb: Make MediaFeature a top-level class and add factory methods
Web::CSS::MediaQuery::MediaFeature::Type was getting a bit ridiculous!
Also, this moves the detection of "min-" and "max-" media-features into
the MediaFeature itself, since this is an implementation detail, not
part of the spec.
2022-01-02 15:43:51 +01:00
Sam Atkins d470e7e817 LibWeb: Remove media-query-related identifiers from identifiers.json
Having these in here was a hack to support the other hack of making
media-queries use StyleValues. Now they don't do that, so we can remove
these again and keep things hygienic.
2022-01-02 15:43:51 +01:00
Sam Atkins 6299d68e45 LibWeb: Introduce MediaFeatureValue type for use in media queries
Previously, we were using StyleValues for this, which was a bit of a
hack and was brittle, breaking when I modified how custom properties
were parsed. This is better and also lets us limit the kinds of value
that can be used here, to match the spec.
2022-01-02 15:43:51 +01:00
Sam Atkins 0a8e289f37 LibWeb: Update <general-enclosed> definition to match spec change
See https://github.com/w3c/csswg-drafts/pull/6799
2022-01-02 15:43:51 +01:00
Lucas CHOLLET 7532ef78ad Calculator: Round small number to prevent crash
Small numbers (smaller than 1e-19) can't be displayed in the calculator.
They provoke a division by zero in Keypad::set_value(), as 10^20
overflows.
2022-01-02 15:42:13 +01:00
Lucas CHOLLET 939bf3e864 Calculator: Remove KeypadValue::operator>
This method was declared but not implemented, and will probably never be
useful.
2022-01-02 15:42:13 +01:00
Lucas CHOLLET eb8df0ae2a Calculator: Display zero with only one character
This patch prevents zero to be displayed as "0.00". The value is now
always printed with only one character.
2022-01-02 15:42:13 +01:00
Filiph Sandström ec28af0aef DisplaySettings: Add 1440p ultrawide resolution 2022-01-02 13:27:02 +01:00
James Puleo 5b164e9934 AK: Include utility from the STD if we aren't replacing STD
If we didn't define our own `move` and `forward` and inject it into the
`std` namespace, then we would error just after trying to `using` those,
if no one has included it before. Now, we will include `utility` from
the STD if we aren't replacing the `std`.
2022-01-02 12:05:12 +01:00
Lady Gegga fae7301ffc Base: Add Phoenician characters to font Katica Regular 10
10900-1091F https://www.unicode.org/charts/PDF/U10900.pdf
2022-01-02 09:43:44 +00:00
mjz19910 cd7b50a074 uptime: Port to LibMain :^) 2022-01-02 09:42:56 +00:00
sin-ack db36bdfeb7 Tests: Add floor and ceil tests to test-math
Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
2022-01-02 12:44:31 +03:30
sin-ack d8ee3839e4 LibM: Count fractions when exponent < -1 with mantissa == 0
Without this change, floor(-0.125) returned 0.
This is because the number has a fraction part even if mantissa is zero
while the unbiased exponent is negative.

The names of some variables were also made clearer.

Co-Authored-By: Daniel Bertalan <dani@danielbertalan.dev>
2022-01-02 12:44:31 +03:30
Jesse Buhagiar 2de7f2021d LibC: Support X modifier for scanf
This was currently crashing Half-Life because it was a considered an
"Unknown" specifier. We can use the same case statement as the regular
hex format conversion (lower case 'x'), as the backend
to convert the number already supports upper/lower case input, hence
we get it for free :^)
2022-01-02 08:10:08 +02:00
Filiph Sandström 022b4a3ed3 ThemeEditor: Add "alignment" support 2022-01-01 22:51:53 +01:00
Filiph Sandström 35dac843b4 Theming: Add alignment section
This commit removes the IsTitleCenter property and replaces it with
the TitleAlignment property that supports "Left", "Right" & "Center".
2022-01-01 22:51:53 +01:00
Tom 2bb32a87f9 Meta: Rename SERINITY_NVME_ENABLE variable to SERENITY_NVME_ENABLE 2022-01-01 21:05:44 +00:00
Tom d1e7b69004 Kernel: Fix NVMe register access
We need to use the volatile keyword when mapping the device registers,
or the compiler may optimize access, which lead to this QEMU error:

pci_nvme_ub_mmiord_toosmall in nvme_mmio_read: MMIO read smaller than
32-bits, offset=0x0
2022-01-01 21:05:44 +00:00
Filiph Sandström c4b78bee45 LibGfx: Remove VERIFY in draw_rect_with_thickness
draw_line with thickness already supports scaling so that verify isn't
needed anymore. This fixes a scaling chrash introduced in 8a1d77f.
2022-01-01 20:30:09 +00:00
Liav A 4abc2f669a Ports: Add pfetch utility
This is a nice and small utility that prints system info based on POSIX
interfaces only.
2022-01-01 17:35:17 +00:00
Xavier Defrang b17fef5133 mkdir: Use FilePermissionsMask to handle mode option 2022-01-01 17:33:43 +00:00
Xavier Defrang 005b0f7384 chmod: Use FilePermissionsMask to handle mode argument 2022-01-01 17:33:43 +00:00
Xavier Defrang 8b95423b50 LibCore: Add FilePermissionsMask
This class parses UNIX file permissions definitions in numeric (octal)
or symbolic (ugoa+rwx) format and can apply them on a given file mode.
2022-01-01 17:33:43 +00:00
Michel Hermier 0f729cebf4 LibVideo/VP9: Do not null guard calls to free 2022-01-01 17:30:25 +00:00
circl ad01f6030b Terminal: Add Solarized color schemes
Both dark and light variants
2022-01-01 18:23:50 +01:00
Ben Wiederhake 3013e74d3a LibWeb: Avoid unnecessary copies in StyleInvalidator 2022-01-01 15:40:39 +01:00
Ben Wiederhake 0c365fdfd3 LibJS: Avoid unnecessary copies in MergeBlocks codegen pass 2022-01-01 15:40:39 +01:00
Ben Wiederhake a1aea5b9e0 LibJS: Avoid unnecessary copies in PlaceBlocks codegen pass 2022-01-01 15:40:39 +01:00
Ben Wiederhake 8b8cd18482 HackStudio: Avoid unnecessary copies in CodeComprehensionEngine 2022-01-01 15:40:39 +01:00
Ben Wiederhake 95c21977b4 LookupServer: Avoid unnecessary copies 2022-01-01 15:40:39 +01:00
Ben Wiederhake 182a85c895 LibSQL: Avoid unnecessary copies in Heap 2022-01-01 15:40:39 +01:00
Ben Wiederhake 5c4b2e8447 LibLine: Avoid unnecessary copies in Editor 2022-01-01 15:40:39 +01:00
Ben Wiederhake 13acf603d8 LibGUI: Avoid unnecessary copies in FileIconProvider 2022-01-01 15:40:39 +01:00
Stephan Unverwerth b7c0c32f24 LibSoftGPU: Add option to render a debug overlay
This displays statistics regarding frame timings and number of pixels
rendered.

Timings are based on the time between draw_debug_overlay() invocations.
This measures actual number of frames presented to the user vs. wall
clock time so this also includes everything the app might do besides
rendering.

Triangles are counted after clipping. This number might actually be
higher than the number of triangles coming from LibGL.

Pixels are counted after the initial scissor and coverage test. Pixels
rejected here are not counted. Shaded pixels is the percentage of all
pixels that made it to the shading stage. Blended pixels is the
percentage of shaded pixels that were alpha blended to the color buffer.

Overdraw measures how many pixels were shaded vs. how many pixels the
render target has. e.g. a 640x480 render target has 307200 pixels. If
exactly that many pixels are shaded the overdraw number will read 0%.
614400 shaded pixels will read as an overdraw of 100%.

Sampler calls is simply the number of times sampler.sample_2d() was
called.
2022-01-01 15:09:21 +01:00
Stephan Unverwerth fe36edf6ae LibSoftGPU: Put all constexpr config options into Config.h 2022-01-01 15:09:21 +01:00
circl 4b40d2cc07 chown+chgrp: Add --no-dereference option
This option will change the ownership of the symlink rather than the
file it points to.
2022-01-01 15:08:49 +01:00
circl 63760603f3 Kernel+LibC+LibCore: Add lchown and fchownat functions
This modifies sys$chown to allow specifying whether or not to follow
symlinks and in which directory.

This was then used to implement lchown and fchownat in LibC and LibCore.
2022-01-01 15:08:49 +01:00
Pankaj Raghav 344cfa0db4 Meta: Enable attaching NVMe storage devices to qemu
Add an option to enable NVMe storage device as the boot
drive.

To enable NVMe support, run the following:

$ SERENITY_NVME_ENABLE=1 Meta/serenity.sh run i686 root=/dev/nvme0n1
2022-01-01 14:55:58 +01:00
Pankaj Raghav e99fafb683 Kernel/NVMe: Add initial NVMe driver support
Add a basic NVMe driver support to serenity
based on NVMe spec 1.4.

The driver can support multiple NVMe drives (subsystems).
But in a NVMe drive, the driver can support one controller
with multiple namespaces.

Each core will get a separate NVMe Queue.
As the system lacks MSI support, PIN based interrupts are
used for IO.

Tested the NVMe support by replacing IDE driver
with the NVMe driver :^)
2022-01-01 14:55:58 +01:00
Pankaj Raghav 602b35aa62 Kernel: Add DMA allocate functions that are TRY-able
Add DMA allocate buffer helper functions in MemoryManager.
2022-01-01 14:55:58 +01:00
Filiph Sandström 8489388e75 Themes: Add Cupertino theme
This theme is used to showcase the new features.
2022-01-01 14:54:16 +01:00
Filiph Sandström 8a1d77f65c LibGfx: Add window border/title theming options
This commit adds support the following properties to theming:
Flags:
  - IsTitleCenter: true if the title should be centered.
Metrics:
  - BorderThickness: The border width.
  - BorderRadius: The border corner radius.
2022-01-01 14:54:16 +01:00
Conor Byrne 14b2656107 HackStudio: Use String instead of LexicalPath
LexicalPath is a 'heavier' object than a String that is mainly used for
path parsing and validation, we don't actually need any of that in
GitRepo and its related files, so let's move to String :^)

I've also done some east-const conversion in the files that I was
editing for the string change.
2022-01-01 14:47:23 +01:00
Conor Byrne 4cfc992125 HackStudio: Add new multiline commit dialog
This new commit dialog features multi-line input and a line and column
indicator. A great improvement over the last one, if you ask me! :^)
2022-01-01 14:47:23 +01:00
Conor Byrne e92b6047ad HexEditor: Port HexEditor to LibMain 2022-01-01 14:47:15 +01:00