Commit graph

4036 commits

Author SHA1 Message Date
Timothy Flynn
4eb4b06688 LibUnicode: Do not replace underscores in property names
Originally, this was done to make the generated enums look more like the
rest of Serenity's enums. But for Unicode property escapes, LibUnicode
will need to compare property names from a RegExp.prototype object to
these parsed property names, which will be easier without this
modification.
2021-07-30 21:26:31 +01:00
Timothy Flynn
5d09a00189 LibUnicode: Generate PropList enumeration as a bitmask
Rather than generating the PropList as a list of enums, generate it as
a bitmask. Not only will this be better for runtime property searching,
this will allow parsing of the DerivedCoreProperties list more easily.
2021-07-30 21:26:31 +01:00
Linus Groh
116c45d668 LibJS: Take prepare_temporal_fields() Vector arguments by const& 2021-07-30 20:52:39 +01:00
Linus Groh
4d0f849654 LibJS: Replace TypeError with RangeError in GetOffsetNanosecondsFor
Also fix "a integral number" => "an integral number".
2021-07-30 19:53:25 +01:00
Luke
f5d4de8b66 LibC: Stub mlock in sys/mman
mlock is supposed to prevent memory from being paged out to swap, which
we don't have currently.

Required by OpenSSL.
2021-07-30 20:49:56 +02:00
Martin Blicha
add3a02ddd LibChess: Fix hashing of the chess board
The hash function should take the board by reference, not by value.
Also, the fact whether black can castle kingside or not was included
twice in the hash, unnecesarily.
2021-07-30 20:49:18 +02:00
FrHun
c88756078a LibGfx: Refactor Point.constrain to use AK 2021-07-30 13:21:27 +02:00
FrHun
cc829ed9d2 LibGui: Add bounding of rubber band to IconView
This ensures the selection rubber band in icon views stays within the
visible area.
2021-07-30 13:21:27 +02:00
Linus Groh
e7c5c3d507 LibJS: Implement Temporal.PlainTime.prototype.getISOFields() 2021-07-30 09:41:11 +01:00
Linus Groh
c7bef42975 LibJS: Implement Temporal.PlainDate.prototype.getISOFields() 2021-07-30 09:41:11 +01:00
Karol Kosek
c126ffa9b8 LibGfx: Use correct variable size on bitmap to buffer convertion
The issue was that size_in_bytes() returns size_t, but the buffer used
a size of the unsigned for itself, which only matched on 32-bit
systems and caused an assert error otherwise.

This fixes a crash on drag in FileManager on non 32-bit systems!
2021-07-30 10:14:07 +02:00
Idan Horowitz
d1ee31c5de LibJS: Implement Temporal.PlainTime.prototype.toPlainDateTime 2021-07-29 22:47:56 +01:00
Idan Horowitz
8f9b4a5ea6 LibJS: Implement Temporal.PlainDateTime.prototype.inLeapYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
b9ed19c850 LibJS: Implement Temporal.PlainDateTime.prototype.monthsInYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
fb5c0ed0d0 LibJS: Implement Temporal.PlainDateTime.prototype.daysInYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
2d86cbae45 LibJS: Implement Temporal.PlainDateTime.prototype.daysInMonth 2021-07-29 22:47:56 +01:00
Idan Horowitz
01d33174c8 LibJS: Implement Temporal.PlainDateTime.prototype.daysInWeek 2021-07-29 22:47:56 +01:00
Idan Horowitz
d4e9d572f5 LibJS: Implement Temporal.PlainDateTime.prototype.weekOfYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
0800c2a958 LibJS: Implement Temporal.PlainDateTime.prototype.dayOfYear 2021-07-29 22:47:56 +01:00
Idan Horowitz
c41b7b27c9 LibJS: Implement Temporal.PlainDateTime.prototype.dayOfWeek 2021-07-29 22:47:56 +01:00
Idan Horowitz
518a9f3eab LibJS: Implement Temporal.PlainDateTime.prototype.nanosecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
23bf840326 LibJS: Implement Temporal.PlainDateTime.prototype.microsecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
b2f66a06ac LibJS: Implement Temporal.PlainDateTime.prototype.millisecond 2021-07-29 22:47:56 +01:00
Idan Horowitz
3fdb314a39 LibJS: Implement Temporal.PlainDateTime.prototype.second 2021-07-29 22:47:56 +01:00
Idan Horowitz
6dd0815fad LibJS: Implement Temporal.PlainDateTime.prototype.minute 2021-07-29 22:47:56 +01:00
Idan Horowitz
f553ab3104 LibJS: Implement Temporal.PlainDateTime.prototype.hour 2021-07-29 22:47:56 +01:00
Idan Horowitz
f93b6ea58c LibJS: Implement Temporal.PlainDateTime.prototype.day 2021-07-29 22:47:56 +01:00
Idan Horowitz
677a631e87 LibJS: Implement Temporal.PlainDateTime.prototype.monthCode 2021-07-29 22:47:56 +01:00
Idan Horowitz
78e63b34fa LibJS: Implement Temporal.PlainDateTime.prototype.month 2021-07-29 22:47:56 +01:00
Idan Horowitz
23d0fd2659 LibJS: Implement Temporal.PlainDateTime.prototype.year 2021-07-29 22:47:56 +01:00
sin-ack
667124dc22 LibGUI: Do not wrap text in statusbar segments
This commit adds a new property to Label which allows one to enable or
disable text wrapping. Statusbar now uses this property to disable text
wrapping in its segments, since text wrapping in statusbars doesn't make
sense.
2021-07-29 22:33:34 +01:00
sin-ack
1e44a0c2d9 LibCore: Support registration of TextWrapping properties
This is basically a named boolean.
2021-07-29 22:33:34 +01:00
Andrew Kaster
38707f4a20 LibUnicode: Make unicode data generation logic more relocatable
The previous logic had several checks for Lagom directories and
subdirectories. All we really want to do for these header checks is make
sure that the files end up in an included folder prefixed with
LibUnicode. We also don't need to hard code the path to the generator,
the $<TARGET_FILES> generator expression can create the path for us.
2021-07-29 21:46:25 +01:00
Andrew Kaster
de2bf3f333 Meta/LibTest: Build object libraries for test main files
By using the power of object libraries and $<TARGET_OBJECTS> we can make
sure to only build TestMain.cpp and JavaScriptTestRunnerMain.cpp once.

Previously we built these cpp files into object files once for every
single test executable. This change reduces the number of total compile
jobs in a Serenity target build by around 100.
2021-07-29 21:46:25 +01:00
Andrew Kaster
af9be6e093 LibTTF/LibGfx: Remove circular dependency by merging LibTTF into LibGfx
LibTTF has a concrete dependency on LibGfx for things like Gfx::Bitmap,
and LibGfx has a concrete dependency in the TTF::Font class in
Gfx::FontDatabase. This circular dependency works fine for Serenity and
Lagom Linux builds of the two libraries. It also works fine for static
library builds on Lagom macOS builds.

However, future changes will make Lagom use shared libraries, and
circular library dependencies are not tolerated in macOS.
2021-07-29 21:46:25 +01:00
Luke
e3b588a43d Kernel+LibC: Add linger to sys/sockets.h
Also adds SO_BROADCAST in UnixTypes.h to match sys/sockets.h.
Required by bash 5.1.8.
2021-07-29 19:35:03 +01:00
Andreas Kling
efa9627fc4 LibWeb: Remove unused enum value CSS::StyleValue::Position
CSS position values are just basic identifiers, they don't require
a custom StyleValue type.
2021-07-29 15:01:47 +02:00
Conor Byrne
2b5566d7cc LibGUI+Playground: Move GMLAutocompleteProvider to LibGUI 2021-07-29 11:33:16 +02:00
Tobias Christiansen
4c17f389db LibWeb: Add proper support for text-decoration-line property values
The code handling the rendering of the text-decoration-line got moved
into its own function to reduce clutter.
The CSS property text-decoration-line now supports underline, overline
and line-through.
2021-07-29 11:07:56 +02:00
LuK1337
ba119029dd LibGUI: Allow to specify FilePicker window position 2021-07-29 09:24:08 +02:00
LuK1337
84ee95c346 LibGUI: Allow to specify position on screen for Dialog window
This change allows us to specify where on screen we'd like the Dialog
window to be drawn. By default it's set to CenterWithinParent which
may fall back to Center if parent window is unset or not visible on
screen.
2021-07-29 09:24:08 +02:00
Peter Elliott
5d6bf83374 LibCore: Prevent LockFile fd from leaking into child process
Fixes #9059
2021-07-29 07:58:17 +02:00
K-Adam
15cdb702c2 LibWeb: Handle comment blocks when skipping unknown @-rules
This css definition was parsed incorrectly before:

```css
@media screen {
    /* Unclosed bracket in comment { */
    body {
        background: red;
    }
}
```
2021-07-29 01:24:03 +02:00
Linus Groh
4e4d8d6905 LibJS: Reflect infallibility editorial changes in the Temporal spec
See:

- https://github.com/tc39/proposal-temporal/commit/3c0671f
- https://github.com/tc39/proposal-temporal/commit/fe28b86
2021-07-28 23:48:56 +01:00
SeekingBlues
a13a5315a5 LibWeb: Fix incompatibility of attribute "contenteditable"
The previous behavior of mapping a missing value to the "inherit"
state is incompatible. Now, a missing value maps to the "true" state,
which is the expected behavior.
2021-07-28 23:47:58 +02:00
Timothy Flynn
c4bfda7f7f LibUnicode: Handle code points that are both cased and case-ignorable
Apparently, some code points fit both categories, for example U+0345
(COMBINING GREEK YPOGEGRAMMENI). Handle this fact when determining if
a code point is a final code point in a string.
2021-07-28 23:42:29 +02:00
Timothy Flynn
dff156b7c6 LibUnicode: Reduce Unicode data generator boilerplate
There's a fair amount of boilerplate when e.g. adding a new UCD file to
parse or a new enumeration to generate. Reduce the overhead by adding
helper lambdas. Also adds a couple missing spec links with UCD field
information.
2021-07-28 23:42:29 +02:00
Timothy Flynn
7827aede6f LibUnicode: Check word break when deciding on case-ignorable code points 2021-07-28 23:42:29 +02:00
Timothy Flynn
12fb3ae033 LibUnicode: Download and parse the word break property list UCD file
Note that unlike the main property list, each code point has only one
word break property. Code points that do not have a word break property
are to be assigned the property "Other".
2021-07-28 23:42:29 +02:00
Timothy Flynn
c45a014645 LibUnicode: Check property list when deciding if a code point is cased 2021-07-28 23:42:29 +02:00