Commit graph

40895 commits

Author SHA1 Message Date
Xexxa
fcd2a40f2c Base: Add more emoji
💥 - U+1F4A5 COLLISION
🤸 - U+1F938 PERSON CARTWHEELING
🍃 - U+1F343 LEAF FLUTTERING IN WIND
🥙 - U+1F959 STUFFED FLATBREAD
🍝 - U+1F35D SPAGHETTI
🥟 - U+1F95F DUMPLING
🍨 - U+1F368 ICE CREAM
🏥 - U+1F3E5 HOSPITAL
🛞 - U+1F6DE WHEEL
🚁 - U+1F681 HELICOPTER
📅 - U+1F4C5 CALENDAR
📆 - U+1F4C6 TEAR-OFF CALENDAR
🔐 - U+1F510 LOCKED WITH KEY
📡 - U+1F4E1 SATELLITE ANTENNA
🔚 - U+1F51A END ARROW
🔛 - U+1F51B ON! ARROW
🔜 - U+1F51C SOON ARROW
🔝 - U+1F51D TOP ARROW
🔠 - U+1F520 INPUT LATIN UPPERCASE
🔡 - U+1F521 INPUT LATIN LOWERCASE
🔢 - U+1F522 INPUT NUMBERS
🔣 - U+1F523 INPUT SYMBOLS
🔤 - U+1F524 INPUT LATIN LETTERS
🎌 - U+1F38C CROSSED FLAGS
🇦🇿 - U+1F1E6 U+1F1FF FLAG: AZERBAIJAN
🇧🇴 - U+1F1E7 U+1F1F4 FLAG: BOLIVIA
🇧🇹 - U+1F1E7 U+1F1F9 FLAG: BHUTAN
🇧🇼 - U+1F1E7 U+1F1FC FLAG: BOTSWANA
🇫🇲 - U+1F1EB U+1F1F2 FLAG: MICRONESIA
🇬🇭 - U+1F1EC U+1F1ED FLAG: GHANA
🇬🇾 - U+1F1EC U+1F1FE FLAG: GUYANA
🇮🇨 - U+1F1EE U+1F1E8 FLAG: CANARY ISLANDS
🇰🇿 - U+1F1F0 U+1F1FF FLAG: KAZAKHSTAN
🇱🇨 - U+1F1F1 U+1F1E8 FLAG: ST. LUCIA
🇲🇻 - U+1F1F2 U+1F1FB FLAG: MALDIVES
🇲🇼 - U+1F1F2 U+1F1FC FLAG: MALAWI
🇲🇿 - U+1F1F2 U+1F1FF FLAG: MOZAMBIQUE
🇳🇦 - U+1F1F3 U+1F1E6 FLAG: NAMIBIA
🇳🇪 - U+1F1F3 U+1F1EA FLAG: NIGER
🇸🇲 - U+1F1F8 U+1F1F2 FLAG: SAN MARINO
🇹🇱 - U+1F1F9 U+1F1F1 FLAG: TIMOR-LESTE
🇺🇾 - U+1F1FA U+1F1FE FLAG: URUGUAY

...and from Unicode 15:
🪼 - U+1FABC JELLYFISH
🫛 - U+1FADB PEA POD
🪮 - U+1FAAE HAIR PICK
2022-09-10 07:28:35 +01:00
davidot
d4736d17ae LibJS: Allow negative pointers in Value
Also ensure that all a nullptr input gives null object and you don't
accidentally dereference a nullptr.
2022-09-10 00:05:32 +01:00
Jelle Raaijmakers
325263f0e8 LibC: Consume all whitespace in scanf if present in format
We were consuming all whitespace from the format, but not the input
lexer - that was left to the actual format parsing code. It so happened
that we did not account for whitespace with the conversion specifier
'[', causing whitespace to end up in the output variables.

Fix this by always consuming all whitespace and removing the whitespace
logic from the conversion code.
2022-09-09 22:54:25 +01:00
Luke Wilde
875ca2fb68 LibWeb: Set prototype for both TextDecoder and AbortSignal
These were forgotten to be set during the GC heap conversion.
2022-09-09 20:47:43 +02:00
Cr4xy
ac60633694 Keymap: Rename context menu item "Settings" to "Keyboard Settings"
This is a very small change to improve consistency between applet
context menu item names.
2022-09-09 18:59:04 +01:00
networkException
75ac47dbd8 LibWeb: Resolve two document-tree child browsing context count FIXMEs
This patch makes use of helpers implemented for window.length to resolve
two FIXMEs in WindowProxy previously simply assuming no child browsing
contexts :^)
2022-09-09 17:42:30 +01:00
networkException
e377e28fd2 LibWeb: Implement window.length 2022-09-09 17:42:30 +01:00
thankyouverycool
b70e4e9909 Spreadsheet+LibGUI: Set EmojiInputDialog as a CaptureInput modal
This has two advantages: First the picker no longer changes the active
window state of its parent. Visually this is an additional hint that the
dialog is "fragile" and will close on loss of focus. Second, because
it contains a search box, its own input won't be preempted by global
application shortcuts when typing (pending #15129). This is a problem
in apps like PixelPaint which use shortcuts without modifiers.
2022-09-09 11:27:38 -04:00
thankyouverycool
2f6fd56631 LibGUI: Set EmojiInputDialog's FrameShape to "Window" 2022-09-09 11:27:38 -04:00
thankyouverycool
0bcd360266 LibGUI: Add ellipsis to Insert Emoji action
Requires further user input
2022-09-09 11:27:38 -04:00
thankyouverycool
f8e65d24cf LibGUI: Allow blocking CommandPalette/EmojiInput on a per Window basis
Instead of having to negate every focusable widget or textbox, let
windows override all their widgets. These two Dialogs now block
themselves and each other.
2022-09-09 11:27:38 -04:00
Andreas Kling
bfcb4d88cf LibWeb: Treat percentage heights as "auto" if unresolvable
If the containing block has indefinite height, we can't resolve
percentage heights against it. Instead of treating it as 0 by accident,
let's treat it as "auto" on purpose.

This brings back the cheek borders on Acid2.
2022-09-09 15:20:10 +02:00
Andreas Kling
b7d8fbbd70 LibWeb: Update layout in Element.client{Left,Top}
We have to flush any pending layout changes before getting metrics.
2022-09-09 15:20:10 +02:00
Andreas Kling
67b3af8025 LibWeb: Avoid layout in Element.client{Width,Height} if possible
When querying the HTML element (in strict mode) or the BODY element
(in quirks mode), we return the viewport dimensions.

Layout doesn't change the size of the viewport, so we can actually
reorder the steps here and avoid performing layout in some cases.

This removes a bunch of synchronous layouts on pages with reCAPTCHA.
2022-09-09 15:20:10 +02:00
Andreas Kling
3f960781fd LibWeb: Don't collapse vertical margins between floats
Just stack floats at their vertical margin edge instead of letting their
border boxes rub up against each other.
2022-09-09 15:20:10 +02:00
Andreas Kling
524ec95bcd LibWeb: Keep CSS sheets sorted in document tree order
This ensures that style is applied consistently, even if the document
has external CSS resources that don't always arrive in the same order.
2022-09-09 15:20:10 +02:00
Sam Atkins
32c99313a6 AK: Warn when trying to set @foo@ as a SourceGenerator key
I was very confused why I was getting "no key named `foo`" errors, so
hopefully this will save someone that confusion in the future. :^)

(It'll probably be me again...)
2022-09-09 15:18:07 +02:00
Jelle Raaijmakers
9cf329183f Ports: Update Quake III's launcher name
Following what is commonly used on the internet as the game's title,
and making it consistent with Quake II.
2022-09-09 15:15:22 +02:00
Jelle Raaijmakers
39a9ebf4fc Ports: Update launcher path to Quake II
The launcher was not created as a result of the path not being
absolute. Also set a more commonly used title for the launcher.
2022-09-09 15:15:22 +02:00
faxe1008
d91469ebb1 LibGUI: CommandPalette: Fix key event capture for actions
This patch fixes an issue for applications that contain actions without
a modifier (e.g. PixelPaint). Previously when pressing any key bound to
an action while the CommandPalette was visible the action was forwarded
to the parent instead of the CommandPalette.
2022-09-09 15:15:09 +02:00
demostanis
5ff63a9eb0 Base: Update uniq(1) man page 2022-09-09 14:11:52 +01:00
demostanis
847577bea2 uniq: Improve POSIX compliance
Adds -d, -c, -i, -f and -s options.
It differs a little bit from other implementations,
but it does the trick and corresponds to POSIX's description
2022-09-09 14:11:52 +01:00
demostanis
1c5f6003d7 LibCore: Add File::open_file_or_standard_stream() 2022-09-09 14:11:52 +01:00
Diego Iastrubni
b66ceafaba Meta: Download WASM spec tests using CMake
If we have a new CMake version - download the files using CMake
API, instead of external tools.
2022-09-09 10:31:12 +01:00
Diego Iastrubni
629c77440b Meta: Download uncompressed files instead of *.gz
Problem: cmake cannot handle gzip files (see
https://gitlab.kitware.com/cmake/cmake/-/issues/23054 for more
details).

Instead of downloading the compressed (*.gz) USB and PCI ids,
we not download the raw uncompressed files. The sizes we "loose"
due to downloading such files are meaningless.

This are the file sizes:
```
diego@debian:~/$ ls -lh pci.ids{,.gz} usb.ids{,.gz}
-rw-r--r-- 1 diego diego 1.3M Aug  7 04:15 pci.ids
-rw-r--r-- 1 diego diego 300K Aug  7 04:15 pci.ids.gz
-rw-r--r-- 1 diego diego 700K May 20 22:34 usb.ids
-rw-r--r-- 1 diego diego 245K May 20 22:34 usb.ids.gz
```
2022-09-09 10:31:12 +01:00
Diego Iastrubni
8b30b69dac Meta: Use CMake functions to extract files
Newer cmake's have internal functions to un-compress files. These
functions will work on pure windows - as well as linux. This
eliminates the need to search for external tools (TAR,GZIP,ZIP) - and
helps fixing #9866.

In order to finally fix #9866 we need to decide to bump the cmake
version requirements and remove the checks. If we demand a newer cmake
version, we will loose Ubuntu 20.04 as a build target - as it ships
with CMake 3.16.

For now - we keep compatibility with CMake 3.16 - and only if CMake
3.18 as been found - we use its new functionality.
2022-09-09 10:31:12 +01:00
Andrew Kaster
5ab3fcf710 Meta: Update jakt build support for fully bootstrapped compiler
Remove the Corrosion dependency, and use the now-builtin
add_jakt_executable function from the Jakt install rules to build our
example application.

By using find_package(Jakt), we now have to set ENABLE_JAKT manually on
both serenity and Lagom at the same time, so the preferred method to do
this for now is:

    cmake -B Build/superbuild<arch><toolchain> \
          -S Meta/CMake/Superbuild \
          -DENABLE_JAKT=ON \
          -DJAKT_SOURCE_DIR=/path/to/jakt

Where omitting JAKT_SOURCE_DIR will still pull from the main branch of
SerenityOS/jakt. This can be done after runing Meta/serenity.sh run.
2022-09-09 11:23:42 +02:00
thankyouverycool
72ae082ca8 WindowServer: Let Windows handle InputLeft events when blocked
Fixes windows not updating on active input changes after being
blocked
2022-09-08 23:21:54 +01:00
thankyouverycool
51006930da LibGUI: Only react on KeyDown when escaping a Dialog
Both KeyEvents aren't necessary and erroneously close two
Dialogs at once.
2022-09-08 23:21:54 +01:00
thankyouverycool
463aff827e LibGUI+WindowServer: Notify Windows on input preemption
Previously Menus set themselves as active input solely to make
sure CaptureInput modals would close, but this is a functional
half-truth. Menus don't actually use the active input role; they
preempt normal Windows during event handling instead.

Now the active input window is notified on preemption and Menus
can remain outside the active input concept. This lets us make
more granular choices about modal behavior. For now, the only
thing clients care about is menu preemption on popup.

Fixes windows which close on changes to active input closing
on their own context menus.
2022-09-08 23:21:54 +01:00
thankyouverycool
6c35aac617 WindowServer: Add unadjusted position members to Menu
Used to determine Menu relationships by proxy
2022-09-08 23:21:54 +01:00
Timothy Flynn
7c9ad6cc2f LibGUI: Add Unicode emoji group filters to the EmojiInputDialog
This allows users to filter the list of displayed emoji by the group to
which the emoji belong.
2022-09-08 23:12:31 +01:00
Timothy Flynn
273045d40e LibGUI: Display emoji in the EmojiInputDialog in Unicode display order 2022-09-08 23:12:31 +01:00
Timothy Flynn
c2148c7dde LibGUI: Add placeholder text to the emoji picker search box
Co-authored-by: electrikmilk <brandonjordan124@gmail.com>
2022-09-08 23:12:31 +01:00
Timothy Flynn
b61eca0a1e LibUncode: Parse and generate emoji code point data
According to TR #51, the "best definition of the full set [of emojis] is
in the emoji-test.txt file". This defines not only the emoji themselves,
but the order in which they should be displayed, and what "group" of
emojis they belong to.
2022-09-08 23:12:31 +01:00
electrikmilk
fff79379d4 Spreadsheet: Add Insert Emoji action
This adds the Insert Emoji action to Spreadsheet.
2022-09-08 23:08:54 +01:00
electrikmilk
44a5deff40 TextEditor: Add Insert Emoji action
This adds the Insert Emoji action to Text Editor.
2022-09-08 23:08:54 +01:00
electrikmilk
6a09d89329 Base+LibGUI: Add insert emoji common action
This adds a common action to invoke the emoji picker.
2022-09-08 23:08:54 +01:00
djwisdom
dd510b24c9 Ports: Update serenity-theming use latest commit 3b4e1f2 2022-09-08 18:07:07 +01:00
Sam Atkins
edc3ed2a0e AK: Allow creating NonnullPtrVectors from an initializer list
This was present in Vector already. Clang-format fixed some const
positions automatically too.

Also removed a now-ambiguous and unnecessary constructor from Shell.
2022-09-08 18:53:08 +02:00
Jelle Raaijmakers
f3877daac5 Ports: Build Quake in parallel
Instead of overwriting the existing `-j` makeopt, we only append
options. This brings the build time for the Quake port down from 24.3s
to 4.4s on my machine.
2022-09-08 12:08:09 -04:00
Jelle Raaijmakers
b42feb76a0 LibSoftGPU: Use approximation for maximum depth slope
OpenGL allows GPUs to approximate a triangle's maximum depth slope
which prevents a number computationally expensive instructions. On my
machine, this gives me +6% FPS in Quake III.

We are able to reuse `render_bounds` here since it is the containing
rect of the (X, Y) window coordinates of the triangle, thus its width
and height are the maximum delta X and delta Y, respectively.
2022-09-08 12:07:03 -04:00
Jelle Raaijmakers
08204efe1f LibGL: Set correct color material mode for GL_AMBIENT_AND_DIFFUSE
This was a silly mistake :^)
2022-09-08 12:05:54 -04:00
Andreas Kling
7ba6eb37fc LibWeb: Rename confusing parameter to layout_block_level_box()
It wasn't the content height, but rather the the bottom edge of the
lowest margin box.
2022-09-08 15:03:55 +02:00
Andreas Kling
af73a5d921 LibWeb: Use correct box edge when looking for space between floats 2022-09-08 15:03:55 +02:00
Xexxa
0270500383 Base: Add more emoji
👨‍👩‍👧‍👦 - U+1F468 U+200D U+1F469 U+200D U+1F467 U+200D U+1F466
FAMILY: MAN, WOMAN, GIRL, BOY
👨‍👩‍👦‍👦 - U+1F468 U+200D U+1F469 U+200D U+1F466 U+200D U+1F466
FAMILY: MAN, WOMAN, BOY, BOY
👨‍👩‍👧‍👧 - U+1F468 U+200D U+1F469 U+200D U+1F467 U+200D U+1F467
FAMILY: MAN, WOMAN, GIRL, GIRL
👨‍👨‍👧‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F467 U+200D U+1F466
FAMILY: MAN, MAN, GIRL, BOY
👨‍👨‍👦‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F466 U+200D U+1F466
FAMILY: MAN, MAN, BOY, BOY
👨‍👨‍👧‍👧 - U+1F468 U+200D U+1F468 U+200D U+1F467 U+200D U+1F467
FAMILY: MAN, MAN, GIRL, GIRL
👩‍👩‍👧‍👦 - U+1F469 U+200D U+1F469 U+200D U+1F467 U+200D U+1F466
FAMILY: WOMAN, WOMAN, GIRL, BOY
👩‍👩‍👦‍👦 - U+1F469 U+200D U+1F469 U+200D U+1F466 U+200D U+1F466
FAMILY: WOMAN, WOMAN, BOY, BOY
👩‍👩‍👧‍👧 - U+1F469 U+200D U+1F469 U+200D U+1F467 U+200D U+1F467
FAMILY: WOMAN, WOMAN, GIRL, GIRL
2022-09-08 13:20:54 +01:00
Andreas Kling
8f0a48ef23 LibWeb: Make default CSS font settings match other browsers better
Let's make 16px the default font size instead of 10px. This makes our
layout results match those of other engines in many more cases.

Also make the h1-h6 element styles use relative (em) font sizes, also
matching other browsers.
2022-09-08 12:43:49 +02:00
Andreas Kling
3dc82d2fa5 LibGfx: Add API for loading more directories into Gfx::FontDatabase
Also make the font discovery algorithm search subdirectories as well.
This will be used by Ladybird to discover more fonts on non-Serenity
systems. :^)
2022-09-08 12:30:25 +02:00
Andreas Kling
5c2e3d1637 LibWeb+WebContent: Add abstraction layer for generic font families
Instead of hard-coding the names of system fonts to use for the CSS
generic fonts (like "sans-serif", "monospace", etc.) we now call out
to a Platform::FontPlugin and ask for the generic names.
2022-09-08 11:57:03 +02:00
Andreas Kling
26544f559c LibWeb: Make anonymous wrapper blocks actually have "display: block"
We didn't set their display at all before, and since CSS display is not
inherited, anonymous block wrappers were actually "display: inline", but
it kinda worked anyway because we positioned blocks based on their C++
class (BlockContainer) rather than their CSS display value.

Now that we position based on CSS display value, this broke positioning
of anonymous wrapper blocks, and this fixes that.
2022-09-08 11:54:13 +02:00