Commit graph

40821 commits

Author SHA1 Message Date
Arun Nanduri
e268316865 Documentation: Amend comment describing use of "virtual" and "final" 2022-09-06 19:15:54 +00:00
electrikmilk
325a8a3d9b Base: Match colors for C++ file type icons
Update the color of the 16x16 version of the C++ file icon to match the
new colors in the 32x32 version of the icon.
2022-09-06 18:44:02 +00:00
electrikmilk
a0e3289cf3 Base: Add CMakeLists file type icon
This adds a file icon for CMakeLists.txt files.
2022-09-06 18:06:57 +01:00
Jelle Raaijmakers
15a9fca461 LibGfx: Correctly shift pixels during bilinear blend
Our bilinear scaling logic worked well for upscaling, but during
downscaling the bitmap was often shifted one pixel to the bottom right.

This is a common problem, described here in more detail:

  https://bartwronski.com/2021/02/15/bilinear-down-upsampling-pixel-grids-and-that-half-pixel-offset/

Fix it by calculating coordinate shift values that align the pixel's
boundaries between the source and target pixels before selecting the
source pixels to interpolate.
2022-09-06 18:00:50 +01:00
networkException
178164808c Calendar: Limit the starting day input range to the selected month
Previously we allowed entering any day value greater than one. With this
patch the maximum input value is dynamic based on the selected month and
year.
2022-09-06 17:37:44 +01:00
networkException
5b46d16b4d LibGUI: Update {in,de}crement buttons when setting a new spin box range 2022-09-06 17:37:44 +01:00
Andreas Kling
43f87c67f2 LibWeb: Remove unused WindowObject.h 2022-09-06 13:54:49 +02:00
electrikmilk
1ab510c4bb Base+LibGUI: Add Git folder icons
This adds icons for folder paths ending in ".git". This adds 16x16 and
32x32 versions of a folder with a Git logo for both the closed and open
versions of the folder icon.
2022-09-06 07:38:09 +01:00
electrikmilk
ce166785d7 Base: Add Git file type icons
This adds 16x16 and 32x32 Git file icons for files like .gitignore, etc.
2022-09-06 07:38:09 +01:00
Andreas Kling
d13d571844 LibJS: Make sure JS::Script visits its HostDefined object
This allows JS::Script to mark its corresponding HTML::Script, even if
it's a little roundabout looking. Fixes an issue where the JS::Script
was kept alive by the execution stack, but the HTML::Script was gone.

This was originally part of 8f9ed415a0
but got lost in a merging accident.
2022-09-06 01:21:09 +02:00
Andreas Kling
88f2f50c55 LibWeb: Don't use the internal window object when parsing HTML fragments
Instead, use the window object from the context element. This fixes an
issue where activating event handlers during fragment parsing would try
to set up callbacks using the internal window object's ESO.

This caused a verify_cast crash on Google Maps, since the internal realm
doesn't have an associated ESO. Perhaps it should, but in this specific
case, it makes more sense for fragment parsing to fully adopt the
context provided.
2022-09-06 01:12:44 +02:00
Andreas Kling
4c665c3749 LibWeb: Remove some unnecessary use of the internal realm in EventTarget
Now that EventTarget is GC-allocated, it can find the GC heap by just
calling heap() on itself, no need to get this via the internal realm.
2022-09-06 01:07:59 +02:00
Andreas Kling
8f9ed415a0 LibJS+LibWeb: Make HTML::Script GC-allocated
This allows the garbage collector to keep HTML::Script objects alive and
fixes a bug where a HTMLScriptElement could get GC'd while its code was
executing.
2022-09-06 00:27:09 +02:00
Andreas Kling
00c8f07192 LibJS: Make Script and Module GC-allocated
This ensures that code currently in any active or saved execution stack
always stays alive.
2022-09-06 00:27:09 +02:00
Andreas Kling
cb15132146 LibWeb: Always allow scripting in workers for now
Workers don't have a document, so we can't ask them if scripting is
enabled or not. This is not the right long-term fix, but it fixes an
assertion when trying to query the missing responsible document of a
web worker.
2022-09-06 00:27:09 +02:00
Andreas Kling
e97cc671ea LibWeb: Give web workers a (totally hacky) Window object
This is *not* according to spec, however we currently store prototypes
and constructors on Window, so the only way for objects in a worker
context to become fully formed is to make a Window.

Long-term we should clean this up and remove the worker window object,
but for now it allows workers to exist without asserting.
2022-09-06 00:27:09 +02:00
Andreas Kling
ddc018fb75 LibWeb: Use fully qualified type names in the IDL generator more
There are still some remaining cases where generated code depends on the
existence of FooWrapper => Web::NS::Foo mappings. Fixing those will
require figuring out the appropriate namespace for all IDL types, not
just the currently parsed interface.
2022-09-06 00:27:09 +02:00
Andreas Kling
8f110e0fb1 LibWeb: Remove the NoInstanceWrapper extended IDL attribute
No interfaces require wrappers anymore, so we can just make this the
default mode.
2022-09-06 00:27:09 +02:00
Andreas Kling
1bd4ad8b6d LibWeb: Remove now-unused Bindings::wrap() 2022-09-06 00:27:09 +02:00
Andreas Kling
266136b32f LibWeb: Stop using Bindings::wrap() in generated code 2022-09-06 00:27:09 +02:00
Andreas Kling
9176a0de99 LibWeb: Stop using Bindings::wrap() in a bunch of places
wrap() is now basically a no-op so we should stop using it everywhere
and eventually remove it. This patch removes uses of wrap() in
non-generated code.
2022-09-06 00:27:09 +02:00
Andreas Kling
45425de849 LibWeb: Use the WRAPPER_HACK() macro instead of hand-coding wrap()
This macro will soon go away, but let's start by replacing all the
hand-coded versions of wrap() with this macro that expands to the same
exact thing.
2022-09-06 00:27:09 +02:00
Andreas Kling
bc74909308 LibWeb: Remove many unnecessary #includes in generated code 2022-09-06 00:27:09 +02:00
Andreas Kling
39660a8680 LibWeb: Remove now-unused Bindings::Wrapper class 2022-09-06 00:27:09 +02:00
Andreas Kling
3768743a0a LibWeb: Remove now-unused Bindings::Wrappable class 2022-09-06 00:27:09 +02:00
Andreas Kling
b1b5d75ce6 LibWeb: Remove now-unused wrapper and iterator code generators
These are no longer used, as all wrappers have been folded into their
corresponding C++ objects.
2022-09-06 00:27:09 +02:00
Andreas Kling
5c9441799f LibWeb: Remove CMake target for wrapper cpp and h files 2022-09-06 00:27:09 +02:00
Andreas Kling
ac274eee72 LibWeb: Remove the NO_INSTANCE option now that all wrappers are gone 2022-09-06 00:27:09 +02:00
Andreas Kling
497ead37bc LibWeb: Make DOMException GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
0e47754ac8 LibWeb: Make LocationObject a PlatformObject 2022-09-06 00:27:09 +02:00
Andreas Kling
2fe97fa8db LibWeb: Make WorkerNavigator GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
9da72cdaba LibWeb: Make WorkerLocation GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
25daa14a05 LibWeb: Make IntersectionObserver GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
fe9c5395d4 LibWeb: Make URL, URLSearchParams & URLSearchParamsIterator GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
0dc2c27fa3 LibWeb: Make ResizeObserver GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
915a240944 LibWeb: Make IdleDeadline GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
8f2a711132 LibWeb: Make Selection GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
be9d3860b9 LibWeb: Make Crypto GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
96f6c7fae5 LibWeb: Make Headers and HeadersIterator GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
a8a42b4432 LibWeb: Don't build iterator wrapper for NO_INSTANCE classes 2022-09-06 00:27:09 +02:00
Andreas Kling
647ac1bdba LibWeb: Make Blob and File GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
018d236439 LibWeb: Make TextDecoder GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
7e508456a0 LibWeb: Make TextEncoder GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
57db2529cf LibWeb: Make DOMRect, DOMRectReadOnly and DOMRectList GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
44415af428 LibWeb: Make DOMPoint and DOMPointReadOnly GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
a9cae56f8e LibWeb: Remove unused HTML::Window::create_with_document() 2022-09-06 00:27:09 +02:00
Andreas Kling
7a9b8ced38 LibWeb: Make SubtleCrypto GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
2ac8e3db3a LibWeb: Make Storage GC-allocated 2022-09-06 00:27:09 +02:00
Andreas Kling
d7c6298d8b LibWeb: Use target's global object when creating focus/blur events 2022-09-06 00:27:09 +02:00
Andreas Kling
05dcf3b2f8 LibWeb: Don't allocate DOMStringMap in HTMLElement constructor
Allocations go in initialize().
2022-09-06 00:27:09 +02:00