Commit graph

38953 commits

Author SHA1 Message Date
MacDue
072a78b958 AK: Add AK::ceil(float) and AK::ceil_log2(integer)
Co-authored-by: Leon Albrecht <leon2002.la@gmail.com>
2022-06-30 11:16:22 +02:00
Luke Wilde
1e36224321 LibWeb: Print unhandled rejections the same way as unhandled exceptions 2022-06-29 21:21:50 +01:00
Luke Wilde
62491cda0b LibWeb: Use CSO if running script is null in HostPromiseRejectionTracker 2022-06-29 21:21:50 +01:00
Luke Wilde
1d5b03ce17 LibWeb: Store PromiseRejectionEvent::m_reason in a JS::Handle 2022-06-29 21:21:50 +01:00
Luke Wilde
17a26853e1 LibWeb: Move ClassicScript::m_settings_object into the Script base
All Scripts have an associated settings object.
https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
2022-06-29 21:21:50 +01:00
Luke Wilde
885c6b6678 LibWeb: Return instead of throwing on unknown enums in attribute setters
I saw one site relying on this, where they are trying to set
XHR.responseType to "text/plain", which is not a valid responseType.
However, they also don't expect it to throw. The IDL spec special cases
enumerations to make it return instead of throwing in this case.
2022-06-29 21:21:50 +01:00
Luke Wilde
3fe66bddf4 LibWeb: Implement WindowEventHandlers 2022-06-29 21:21:50 +01:00
Luke Wilde
ebf2184636 LibWeb: Only make certain <body> and <frameset> events apply to Window
Previously we forwarded all event handler attributes to Window from
these two elements, however, we are only supposed to forward blur,
error, focus, load, resize and scroll.
2022-06-29 21:21:50 +01:00
FrHun
a50a48f6b4 Terminal: Repair resizing
Because the content widget gets modified when resizing, the usual way of
calculating the min_size won't work for the Terminal window. So the
automatic min_size calculation will be disabled for now.
2022-06-29 19:11:13 +01:00
FrHun
5d25956790 LibGUI: Add ability to calculate min_size of Window from content widget 2022-06-29 19:11:13 +01:00
b14ckcat
13445f5a43 Kernel/USB: Use proper error codes for UHCI transfers 2022-06-29 13:38:13 +01:00
Obinna Ikeh
104330d1a0 LibJS: Add tests cases for %TypedArray%.prototype.toSorted function 2022-06-29 13:36:54 +01:00
Obinna Ikeh
4dbb2c2d44 LibJS: Add %TypedArray%.prototype.toSorted
This change implements typed array prototype toSorted function.

It also introduces two new TypedArray functions
2022-06-29 13:36:54 +01:00
Obinna Ikeh
ee9353702c LibJS: Implement element comparison function for typed arrays 2022-06-29 13:36:54 +01:00
Andrew Kaster
05058d185c Toolchain: Update Platform files to match those in upstream cmake
Serenity support was merged into the CMake master branch for the 3.25.0
milestone (https://gitlab.kitware.com/cmake/cmake/-/merge_requests/6837)

Remove some settings that are now redundant from the Toolchain files.
2022-06-29 13:36:38 +01:00
Linus Groh
ca85e157e8 LibJS: Use null-prototype objects in a few more places in Temporal
This is a normative change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/334479f
2022-06-29 07:35:42 +01:00
Linus Groh
3720f4bd8f LibJS: Fix production for time zone name in time zone strings
This is a normative change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/caf013a
- https://github.com/tc39/proposal-temporal/commit/fb7cfa6
2022-06-29 07:35:42 +01:00
Linus Groh
f5669a1373 LibJS: Mark CreateTemporalDate as infallible in DifferenceISODateTime
This is an editorial change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/af2dc2f
- https://github.com/tc39/proposal-temporal/commit/2e9ee68
2022-06-29 07:35:42 +01:00
Linus Groh
abb3f327ad LibJS: Mark BalanceDuration as infallible in DifferenceISODateTime
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/5fefc2f
2022-06-29 07:35:42 +01:00
Linus Groh
cee54d2725 LibJS: Replace one use of BalanceISODate with CreateISODateRecord
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/7a7ddb7
2022-06-29 07:35:42 +01:00
Linus Groh
6eab1f0212 LibJS: Assert DifferenceISODateTime is called with valid datetime values
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/143b2e2
2022-06-29 07:35:42 +01:00
Linus Groh
4ba1018273 LibJS: Replace guaranteed zero [[Days]] field with constant zero
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/68f2802
2022-06-29 07:35:42 +01:00
Linus Groh
11a6702cef LibJS: Assert [[Days]] is zero for the balanced time in DifferenceTime
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/be982fb
2022-06-29 07:35:42 +01:00
Sam Atkins
9b9dab249c Meta: Add a security policy 2022-06-29 03:29:27 +00:00
Olivier De Cannière
dbad617351 LibGUI: Close EmojiDialog on active window change
This patch makes EmojiDialog be closed whenever the focus moves away
from it just like the CommandPalette.
2022-06-29 03:29:02 +00:00
Andrew Dykema
2a7b3ca4b8 Calender: Add ability to set the time of day for an event 2022-06-29 03:27:59 +00:00
Linus Groh
cc4bb59a7e Playground: Rename the application to GMLPlayground
Just "Playground" is too generic and doesn't match the general rule of
"application name equals display name minus spaces".
2022-06-28 21:10:10 +01:00
Tim Schumacher
93488d6d5a pls: Implement support for --preserve-env 2022-06-28 19:09:23 +01:00
Tim Schumacher
38677f63c6 pls: Don't rely on getenv to find TERM
This allows us to skip storing the actual backing data in a separate
`Vector`, as we know that we are working with `environ`-backed storage
here.

Also, while the logic is currently very similar to what `getenv` does
internally, this allows us to eventually implement custom environment
variable filters while remaining linear in run time.
2022-06-28 19:09:23 +01:00
FrHun
00df1c9532 LibGUI: Use new layout system in InputBox 2022-06-28 17:52:42 +01:00
FrHun
a78f84645c Base: Add manpages for new layout system
This is far from explaining all implications of the new layout system,
but it covers the basics.
2022-06-28 17:52:42 +01:00
FrHun
1d6d074536 LibGUI: Use new layout system in FilePickerDialog 2022-06-28 17:52:42 +01:00
FrHun
a6ec2b9d0a LibGUI+Applications: Use the new layout system in the settings screens 2022-06-28 17:52:42 +01:00
FrHun
3978960481 LibGUI: Implement new layout system for Scrollbar 2022-06-28 17:52:42 +01:00
FrHun
19fac58e49 LibGUI: Use new layout system for basic widgets 2022-06-28 17:52:42 +01:00
FrHun
bfbaad9f41 LibGUI: Grow spacers after doing layout
Before this, the spacers were handled as just another child widget, and
as such could take away space from real widgets when growing.
This also fixes the problem of effectively 0 sized spacers, that doubled
the spacing between the widgets they were placed between.
2022-06-28 17:52:42 +01:00
FrHun
aba6422e11 LibGUI: Add read-only effective size properties for debugging
These new read-only properties help with debugging layouts, by exposing
the size values that are actually used for final size determination.
2022-06-28 17:52:42 +01:00
FrHun
68ad5f3780 LibGUI: Remove temporary compatibility measures for new layout system 2022-06-28 17:52:42 +01:00
FrHun
b8aa0037a8 LibGUI: Use new layout system for BoxLayout run 2022-06-28 17:52:42 +01:00
FrHun
34c96280d7 LibGUI: Use new layout system in Splitter 2022-06-28 17:52:42 +01:00
FrHun
0d56d80514 LibGUI: Use new layout system in scrollable widgets
These changes are mainly nessecairy to remove dependence on the
temporary implicit conversions currently still in place.
2022-06-28 17:52:42 +01:00
FrHun
3451181fbf NotificationServer: Remove usages of deprecated implicit ui conversions 2022-06-28 17:52:42 +01:00
FrHun
603034759f LibGUI: Remove usages of deprecated implicit conversions 2022-06-28 17:52:42 +01:00
FrHun
8dd08d47f1 Applications: Remove usages of deprecated implicit conversions
These deprecated conversions are currently in place to make the system
compile, but they are to be removed soon. This prepares that.
2022-06-28 17:52:42 +01:00
FrHun
ec1e25929e LibGUI: Add effective and calculated sizes to Widget
Effective sizes are the ones that are actually to be used for layout.
They are just their respective propertys value, or the value returned
by the calculated_<min/preferred>_size, when the respective property
is set to shrink or fit.
The "calculated" values in turn are specific to the widget. Container
widgets for example can calculate their values depending on their
layout and child widget requirement.
Simple widgets like labels and buttons can for example calculate their
values based upon their current text.
2022-06-28 17:52:42 +01:00
FrHun
d825c8ad18 LibGUI: Change preferred_size in Layout to new layout system 2022-06-28 17:52:42 +01:00
FrHun
b2951a2116 LibGUI: Add min_size to Layout 2022-06-28 17:52:42 +01:00
FrHun
2600669b73 LibGUI: Use preferred_size to emulate old is_shrink_to_fit 2022-06-28 17:52:42 +01:00
FrHun
bd277939a1 LibGUI: Add preferred_size to Widget 2022-06-28 17:52:42 +01:00
FrHun
a4aced7f3a LibGUI: Introduce UIDimension properties 2022-06-28 17:52:42 +01:00