Commit Graph

35798 Commits

Author SHA1 Message Date
thankyouverycool
17b16f3997 FontEditor: Use memset/memcpy to copy/paste/delete glyphs
Iterating over each glyph to set bits was rather slow in large
selections. This lets us edit the entire character set almost
instantly.
2022-03-18 01:12:26 +01:00
thankyouverycool
3d1591a822 LibGfx: Add accessors for BitmapFont's rows and widths 2022-03-18 01:12:26 +01:00
Linus Groh
599b2bee4a LibJS: Tweak Interpreter::create() for more spec-likeness
Store a reference to the newly created execution context in an aptly
named variable, rename global_this_value to just this_value, and only
call set_global_object() in a single place.
2022-03-18 01:12:12 +01:00
Linus Groh
29964dc152 LibJS: Use TRY(push_execution_context()) in places where we can recover 2022-03-18 01:12:12 +01:00
Linus Groh
9422ae9bb2 LibJS: Add infallible variant of VM::push_execution_context()
It makes no sense to require passing a global object and doing a stack
space check in some cases where running out of stack is highly unlikely,
we can't recover from errors, and currently ignore the result anyway.

This is most commonly in constructors and when setting things up, rather
than regular function calls.
2022-03-18 01:12:12 +01:00
Linus Groh
50ad8d2a5a Hearts: Add icon to settings action 2022-03-18 01:10:16 +01:00
Linus Groh
c19486172d Applications+Games: Drop ellipsis from settings action
There is no second step to complete after activating this action.
2022-03-18 01:10:16 +01:00
Linus Groh
fd60c9fac7 Games: Add reload icon to 'New Game' actions 2022-03-18 01:10:16 +01:00
Linus Groh
c2d11d5aa0 Eyes: Add 'Contents' action to help menu 2022-03-18 01:10:16 +01:00
Lenny Maiorani
2548ee4149 Kernel: Make number of RTL8168 rx/tx descriptors constexpr 2022-03-17 13:36:17 -07:00
Ali Mohammad Pur
e235c2e21c Meta: Ignore the return value of test-wasm on CI 2022-03-17 23:20:06 +03:30
Ali Mohammad Pur
83883bf3cb Meta: Use sudo to unpack wabt package in CI
The self-hosted runner doesn't run the commands as root.
2022-03-17 23:10:18 +03:30
Ali Mohammad Pur
01d506a953 Meta: Install a recent build of wabt for INCLUDE_WASM_SPEC_TESTS in CI
Also skip prettifying the generated tests as we don't need to look at
them.
2022-03-17 22:42:00 +03:30
Tobias Christiansen
be58e5c35b PixelPaint: Expand FastBoxBlur settings to allow vector input
This expands the previously added settings for the asymmetric radii of
th FastBoxBlurFilter to allow the user to specify an angle and the
desired magnitude of blur.
The given values are then calculated forward to corresponding x and y
blur radii.
2022-03-17 20:03:05 +01:00
Tobias Christiansen
ffcc11c31b PixelPaint: Add asymmetric parameters to FastBoxBlur
This allows the user to blur the image not uniformly, but to specify
different radii for the x and y component.
2022-03-17 20:03:05 +01:00
Tobias Christiansen
64cc482f8a LibGfx: Allow for different {x,y}-radii in FastBoxBlurFilter
Use different specified radii for the two seperate passes.

The gaussian approximation is not changed to accept two parameters since
the math is not exactly straight forward and therefore something for a
later patch. For now, let's progress!
2022-03-17 20:03:05 +01:00
Tobias Christiansen
5f063e832e LibGfx: Make FastBoxBlurFilter::apply_single_pass's argument unsigned
It isn't sensible to have a negative radius for blurring, so an unsigned
value is the right thing to do here.
Now we have to cast the radius to int a few times when actually doing
the calculations but I'm sure that can be done more intelligently, but
that optimization is a thing for the future.

It looked very goofy for the two different ways of invoking the Filter
to have differently signed arguments.
2022-03-17 20:03:05 +01:00
Lenny Maiorani
9c56a83b76 Libraries: Use default constructors/destructors in LibGfx
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 17:23:49 +00:00
Lenny Maiorani
c37820b898 Libraries: Use default constructors/destructors in LibWeb
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 17:23:49 +00:00
Timothy Flynn
c0dd188c4d LibTimeZone: Update to TZDB version 2022a
https://mm.icann.org/pipermail/tz-announce/2022-March/000070.html
2022-03-17 16:38:33 +00:00
Maciej
a95794a356 LibGUI: Clamp selection when drag-selecting over out of range area 2022-03-17 17:05:56 +01:00
Maciej
bee9cd2113 LibGUI: Update active glyph when drag-selecting in GlyphMapWidget
This matches behavior of text selecting
2022-03-17 17:05:56 +01:00
Maciej
d3836f982a LibGUI: Use different color for GlyphMapWidget background
This patch makes background a bit darkened so that it is possible to
distinguish out of range area from glyphs that are just not drawn.

The default background color is also changed to Window so that it looks
good in more themes.
2022-03-17 17:05:56 +01:00
Timothy Flynn
157d16f049 LibJS: Update specification steps for RegExp Match Indices
This proposal was implemented in Stage 3 in commit:
6c67de8186

It is now Stage 4 and has been merged into the main ECMA-262 spec:
https://github.com/tc39/ecma262/commit/0209d85
2022-03-17 11:29:51 -04:00
djwisdom
3016ccba18 Base+Fonts: Applied recommended fixes to fonts 2022-03-17 11:07:08 +01:00
djwisdom
d7ba802c81 Base+Fonts: Add Satori Mono and update Satori fonts 2022-03-17 11:07:08 +01:00
Itamar
09bdd844b4 Utilities: Remove redundant program name element in Core::command() call
This removes a redundant program name element from the arguments Vector
in calls to Core::command().

The Shell's argument parsing logic tolerated the extra argument,
until 83609ad.
2022-03-17 12:32:59 +03:30
Itamar
45788d030a HackStudio: Remove program name element in Core::command() calls
Core::command() takes care of inserting the program name as the first
element in argv, and so we shouldn't include the program name in the
argument vector we give it.

The Shell's argument parsing logic tolerated the extra argument,
until 83609ad.

This fixes building serenity components in Hack Studio.
2022-03-17 12:32:59 +03:30
Ali Mohammad Pur
f27c48d707 Meta: Copy wasm results to the right file
Hopefully for the last time, copy the results to the right file.
2022-03-17 11:25:52 +03:30
Lenny Maiorani
190cf1507b Kernel: Use default constructors/destructors
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules

"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-17 00:51:36 -07:00
Andreas Kling
68f75ab98e LibWeb: :checked should only match inputs in checkbox/radio type state
We were erroneously allowing :checked to match any input element.
2022-03-16 23:29:17 +01:00
Andreas Kling
a403086940 LibWeb: Schedule a relayout after <image> and <object> elements load
Otherwise we'll be stuck with the intrinsic dimensions of the
replacement content.
2022-03-16 23:13:05 +01:00
Andreas Kling
be5f0b5ac4 LibWeb: Move text fragment painting to PaintableWithLines
All the other painting code has moved to paintables already.
2022-03-16 23:13:05 +01:00
Simon Wanner
7969161f07 LibWeb: Implement window.name
Right now the only functionality supported is getting/setting via JS
and resetting when browsing cross origin.

The HTML Specification (7.11 Browsing the web) also specifies how the
name should be restored from history entries, but we don't have those
yet.
2022-03-16 21:49:54 +00:00
Linus Groh
619794dfa7 LibJS: Fix fraction substring in ParseTimeZoneOffsetString
This is a normative change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/97d553c
- https://github.com/tc39/proposal-temporal/commit/d53af7f

Note that we already implemented this correctly, so the only change is
updating the spec comment.
2022-03-16 21:49:38 +00:00
Linus Groh
356fa2dca1 LibJS: Remove unused code in DifferenceISODate
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/056f695
2022-03-16 21:49:38 +00:00
Linus Groh
2ad69d789b LibJS: Remove the ConstrainToRange AO
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/537b3e6
2022-03-16 21:49:38 +00:00
Linus Groh
1521c5f55c LibJS: Remove argument type assertion from ParseTemporalDurationString
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/8615b41
2022-03-16 21:49:38 +00:00
Linus Groh
0c22a7f822 LibJS: Assume Get() on the result of PrepareTemporalFields can't fail
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/980e168
2022-03-16 21:49:38 +00:00
Sam Atkins
7c4402ba92 LibWeb: Evaluate no-preference media-features as false
As noted, this is not 100% to the spec, but effectively the same -
`no-preference` is only allowed to appear in features that evaluate it
as false in a boolean context. This is also the only identifier besides
`none` that evaluates to false. If other identifiers gain this property
in the future, we can make it more robust then.
2022-03-16 22:07:53 +01:00
Sam Atkins
aa48dda3a4 LibWeb: Add missing MEDIAQUERIES-5 media-features
This adds (or at least stubs-out) the following:
- display-mode
- dynamic-range
- environment-blending
- forced-colors
- horizontal-viewport-segments
- vertical-viewport-segments
- inverted-colors
- nav-controls
- prefers-contrast
- prefers-reduced-data
- prefers-reduced-motion
- prefers-reduced-transparency
- scripting
- video-color-gamut
- video-dynamic-range

The `@media (inverted-colors)` CSS that the spec requires we add to the
UA style sheet does not actually do anything for us yet since we don't
support `filter`, but it seemed sensible to include it now to avoid
forgetting later. :^)
2022-03-16 22:07:53 +01:00
Sam Atkins
84a06a1209 LibWeb: Add MEDIAQUERIES-5 identifiers
Sorting the whole list also moved `interlace` by a couple of places.
2022-03-16 22:07:53 +01:00
Tobias Christiansen
e8be8f7b6d PixelPaint: Add Timer for displaying previews of filters
This way the preview image is not generated on _every_ update_preview()
call but rather only if the last update_preview() was longer than 100ms
ago.
When rapidly moving the Slider for large blur values in the
FastBoxBlurFilter with the Gaussian approximation the usage became
noticeably sliggush because we queued a lot of preview generation just
to throw it away immediately. This patch fixes that.
2022-03-16 21:45:31 +01:00
Andreas Kling
d71b0e4638 LibWeb: Don't discard update_style_recursively() return value
This was causing us to miss layout invalidations. With this fixed, we
can remove the invalidation from Element::recompute_style() along with
the associated FIXME.

Thanks to Idan for spotting this! :^)
2022-03-16 21:30:39 +01:00
Andreas Kling
bec0c96aea LibWeb: Mark a bunch of CSS border-* properties as not affecting layout
border*-width and border-collapse affect layout, but all the color,
style and radius ones will only need a repaint if changed. :^)
2022-03-16 21:30:04 +01:00
Simon Wanner
cc77bb5067 LibJS: Relax line and column number restrictions in Error stack tests 2022-03-16 18:55:55 +00:00
Andreas Kling
aaed7b11f8 LibWeb: Mark all text-decoration* CSS properties as not affecting layout 2022-03-16 19:16:45 +01:00
Andreas Kling
ccc37032a4 LibWeb: Don't call establishes_stacking_context() during painting
By the time we're painting, we've already built the stacking context
tree. So instead of asking if a box establishes a stacking context, we
can ask if its paintable *has* a stacking context.

This was taking up ~6% of the profile when mousing around on the HTML
specification. With this change, it disappears completely. :^)
2022-03-16 19:16:45 +01:00
Linus Groh
e31d1620a8 LibPthread: Define SEM_FAILED in semaphore.h
This makes the _multiprocessing module from the Python port build. :^)
2022-03-16 18:03:52 +00:00
Linus Groh
9882848e0b Kernel: Define IF_NAMESIZE in net/if.h
This makes the _socket module from the Python port build. :^)
2022-03-16 18:03:25 +00:00