Commit graph

39176 commits

Author SHA1 Message Date
networkException
baac3ba60c LibWeb: Remove unnecessary return in ResolvedCSSStyleDeclaration 2022-07-04 12:39:48 +02:00
Ali Mohammad Pur
6e24d845e0 Shell: Immediately resolve value when setting a variable
The lazy resolution mechanism made it so that the variables were linked
together, causing unexpected behaviour:

    true
    x=$? # expected: x=0
    false
    echo $x # expected: 0, actual: 1
2022-07-04 10:23:15 +00:00
Maciej
f94c7fc880 Base: Update Network manpage to the new NetworkServer behavior 2022-07-04 13:20:24 +03:00
Maciej
65307cf5cc NetworkServer: Enable DHCP on interfaces that are not listed in config 2022-07-04 13:20:24 +03:00
FrHun
544636fd0f LibGUI: Notify the layout system of more relevant events in TabWidget 2022-07-04 11:15:40 +02:00
FrHun
ccdccadc24 LibGUI: Implement calculated min/preferred sizes for TabWidget 2022-07-04 11:15:40 +02:00
FrHun
309874b4fb LibGUI: Add horizontal and vertical totals to Margins 2022-07-04 11:15:40 +02:00
FrHun
dba6f0bc4b AK: Add header for generic shorthands
These are functions that can be expressed with just normal operators,
but would be very repetetive.
2022-07-04 11:15:40 +02:00
FrHun
f35efe9bc8 LibGUI: Notify layout system of more relevant events in Widget 2022-07-04 11:15:40 +02:00
FrHun
a0938d62f3 LibGUI: Avoid some unneeded relayouts from layout relevant changes 2022-07-04 11:15:40 +02:00
FrHun
80ea141ffe LibGUI: Calculate Window min_size on show 2022-07-04 11:15:40 +02:00
FrHun
53215be7ae WidgetGallery: Repair GML layout on BasicsTab 2022-07-04 11:15:40 +02:00
MacDue
2ee7c44036 Base: Add some background-clip + border-radius HTML examples 2022-07-04 11:12:44 +02:00
MacDue
61b447e53f LibWeb: Shrink border radii for background-clip and support with images
Since background layers can have different clipping this has also
required doing the corner clipping for each layer, rather than
just once.
2022-07-04 11:12:44 +02:00
MacDue
0070c28714 LibWeb: Add .shrink() to BorderRadiusData and BorderRadiiData 2022-07-04 11:12:44 +02:00
Igor Pissolati
44057c9482 LibWeb: Make hit testing respect hidden overflow 2022-07-04 11:09:27 +02:00
Linus Groh
4b70ddf5a0 LibJS: Let Array.prototype.toSpliced throw RangeError for len <= 2^53-1
This aligns it with the spec again, it was clarified that the additional
range check before ArrayCreate is intentional:
https://github.com/tc39/proposal-change-array-by-copy/issues/94

Also cast the final variable to an u64 instead of size_t after we have
determined that it is safe to do so, as that's what Array::create()
takes now.
2022-07-04 10:10:11 +02:00
Linus Groh
5927cdd9c5 LibJS: Use u64 for the length parameter in Array::create()
This doesn't matter per se as the value is immediately validated to be
in the 0 to 2^32 - 1 range, but it avoids having to cast a number that
potentially doesn't fit into a size_t into one at the call site. More
often than not, array-like lengths are only validated to be <= 2^52 - 1,
i.e. MAX_SAFE_INTEGER.

This is fully backwards compatible with existing code as a size_t always
fits into an u64, but an u64 might not always fit into a size_t.
2022-07-04 10:10:11 +02:00
Linus Groh
65eb1ee67a LibJS: Add spec comments to ArrayCreate 2022-07-04 10:10:11 +02:00
Linus Groh
1132151f3d LibJS: Use a template for 'Value from integral number' constructors
This also allows constructing from other integral types like u64, which
would have been ambiguous before (at least on i686):

```
error: call of overloaded 'Value(u64&)' is ambiguous
note: candidate: 'JS::Value::Value(i32)'
  175 |     explicit Value(i32 value)
      |              ^~~~~
note: candidate: 'JS::Value::Value(unsigned int)'
  164 |     explicit Value(unsigned value)
      |              ^~~~~
note: candidate: 'JS::Value::Value(long unsigned int)'
  153 |     explicit Value(unsigned long value)
      |              ^~~~~
note: candidate: 'JS::Value::Value(double)'
  141 |     explicit Value(double value)
      |              ^~~~~
```
2022-07-04 10:10:11 +02:00
Lenny Maiorani
c860d8f5be AK: Add nodiscard attribute to Find functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
ef4b98be52 AK: Add nodiscard attribute to BitStream functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
97d966d25c AK: Add nodiscard attribute to BitCast functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
84d9e537cd AK: Add nodiscard attribute to BinarySearch functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
ccbf240962 AK: Add nodiscard attribute to BinaryHeap functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
56cabf80de AK: Add nodiscard attribute to Base64 functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
49042bffe9 AK: Add nodiscard attribute to AnyOf functions 2022-07-04 05:53:56 +00:00
Lenny Maiorani
318bee03d8 AK: Add nodiscard attribute to AllOf functions 2022-07-04 05:53:56 +00:00
Daniel K Bueno
65440f9262 Documentation: Add information on MacOS build prerequisites
This PR includes information that highlights the importance of
updating Xcode on MacOS. I ran into problems building serenity
on MacOS because I had Xcode installed but not updated in a while.
This triggered seemingly unrelated errors that were easily solved
by updating Xcode.
2022-07-04 05:52:31 +00:00
djwisdom
036f68f857 Ports: Update serenity-theming to latest commit 2022-07-04 05:50:32 +00:00
Idan Horowitz
af71aa4e0b Kernel: Negate condition in ARPTableBlockerSet::should_add_blocker
To prevent a race condition in case we received the ARP response in the
window between creating and initializing the Thread Blocker and the
actual blocking, we were checking if the IP address was updated in the
ARP table just before starting to block.
Unfortunately, the condition was partially flipped, which meant that if
the table was updated with the IP address we would still end up
blocking, at which point we would never end unblocking again, which
would result in LookupServer locking up as well.
2022-07-04 01:56:43 +03:00
Nathan Ell
4947804121 Ports: Update dos2unix to 7.4.3
Update to the latest version of the upstream dos2unix, 7.4.3.
Simplify the URL used to download the upstream PGP key for the
dos2unix package, by leveraging the already well-used version
variable.
2022-07-03 21:56:03 +00:00
Marcus Nilsson
da8eea69e4 LibDebug: Make sure current_breakpoint has value before usage
Previously this caused a crash when no breakpoint was active since we
tried to get value().address before the has_value() check.
2022-07-03 21:54:46 +00:00
Linus Groh
643faa1144 Everywhere: Fix two inconsistent serenity_lib() output names
- No underscores between word boundaries, i.e. `languageserver` and not
  `language_server` for LibLanguageServer
- All lowercase, i.e. `coredump` and not `Coredump` for LibCoredump
2022-07-03 22:59:13 +02:00
MacDue
95e6e3be74 Browser: Fix crash if clicking on non-visible nodes in the inspector
If you attempt to inspect a non-visible dom node it will hit
various assertions as things like style have not been computed.

With this change attempting to inspect these nodes will simply
clear the style and box model tabs.
2022-07-03 20:45:11 +02:00
Kenneth Myhra
445c3050d4 LibWeb: Wire up XHR::ontimeout event 2022-07-03 13:26:32 +02:00
Kenneth Myhra
92a3803066 LibWeb: Add timeout_callback to ResourceLoader::load() 2022-07-03 13:26:32 +02:00
Kenneth Myhra
07b6c7114b LibWeb: Use a single shot timer instead of an ordinary repetitive timer 2022-07-03 13:26:32 +02:00
Maciej
e1722d39df BrowserSettings: Make content filtering on by default
It was default in Browser but not default in settings, so the checkbox
was initially not checked.
2022-07-03 13:19:52 +02:00
Maciej
503e4b805f BrowserSettings: Make default content filtering flag constexpr
And add s_ prefix per coding style guidelines.
2022-07-03 13:19:52 +02:00
Linus Groh
ab2574d75f LibJS: Avoid potential overflow in Array.prototype.toSpliced()
The implementation no longer matches the spec text, but I believe that's
a bug anyway. No point in allowing array lengths up to 2^53 - 1 when the
ArrayCreate AO rejects anything above 2^32 - 1.
2022-07-03 13:06:44 +02:00
b14ckcat
143339767b Kernel/USB: Move buffer allocation from USB transfer to USB pipe
Currently when allocating buffers for USB transfers, it is done
once for every transfer rather than once upon creation of the
USB device. This commit changes that by moving allocation of buffers
to the USB Pipe class where they can be reused.
2022-07-03 01:15:07 +02:00
Obinna Ikeh
5f726ace53 LibJS: Add tests for %TypedArray%.prototype.toReversed 2022-07-03 01:12:32 +02:00
Obinna Ikeh
f78ef60be6 LibJS: Add %TypedArray%.prototype.toReversed 2022-07-03 01:12:32 +02:00
Idan Horowitz
888d8e53a3 LookupServer: Try other available DNS nameservers on network errors
We were accidentally short-circuting DNS lookup on network errors when
contacting the first DNS server, instead of trying the other available
options.
2022-07-02 23:41:06 +03:00
Idan Horowitz
c8d1c263d6 CI: Use a custom ccache directory in GitHub CI
This ensures that updates to ccache that change the default cache
directory do not break out github ccache cache.
2022-07-02 20:23:01 +03:00
Idan Horowitz
1ebc5af2f0 LibJS: Set both {minimum, maximum}FractionDigits in Intl.DurationFormat
This is a normative change in the Intl.DurationFormat spec.

See: https://github.com/tc39/proposal-intl-duration-format/commit/b293603e
2022-07-02 18:32:35 +03:00
Idan Horowitz
fb8c4a724e LibJS: Disallow mixed-sign durations in Intl.DurationFormat
This is a normative change in the Intl.DurationFormat spec.

See: https://github.com/tc39/proposal-intl-duration-format/commit/89ab1855
2022-07-02 18:32:35 +03:00
Tim Schumacher
8a671154c3 unzip: Remove the arbitrary file size limit
Not being able to map the file chunk-by-chunk feels like a deficit of
MappedFile and/or LibArchive, so it's weird that `unzip` is enforcing
this size limit, and an especially arbitary one at that.

Since "replace one error message with another error message" is the best
possible outcome here, and making the user pass a useless flag in cases
where it may not even be needed is the worst, let's just remove that
file size limit.

However, the `FIXME` about mapping files partially is left in because
this is something that we definitely want to take a look at in the
future.
2022-07-02 11:12:49 +04:30
Thitat Auareesuksakul
2586d767d0 Base: Add U+0E4E, U+0E5B glyphs to KaticaRegular10 font
This completes the entire Thai unicode range for KaticaRegular10 :^)
2022-07-02 00:55:03 +01:00