Commit Graph

40937 Commits

Author SHA1 Message Date
Jelle Raaijmakers
eb81b66b4e LibGL+LibGPU+LibSoftGPU: Rename blit_color_buffer_to
This makes it consistent with our other `blit_from_color_buffer` and
paves the way for a third method that will be introduced in one of the
next commits.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
1d36bfdac1 LibGL+LibSoftGPU: Implement fixed pipeline support for GL_COMBINE
`GL_COMBINE` is basically a fixed function calculator to perform simple
arithmetics on configurable fragment sources. This patch implements a
number of texture env parameters with support for the RGBA internal
format.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
494024b70e LibGL: Verify Texture2D existence
The code currently guarantees that we always have a target texture.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
72b4f95f71 LibGL: Implement glMultiTexCoord2fv(ARB)? APIs 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
789d871892 LibGL: Define GL_NO_ERROR as 0
This conforms to the Khronos enum value listing and prevents a
redefinition warning when compiling with SDL_opengl.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
6d8dd0ee61 LibGL: Remove unused/default includes from GLContext 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
07e94b3ec1 LibGL: Implement GL_CURRENT_COLOR context parameter 2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
759ef82e75 LibSoftGPU: Convert width and height to f32x4 just once
We were passing along a `u32x4` only for it to be converted to `f32x4`
as soon as we'd use it.
2022-09-11 22:37:07 +01:00
Jelle Raaijmakers
b62dba6bbf LibSoftGPU: Remove unused alias truncate_int_range 2022-09-11 22:37:07 +01:00
Linus Groh
13109694ef Meta: Add networkException to the contributors list :^) 2022-09-11 22:13:14 +01:00
networkException
9ff6c1e692 LibWeb: Avoid copying viewport rect when converting length to pixels
See https://github.com/SerenityOS/serenity/pull/3433#discussion_r484570948
2022-09-11 22:08:38 +01:00
Timothy Flynn
be41b19146 Meta: Do not log CMake version on each CMake invocation
It is a tad verbose to print this each time CMake runs.
2022-09-11 21:40:15 +01:00
networkException
2612d23032 LibGUI: Implement rubber band selection in table view
This patch implements rubber band selection in table view while clamping
the rubber band rect to the widget inner rect, matching the behavior of
IconView and ColumnsView.
2022-09-11 21:39:32 +01:00
networkException
e0353c405d LibGUI: Limit column view rubber band rect to widget inner rect
Previously when selecting a column that was partially scrolled out of
view the rubber band rect would extend outside the widget inner rect.

This patch rewrites the implementation to be more readable and clamps
the rubber band rect to the widget inner rect to match the behavior of
IconView.
2022-09-11 21:39:32 +01:00
networkException
e42a9cf957 LibGUI: Properly limit the icon view rubber band rect to the widget
Previously the rubber band rect of IconView was not properly constrained
to the widget inner rect, leaving a one pixel gap on the bottom and
right side. This patch removes the gap by inflating the constraint rect
by one pixel on each axis.
2022-09-11 21:39:32 +01:00
Timothy Flynn
5190f4e605 LibGUI: Support emoji with multiple code points in EmojiInputDialog 2022-09-11 20:33:57 +01:00
Timothy Flynn
31b2d93038 LibGUI+LibVT: Notify widgets of emoji selection with a callback
Currently, LibGUI modifies the Ctrl+Alt+Space key event to instead
represent the emoji that was selected through EmojiInputDialog. This is
limited to a single code point.

For multiple code point emoji support, individual widgets now set a hook
to be notified of the emoji selection with a UTF-8 encoded string. This
replaces the previous set_accepts_emoji_input() method.
2022-09-11 20:33:57 +01:00
Timothy Flynn
8190120f95 LibGUI: Use discovered emoji files as the EmojiInputDialog button icons
Rather than rendering the emoji as text, use the emoji icons themselves.
2022-09-11 20:33:57 +01:00
Timothy Flynn
a2eb42a9c0 LibGUI: Add an emoji category filter for SerenityOS custom emojis
Most of the emoji are 7x10px (or close to that). But some are larger, on
the order of 128x128px. The icon used for the SerenityOS category is one
such large emoji, and must be scaled down to an appropriate size for
rendering.
2022-09-11 20:33:57 +01:00
Timothy Flynn
4cb9472f97 LibGUI: Ensure unknown emoji have a set display order
Currently, we use code point values as a tie break when sorting emoji by
display order. When multiple code point emoji are supported, this will
become a bit awkward. Rather than dealing with varying code point length
while sorting, just set a maximum display order to ensure these are
placed at the end.
2022-09-11 20:33:57 +01:00
Timothy Flynn
b7ef36aa36 LibUnicode: Parse and generate custom emoji added for SerenityOS
Parse emoji from emoji-serenity.txt to allow displaying their names and
grouping them together in the EmojiInputDialog.

This also adds an "Unknown" value to the EmojiGroup enum. This will be
useful for emoji that aren't found in the UCD, or for when UCD downloads
are disabled.
2022-09-11 20:33:57 +01:00
Timothy Flynn
0aadd4869d LibUnicode: Generate emoji data for non-fully-qualified emoji
This allows us to find emoji data for files such as /res/emoji/U+A9.png.
U+00A9 is not fully-qualified (its full form is U+00A9 U+FE0F). But the
UCD has unqualified data for this code point; generating it allows us to
categorize these emoji appropriately in the EmojiInputDialog.
2022-09-11 20:33:57 +01:00
davidot
3359f192a8 Meta: Make the CI build the new test262 test runner 2022-09-11 20:25:51 +01:00
davidot
cea9464961 LibJS: Add the test-test262 utility
This allows running of test262 (like) tests with any runner. And thus
allows running the full test262 suite on Serenity itself.
The functionality of test-test262 is intentionally limited at first.
It does support:
- Progress updates including the special serenity terminal commands
- Outputting a per-file, to compare against other runs
- Passing any number of parameters to the runner
- Setting the batch size of the amount of tests per runner process
- Outputting a summary of the test results
2022-09-11 20:25:51 +01:00
davidot
aff51f7cfd test262-runner: Don't create a VM and Interpreter if just parsing
If a test is supposed to fail during parse or early phase we can stop
after parsing. Because phases in modules are not as clear we don't skip
the other parts for modules.
2022-09-11 20:25:51 +01:00
davidot
cd3a72b367 test262-runner: Convert dbgln to warnln
Since this application is now supposed to be used from within Serenity
we should make sure to warn the actual user.
2022-09-11 20:25:51 +01:00
davidot
b5b3b9323d test262-runner: Add option to disable core dumping
When running a larger set of tests in Serenity the runner would
otherwise trigger a lot of crash reporters. This would then in turn lead
to memory starvation causes more crashes.
2022-09-11 20:25:51 +01:00
davidot
e4f3c8bf00 test262-runner: Attempt to resolve harness for test262 automatically
This makes it easier to use the runner directly.
2022-09-11 20:25:51 +01:00
davidot
ca5b91f9cc test262-runner: Overwrite __assertion_failed when compiling for Serenity
We also protect against recursive assert failures, for example due to
being out of memory.
With this change the runner now compiles and runs on Serenity :^).
2022-09-11 20:25:51 +01:00
davidot
e3fb5d227a test262-runner: Rename variable stdin to standard_input
This was shadowing a name in LibC triggering warnings.
2022-09-11 20:25:51 +01:00
davidot
3b020c6fb4 test262-runner: Use alarm instead of setitimer
Since setitimer is not implemented in Serenity we use alarm which
triggers SIGALRM after the timeout. We also don't use a signal handler
as we are doing things that serenity doesn't like/doesn't allow.
Linux dealt with allocating and writing in a signal handler but it is
undefined, so instead we just let the process die by SIGALRM.
This means we instead of reading the output can detect timeouts by
checking how the process died.
2022-09-11 20:25:51 +01:00
davidot
7948897688 LibJS: Import the libjs-test262-runner from linusg/libjs-test262
For now this is a lagom only application as it is not compatible with
serenity in its current state.

The only change is that it is released under a different license with
permission from all the authors.
2022-09-11 20:25:51 +01:00
davidot
b6094b7a3d LibTest: Extract some useful functions from TestRunner.h
This allows other test like programs to use these without needing to
link to LibTest.
2022-09-11 20:25:51 +01:00
Xexxa
6b437c576f Base: Add emoji ⚙️
⚙️ - U+2699 GEAR
2022-09-11 20:23:59 +01:00
Liav A
5d0edc7a42 WindowServer: Unveil only subdirectories in /dev directory
Now that each HID device node is located in /dev/input/, and Display
Connector device nodes are in /dev/gpu/, we can simply just unveil those
directories instead of the entire /dev directory.
2022-09-11 19:51:23 +01:00
Liav A
89835558b4 Userland: Move HID input device nodes to /dev/input/{mouse,keyboard}
Because HID devices are not always present in quantities of one per type
it is more elegant and correct to put the representative device nodes in
subdirectories for each HID device type.
2022-09-11 19:51:23 +01:00
Joel Hansen
712af40075 Base: Add 18 new emoji
🎵 - U+1F3B5 Musical Note
💳 - U+1F4B3 Credit Card
📃 - U+1F4C3 Page with Curl
📄 - U+1F4C4 Page Facing Up
📎 - U+1F4CE Paperclip
📏 - U+1F4CF Straight Ruler
📑 - U+1F4D1 Bookmark Tabs
📒 - U+1F4D2 Ledger
📓 - U+1F4D3 Notebook
📔 - U+1F4D4 Notebook with Decorative Cover
📕 - U+1F4D5 Closed Book
📗 - U+1F4D7 Green Book
📘 - U+1F4D8 Blue Book
📙 - U+1F4D9 Orange Book
📝 - U+1F4DD Memo
📞 - U+1F4DE Telephone Receiver
🗨️ - U+1F5E8 Left Speech Bubble
🐰 - U+1F430 Rabbit Face
2022-09-11 14:16:36 +01:00
networkException
1346a653e4 WidgetGallery: Port file picker to use FileSystemAccessClient
Previously we would unveil the home directory of anon to allow showing
anything in the file picker. This patch removes direct access to the
home directory and instead makes WidgetGallery connect to
FileSystemAccessServer to open a file, making the application more user
agnostic and allowing directories outside /home/anon to be shown.
2022-09-10 20:41:16 +01:00
networkException
08f465a47d LibGUI: Blit brightened icon when try item is hovered 2022-09-10 20:40:05 +01:00
Joel Hansen
6bb96217aa Base: Add 18 new emoji
🐨 - U+1F428 Koala
🪟 - U+1FA9F Window
⏏️ - U+23CF Eject Button
 - U+23E9 Fast-Forward Button
 - U+23EA Fast Reverse Button
 - U+23EB Fast Up Button
 - U+23EC Fast Down Button
⏭️ - U+23ED Next Track Button
⏮️ - U+23EE Last Track Button
⏯️ - U+23EF Play or Pause Button
⏸️ - U+23F8 Pause Button
⏹️ - U+23F9 Stop Button
⏺️ - U+23FA Record Button
▶️ - U+25B6 Play Button
◀️ - U+25C0 Reverse Button
⛏️ - U+26CF Pick
 - U+26EA Church
☄️ - U+2604 Comet
2022-09-10 17:42:08 +01:00
demostanis
c786d2126a Meta: Add .editorconfig
See https://editorconfig.org/
2022-09-10 17:32:55 +01:00
electrikmilk
c53fed7911 Base: Add .gitconfig to Git file icon files
This adds .gitconfig to git in the file icon provider.
2022-09-10 06:28:48 +00:00
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