1
0
mirror of https://github.com/SerenityOS/serenity synced 2024-07-09 07:20:46 +00:00
Commit Graph

55262 Commits

Author SHA1 Message Date
Tim Ledbetter
bc6ae54b59 LibGfx/PNGLoader: Don't allow multiple consecutive IHDR chunks 2023-10-08 10:46:00 +02:00
Andreas Kling
3250a424f0 LibWeb: Don't offset abspos children of flex container by padding twice
We were incorrectly offsetting the static position of abspos children of
flex containers by the padding twice. This was a misguided attempt to
adjust to the abspos containing block being the padding box, not the
content box.

Fixes #21344.
2023-10-08 09:06:30 +02:00
Aliaksandr Kalenik
a86531809e LibWeb: Destroy navigable containers not inserted into document tree
This change fixes the bug where navigable containers related to a
document, but not present in the tree, were never destroyed.

Fixes https://github.com/SerenityOS/serenity/issues/21364
2023-10-08 06:17:40 +02:00
Xexxa
61b6146d5e Base: Modify emoji
👨‍❤️‍👨 - U+1F468 U+200D U+2764 U+200D U+1F468
COUPLE WITH HEART: MAN, MAN
👩‍❤️‍👩 - U+1F469 U+200D U+2764 U+200D U+1F469
COUPLE WITH HEART: WOMAN, WOMAN
👨‍👨‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F466
FAMILY: MAN, MAN, BOY
👨‍👨‍👧 - U+1F468 U+200D U+1F468 U+200D U+1F467
FAMILY: MAN, MAN, 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+1F466
FAMILY: WOMAN, WOMAN, BOY
👩‍👩‍👧 - U+1F469 U+200D U+1F469 U+200D U+1F467
FAMILY: WOMAN, WOMAN, 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
👨‍👦 - U+1F468 U+200D U+1F466
FAMILY: MAN, BOY
👨‍👦‍👦 - U+1F468 U+200D U+1F466 U+200D U+1F466
FAMILY: MAN, BOY, BOY
👨‍👧 - U+1F468 U+200D U+1F467
FAMILY: MAN, GIRL
👨‍👧‍👦 - U+1F468 U+200D U+1F467 U+200D U+1F466
FAMILY: MAN, GIRL, BOY
2023-10-07 15:40:47 -04:00
Xexxa
c1f655dfa9 Base: Add more emoji
🦮 - U+1F9AE GUIDE DOG
🐪 - U+1F42A CAMEL
🐫 - U+1F42B TWO-HUMP CAMEL
🦪 - U+1F9AA OYSTER
👘 - U+1F458 KIMONO
🖇️ - U+1F587 LINKED PAPERCLIPS
2023-10-07 15:40:47 -04:00
Ali Mohammad Pur
dc495e299e Shell: Add support for the bashy list literals in POSIX mode
This is currently only allowed in assignments, where x=(...) is parsed
as the assignment of the list (...) to the variable x.
2023-10-07 22:16:35 +03:30
Ali Mohammad Pur
ebe254a6d3 LibWeb/XML: Avoid placing all elements missing an ns in the HTML ns
Also remove the hack for SVG documents, a well-formed SVG document has
the correct xmlns attribute set, which should be automatically picked up
by the builder now.
2023-10-07 20:02:10 +02:00
Ali Mohammad Pur
830f1dbbfe LibWeb/XML: Do not create text nodes for empty text chunks
This corresponds to the empty text node between foo and bar in
`<foo/><bar/>`, which is not supposed to become a text node in HTML.
2023-10-07 20:02:10 +02:00
Andreas Kling
ae4e46a037 LibJS: Do less work in successfully cached GetByValue* ops
If we have a cached environment coordinate that hasn't been screwed
by eval(), we can get the value directly without instantiating a
Reference.

15% speed-up on Octane/zlib.js :^)
2023-10-07 20:01:52 +02:00
Tim Ledbetter
6f1f0710f8 find: Don't canonicalize path operands
The POSIX specification for `find` says that: "Each path operand shall
be evaluated unaltered as it was provided, including all trailing
<slash> characters". This also matches the behavior of `find` on
FreeBSD and Linux.
2023-10-07 11:37:53 +02:00
Tim Ledbetter
881581820f GameOfLife: Allow pressing escape to clear the selected pattern 2023-10-07 11:36:57 +02:00
Tim Ledbetter
f25f2ba047 GameOfLife: Focus on the game board when not editing settings
This makes single key shortcuts work again :^)
2023-10-07 11:36:57 +02:00
Tim Ledbetter
649c7ee11f GameOfLife: Use the GML compiler 2023-10-07 11:36:57 +02:00
Tim Ledbetter
3930702bd2 LibGUI: Make Statusbar::set_segment_count() public
This allows the GML compiler to handle the `segment_count` property
and allows the status bar segment count to be changed after
construction.
2023-10-07 11:36:57 +02:00
Andreas Kling
8a727abd23 LibJS: Move Heap intrusive list manipulation inline
The functions for registering and unregistering MarkedVector, Handle,
etc. were quite prominent in benchmark profiles.

4% speed-up on the entire Kraken benchmark :^)
(including: 7% speed-up on Kraken/imaging-gaussian-blur.js, the current
slowest subtest)
2023-10-07 11:36:28 +02:00
Andreas Kling
0762388709 LibWeb: Make XHR.response an actual XMLDocument for XML documents
Before this change, we were producing a generic DOM::Document, which
was not distinguishable from an XMLDocument by IDL interface type.
2023-10-07 10:19:18 +02:00
Andreas Kling
2b343c9508 LibWeb: Don't crash in XHR.response{,XML} for empty XML document
There were some unhandled paths due to the liberally typed XHR response
object. This patch flushes out those issues by using a tighter type set
in the Variant. (NonnullGCPtr<Object> instead of Value)
2023-10-07 10:19:18 +02:00
Tim Ledbetter
c21efdfc8a LibGfx/ICC: Avoid overflow when checking tag bounds 2023-10-07 09:48:01 +02:00
Nico Weber
f02b84d34d MacPDF: Give sidebar the more modern look
This Just Works with NSToolbarSidebarTrackingSeparatorItemIdentifier,
as long as your window is has NSWindowStyleMaskFullSizeContentView
in its style mask. If it doesn't, things behave pretty weirdly and
at least in the docs I looked at, this requirement wasn't documented
at all :/

Anyways, switch MacPDFView to use safeAreaRect instead of bounds
now that we use NSWindowStyleMaskFullSizeContentView so that we
don't draw parts of the PDF under the title bar.

Also be careful to invalidate the PDF view if safeAreaRect changes,
so that the page is redrawn when toolbar visibility gets toggled.
2023-10-07 09:47:43 +02:00
Nico Weber
b1e9c419a6 MacPDF: Add a split view for a togglable sidebar
It can be toggled with the (only) toolbar button, or via the
menu bar, or the standard shortcut Cmd-Ctrl-S.
2023-10-07 09:47:43 +02:00
Nico Weber
ae1b179474 MacPDF: Add a toolbar with a standard sidebar button 2023-10-07 09:47:43 +02:00
Nico Weber
1f1a596a46 MacPDF: In window controller, use window directly
No need to go through the view now that there's a dedicated
window controller.

No behavior change.
2023-10-07 09:47:43 +02:00
Nico Weber
c0d8131a26 MacPDF: Remove logspam 2023-10-07 09:47:43 +02:00
Nico Weber
6b9afcfb7c MacPDF: Create window UI in code instead of in xib
No intentional behavior change.
2023-10-07 09:47:43 +02:00
Nico Weber
dcf40892b8 MacPDF: Start moving window-related things into MacPDFWindowController
- MacPDFWindowController is now the xib file's owner
- _pdfView moves over
- MacPDFWindowController is now the MacPDFViewDelegate and responsible
  for updating the window's title
- Due to MacPDFWindowController now being the xib file's owner,
  windowControllerDidLoadNib: is no longer called automatically,
  so call a custom windowIsReady method manually instead

No behavior change.
2023-10-07 09:47:43 +02:00
Nico Weber
67f6baead0 MacPDF: Introduce MacPDFWindowController
I'd like to add a sidebar, and NSSplitViewItem apparently isn't
accessibly in .xib files without contortions. So I want to move
to creating the window in code, and this is a step towards that.

No behavior change.
2023-10-07 09:47:43 +02:00
Nico Weber
d6dff83397 MacPDF: Introduce CocoaWrapper.h
No behavior change.
2023-10-07 09:47:43 +02:00
Andreas Kling
65717e3b75 LibJS: Inline fast case for Value::to_{boolean,number,numeric,primitive}
These functions all have a very common case that can be dealt with a
very simple inline check, often avoiding the need to call an out-of-line
function. This patch moves the common case to inline functions in a new
ValueInlines.h header (necessary due to header dependency issues..)

8% speed-up on the entire Kraken benchmark :^)
2023-10-07 07:13:52 +02:00
stelar7
42d80aab06 LibTLS: Reorder supported ciphers 2023-10-06 22:32:07 +02:00
Tim Ledbetter
80238f29d2 LibIMAP: Handle invalid escape sequences in Quoted-Printable parser
When an invalid escape sequence is encountered, we now output the
characters unaltered instead of crashing.
2023-10-06 22:31:43 +02:00
Tim Ledbetter
debb4edcc8 LibGUI: Update model every 100ms when generating thumbmnails
This dramatically improves the responsiveness of FileManager when
navigating to folders with many images.
2023-10-06 22:18:40 +02:00
Tim Ledbetter
1abc52a689 LibGfx/DDSLoader: Avoid integer overflow in decode_color_block() 2023-10-06 22:18:27 +02:00
Tim Ledbetter
b25efa219b LibGfx/DDSLoader: Allow image dimensions that are not divisible by 4 2023-10-06 22:18:27 +02:00
Tim Ledbetter
bf75ecdcf7 Tests/AK: Add FuzzyMatch tests 2023-10-06 22:09:18 +02:00
Tim Ledbetter
e4fddc75f8 AK/FuzzyMatch: Check every match for neighbor character bonuses
Previously, the first match index was not checked to see if the camel
case or separator bonuses applied. The camel case bonus could also be
incorrectly applied where strings had non-alphabetical characters.
2023-10-06 22:09:18 +02:00
Tim Ledbetter
292017d7bd AK/FuzzyMatch: Use a first letter bonus of 15 rather than 20
This matches the value used in the original `lib_fts` implementation
of the algorithm.
2023-10-06 22:09:18 +02:00
Tim Ledbetter
9fefb434f2 LibHTTP: Return an error if HTTP request URL is not valid UTF-8 2023-10-06 11:28:17 +03:30
Shannon Booth
57d7637b59 LibWeb: Remove DeprecatedString support from {Child,Parent}Node
No interface pulls this in that requires DeprecatedString support.
2023-10-06 08:25:40 +02:00
Shannon Booth
d818bbf918 LibWeb: Remove UseDeprecatedAKString support for IDL generator
We no longer have any interface relying on this :^)
2023-10-06 08:25:40 +02:00
Shannon Booth
4321606bba LibWeb: Port Element interface from DeprecatedString
This is the last IDL interface which was using DeprecatedString! :^)
2023-10-06 08:25:40 +02:00
circl
274e0f4988 LibWeb/Canvas: Calculate text width for measureText correctly
Previously this simply added the widths of each glyph, not accounting
for glyph spacing.
2023-10-06 08:23:54 +02:00
Aliaksandr Kalenik
28c9015bd8 LibWeb: Resolve percentages in calc() for font-size
Fixes crashing on https://react.dev/
2023-10-06 08:23:03 +02:00
Tim Ledbetter
b64ed060d8 LibGfx/PNGLoader: Add validation for IHDR width, height and bit depth 2023-10-06 08:21:58 +02:00
Tim Schumacher
87bcaa6151 AK: Implement printf's "period without precision value" correctly 2023-10-06 08:21:18 +02:00
Tim Ledbetter
0068e91aad open: Display a meaningful error if the specified file doesn't exist
Previously, the error given for any non-existent file was:
"Failed to open ':'".
2023-10-06 08:20:28 +02:00
Karol Kosek
1f2ab4ebfc LibGUI: Remove unused Widget::(set_)tooltip_deprecated() 2023-10-06 08:20:11 +02:00
Karol Kosek
03a54a519a Userland: Port remaining calls to Widget::set_tooltip_deprecated()
Replaces `set_tooltip_deprecated(string);` with
`set_tooltip(MUST(String::from_deprecated_string(string)));`
purely to get rid of the deprecated function in the following commit.
2023-10-06 08:20:11 +02:00
Karol Kosek
ed3e729d4e Userland: Use nondeprecated set_tooltip for static and formatted strings 2023-10-06 08:20:11 +02:00
Karol Kosek
46a97844c7 Applications: Stop calling set_tooltip_deprecated when we do have String 2023-10-06 08:20:11 +02:00
Karol Kosek
9c923f20f4 Spreadsheet: Make cell metadata hint return String 2023-10-06 08:20:11 +02:00