Commit Graph

27913 Commits

Author SHA1 Message Date
Ben Wiederhake
edc0cd29f8 LibPDF: Break weird dependency cycle
Old situation:
Object.h defines Object
Object.h defines ArrayObject
ArrayObject requires the definition of Object
ArrayObject requires the definition of Value
Value.h defines Value
Value requires the definition of Object

Therefore, a file with the single line "#include <Value.h>" used to
raise compilation errors; certainly not something that one might expect
from a library.

This patch splits up the definitions in Object.h to break the cycle.
Now, Object.h only defines Object, Value.h still only defines Value (and
includes Object.h), and the new header ObjectDerivatives.h defines
ArrayObject (and includes both Object.h and Value.h).
2021-09-20 17:39:36 +04:30
Ben Wiederhake
7ddd11729d LibPDF: Add missing headers in Value.h 2021-09-20 17:39:36 +04:30
Ben Wiederhake
35674b8a42 LibPDF: Fix math error in comments 2021-09-20 17:39:36 +04:30
Ben Wiederhake
750bed254f LibPDF: Switch to automatic ref counting, fix memory leak
At least `Value::operator=` didn't properly unref the `PDF::Object` when
it was called. This type of problem is removed by just letting `RefPtr`
do its thing.

This patch increases the memory consumption by LibPDF by 4 bytes (the
other union objects) per value.
2021-09-20 17:39:36 +04:30
Ben Wiederhake
05006e63c4 LibPDF: Add missing headers to XRefTable.h 2021-09-20 17:39:36 +04:30
Ben Wiederhake
6089c4d97d LibPDF: Add missing headers to Reader.h 2021-09-20 17:39:36 +04:30
Ben Wiederhake
6836ca2136 LibPDF: Add missing headers to Forward.h 2021-09-20 17:39:36 +04:30
Ben Wiederhake
de15a6a657 Kernel: Clean up PCI::Device namespace formatting 2021-09-20 16:00:43 +03:00
Marcus Nilsson
f9e0815c3b PixelPaint: Move Tools to it's own subdirectory
The PixelPaint source directory was getting a bit large, let's move all
the Tools to it's own subdirectory. Also remove some unused includes.
2021-09-20 03:04:24 +00:00
Andrew Kaster
61ad239ee0 AK: Remove unnecessary include of <new> for non-__serenity__ builds
We already include `<new>` in AK/kmalloc.h when KERNEL is not defined,
which applies to all non-`__serenity__` builds.
2021-09-20 00:39:46 +00:00
Andrew Kaster
da87497e61 AK+LibC: Remove SERENITY_LIBC_BUILD guard around <initializer_list>
This was required before commit 5f724b6ca1
when we were building LibC before libstdc++ headers were available in
the sysroot. However as noted in that commit, we never actually needed
to be building LibC before libstdc++, so we can go ahead and remove this
ancient hack.
2021-09-20 00:39:46 +00:00
Andrew Kaster
210b0b883b AK: Remove unused ifdef for BUILDING_SERENITY_TOOLCHAIN
The only use of this define was removed in commit
5f724b6ca1, over a year ago.

The define was there to prevent the LibC build we built before libstdc++
from complaining about missing libgcc symbols. However, as noted in that
commit, we never actually needed to build LibC at all.
2021-09-20 00:39:46 +00:00
Ali Mohammad Pur
b946a1ce48 Shell: Make ArgsParser not exit on failure in builtin_exit()
Fixes #10128.
2021-09-20 03:31:57 +04:30
Tobias Christiansen
f6ffa09437 Meta: Add section to CLion Configuration Docs about including headers 2021-09-19 22:57:58 +02:00
Sam Atkins
0cedb7a7c4 LibWeb: Give InlineNodes borders :^) 2021-09-19 22:53:35 +02:00
Sam Atkins
e1f3fb0146 LibWeb: Move border-painting code out of Box
The logic here is needed by InlineNode too. Moving it into a
`paint_all_borders()` function makes it available to them both, as well
as anyone else who wants it. :^)
2021-09-19 22:53:35 +02:00
Sam Atkins
eb07668589 LibGfx: Add per-side overloads of Rect::inflate() and ::shrink()
These are in CSS order (top, right, bottom, left) since LibWeb is the
reason I'm adding these. :^)
2021-09-19 22:53:35 +02:00
Sam Atkins
0712036485 LibWeb: Give InlineNodes a box-shadow :^) 2021-09-19 22:53:35 +02:00
Sam Atkins
912596fae8 LibWeb: Give InlineNodes a background
This now uses the same code as Box, so images, repeat-rules, and
anything that's added in the future will work for `display: inline`
elements too. :^)
2021-09-19 22:53:35 +02:00
Sam Atkins
14dc20118c Base: Add page for testing styling on display: inline elements 2021-09-19 22:53:35 +02:00
Sam Atkins
abc22b727c LibWeb: Move background painting from Box to its own file
This makes the code accessible to things that aren't a Box, such as
InlineNode.
2021-09-19 22:53:35 +02:00
Sam Atkins
b047c1bc97 LibWeb: Move box-shadow painting out of Box to its own file
This makes the code accessible to things that aren't a Box, such as
InlineNode.
2021-09-19 22:53:35 +02:00
Sam Atkins
3b6325e787 LibWeb: Move InlineNode background code from paint_fragment -> paint
`paint_fragment()` seems to never get called. Moving the painting to
`paint()` fixes the background.
2021-09-19 22:53:35 +02:00
Sam Atkins
aaf12929d5 LibWeb: Extract border-radius normalization code from Box
This is going to be needed by InlineNodes too!

`BorderPainting.{h,cpp}` might not be the best place for it, but it
works for now.
2021-09-19 22:53:35 +02:00
Sam Atkins
b88641e44b LibWeb: Stop painting backgrounds for TextNodes
Doing so was causing the background to be painted twice, which looks
ugly if the background is semi-transparent. The painting is a bit of a
hack, as some situations apparently relied on it. This commit is ripping
the band-aid off to find where those are and fix them. :^)
2021-09-19 22:53:35 +02:00
Andreas Kling
7ef4d75716 LibWeb: Implement XMLHttpRequest.getAllResponseHeaders() 2021-09-19 22:34:44 +02:00
Andreas Kling
95559c4277 LibWeb: Implement basic support for MessageChannel and MessagePort
This patch adds a basic initial implementation of these API's.

Since LibWeb currently doesn't support workers, this implementation of
messaging doesn't bother with serializing and deserializing messages.
2021-09-19 22:34:44 +02:00
Andreas Kling
c7aa32b90f LibWeb: Add missing #include to MainThreadVM.h 2021-09-19 22:34:44 +02:00
Andreas Kling
68d1f5965a LibWeb: Add HTML::Task::Source::PostedMessage
This is the task source used by MessagePort.postMessage().
2021-09-19 22:34:44 +02:00
Andreas Kling
dd29abe4d6 Meta: Bump default VM memory size to 1 GiB 2021-09-19 22:34:43 +02:00
David Isaksson
122f440672 AudioApplet: Refactor window resizing 2021-09-19 21:52:32 +02:00
David Isaksson
df32f1b7de AudioApplet: Get values from AudioServer instead of the config file 2021-09-19 21:52:32 +02:00
David Isaksson
bd48abab8b AudioApplet: Make sure to set the internal volume on slider change
This fixes the issue that the percent label doesn't update.
2021-09-19 21:52:32 +02:00
David Isaksson
3f6ccf63fe AudioApplet: Round the volume to the nearest integer 2021-09-19 21:52:32 +02:00
David Isaksson
c1458e8061 AudioApplet: Update the volume slider on update from audio server 2021-09-19 21:52:32 +02:00
David Isaksson
3c8493c667 LibGUI: Add option to disable on_change call for sliders set_value()
This makes it possible to avoid messy situations where a slider
controlled value can be changed from multiple sources.
2021-09-19 21:52:32 +02:00
David Isaksson
5a91f5b320 Utilities: Fix asctl volume units
A while back the internal volume representation was changed from int to
double, but asctl was apparently never changed. This patch fixes that
issue.
2021-09-19 21:52:32 +02:00
Idan Horowitz
574a1c522d Kernel: Store device class name as member of VirtIO devices
This ensures we dont try to hold the PCI Access mutex under IRQ when
printing VirtIO debug logs (which is not allowed and results in an
assertion). This is also relatively free, as it requires no allocations
(we're just storing a pointer to the rodata section).
2021-09-19 21:51:03 +02:00
Idan Horowitz
53cf28c47c Kernel: Use StringView literals in VirtIO::determine_device_class()
Since the return type is StringView we can just create them at compile
time and avoid the run-time construction.
2021-09-19 21:51:03 +02:00
Ali Mohammad Pur
35116c9117 Base: Add a quote to the fortunes database 2021-09-19 23:51:34 +04:30
Karol Kosek
65a5d66387 PixelPaint: Use main window's icon in the 'Create new image' widget 2021-09-19 20:05:58 +02:00
Ali Mohammad Pur
bd4f7421cf LibCore: Don't double-check select() in Socket's read notifier callback
This was used to work around a possible bug where select() would mark a
socket readable, but another user of the same socket would read before
the notifier's callback is run; let's remove this and fix any issues
regarding that specific situation later when they pop up.
2021-09-19 21:10:23 +04:30
Ali Mohammad Pur
81a0301d4d LibCore+RequestServer: Ignore callbacks for cancelled network jobs
Also cancel the jobs when they're destroyed.
This makes sure that jobs whose owners have discarded don't end up
crashing because of a did_fail().
2021-09-19 21:10:23 +04:30
Ali Mohammad Pur
436693c0c9 LibTLS: Use a setter for on_tls_ready_to_write with some more smarts
The callback should be called as soon as the connection is established,
and if we actually set the callback when it already is, we expect it to
be called immediately.
2021-09-19 21:10:23 +04:30
Ali Mohammad Pur
d3ea0818f3 LibTLS: Don't close the underlying socket on EOF 2021-09-19 21:10:23 +04:30
Ali Mohammad Pur
e780ee2832 LibWeb: Avoid introducing a reference cycle in ResourceLoader::load()
Previously we were kinda sorta resolving the reference cycle, but let's
just keep the requests in a hashtable instead of relying on hard to
track refcount tricks.
Fixes #7314.
2021-09-19 21:10:23 +04:30
Ali Mohammad Pur
65f7e45a75 RequestServer+LibHTTP+LibGemini: Cache connections to the same host
This makes connections (particularly TLS-based ones) do the handshaking
stuff only once.
Currently the cache is configured to keep at most two connections evenly
balanced in queue size, and with a grace period of 10s after the last
queued job has finished (after which the connection will be dropped).
2021-09-19 21:10:23 +04:30
Ali Mohammad Pur
c5d7eb8618 LibHTTP: Exit the read loop early when there cannot be any further data 2021-09-19 21:10:23 +04:30
Kenneth Myhra
6819193671 Ports/glib: Bump GLib to 2.70.0 2021-09-19 18:18:47 +02:00
Kenneth Myhra
83a4c1732b Ports/glib: Maintain compatibility with meson < 0.57.0 2021-09-19 18:18:47 +02:00