Linus Groh
8c0f0726d1
LibWeb/HTML: Include the WindowOrWorkerGlobalScope mixin in Window.idl
2023-03-07 23:33:34 +00:00
Linus Groh
6dd1934ed8
LibWeb/HTML: Port Window.atob() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
192f5e61f6
LibWeb/HTML: Port Window.btoa() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
94f1eff291
LibWeb/HTML: Port Window.isSecureContext to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
188aac5077
LibWeb/HTML: Port Window.origin to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
376fb9ae40
LibWeb/HTML: Hook up WindowOrWorkerGlobalScopeMixin to Window
...
This prepares us to use the shared implementations from this class.
2023-03-07 23:33:34 +00:00
Linus Groh
b2409517bd
LibWeb/HTML: Port Window.open() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
efa48142d2
LibWeb/HTML: Port Window.frameElement to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
c6353ac8cd
LibWeb/HTML: Port Window.parent to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
dba8dbe07d
LibWeb/HTML: Port Window.top to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
baaf891c64
LibWeb/HTML: Port Window.length to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
c42496187b
LibWeb/HTML: Port Window.history to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
eccc0d90de
LibWeb/HTML: Port Window.location to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
0e40841990
LibWeb/HTML: Port Window.name to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
0e587420a8
LibWeb/HTML: Port Window.document to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
dcff775ab1
LibWeb/HTML: Port Window.frames to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
437a7c977e
LibWeb/HTML: Port Window.self to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
d57876306c
LibWeb/HTML: Port Window.window to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
eb2425040b
LibWeb/HTML: Port Window.navigator to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
c219e6d9c1
LibWeb/HTML: Port Window.postMessage() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
eb4842dfa1
LibWeb/HTML: Port Window.prompt() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
bbffda5f55
LibWeb/HTML: Port Window.confirm() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
a0b73eb5f7
LibWeb/HTML: Port Window.alert() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
a6f8b18649
LibWeb/HTML: Define Window's {Global,Window}EventHandlers via IDL
2023-03-07 23:33:34 +00:00
Linus Groh
c130fd6993
LibWeb: Start generating code for the Window object from IDL :^)
2023-03-07 23:33:34 +00:00
Linus Groh
de83f5422d
LibWeb: Generate Window{Constructor,Prototype} from IDL
...
The Window object is massive, so let's do the conversion to IDL step
by step. First up: getting rid of the manual constructor and prototype
definitions, which can be generated from an empty `interface Window`.
2023-03-07 23:33:34 +00:00
Luke Wilde
cdc77407bf
LibWeb: Make WindowOrWorkerGlobalScope#atob use forgiving base64 decode
...
This was forgotten to be changed when Window's atob was updated to use
forgiving base64 decode.
2023-03-07 18:45:12 +00:00
Luke Wilde
a1f7186153
LibWeb: Make BC::set_system_visibility_state use the active doc's global
...
Using main_thread_vm().current_realm() will rely on the dummy execution
context if the visibility state changes when no JavaScript is running.
2023-03-07 11:51:12 +00:00
Andreas Kling
689ca370d4
Everywhere: Remove NonnullRefPtr.h includes
2023-03-06 23:46:35 +01:00
Andreas Kling
8a48246ed1
Everywhere: Stop using NonnullRefPtrVector
...
This class had slightly confusing semantics and the added weirdness
doesn't seem worth it just so we can say "." instead of "->" when
iterating over a vector of NNRPs.
This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
2023-03-06 23:46:35 +01:00
Matthew Olsson
c0b2fa74ac
LibWeb: Fix a few const-ness issues
2023-03-06 13:05:43 +00:00
Matthew Olsson
70a2ca7fc0
LibJS: Handle both const and non-const Ts in Handle<T>::create()
...
Again, the const-ness only really involves Heap-internal metadata, so
the callers shouldn't care about mutations here.
2023-03-06 13:05:43 +00:00
Matthew Olsson
bab883bf8e
LibJS+LibWeb: Add a bunch of missing includes
2023-03-06 13:05:43 +00:00
Matthew Olsson
445011d50d
LibWeb: Fix include cycle between ModuleScript.h and ModuleMap.h
2023-03-06 13:05:43 +00:00
Linus Groh
1a6b61b0cc
LibWeb/HTML: Move WindowOrWorkerGlobalScope code into a mixin class
...
This will allow us to easily share the implementations of these methods
between Window and WorkerGlobalScope. The mixin class mirrors what I
already did for the Fetch API's Body mixin in 5ad62833
.
2023-03-06 11:02:25 +00:00
Linus Groh
b118cc782e
LibWeb/HTML: Implement WorkerGlobalScope::cross_origin_isolated()
2023-03-06 11:02:25 +00:00
Linus Groh
ed15c34387
LibWeb/HTML: Implement WorkerGlobalScope::is_secure_context()
2023-03-06 11:02:25 +00:00
Linus Groh
d1a7c39e76
LibWeb/HTML: Implement WorkerGlobalScope::origin()
2023-03-06 11:02:25 +00:00
Linus Groh
cc1e8a4e9f
LibWeb/HTML: Propagate errors from Window::initialize_web_interfaces()
2023-03-05 21:22:34 +00:00
Kenneth Myhra
cec1cda8b0
LibWeb: Port SubmitEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
dd2d029952
LibWeb: Port PromiseRejectionEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
bb7ae423d5
LibWeb: Port FormDataEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
eed69e5093
LibWeb: Port MessageEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
84997ab0ee
LibWeb: Port ErrorEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
e661f03ffa
LibWeb: Port CloseEvent to new String
2023-03-05 18:25:59 +00:00
Kenneth Myhra
97947fdffa
LibWeb: Port PageTransitionEvent to new String
2023-03-05 18:25:59 +00:00
Linus Groh
bfe0df5677
LibWeb/HTML: Add missing SecurityError checks to Location
2023-03-04 23:27:08 +00:00
Linus Groh
0b8ebfb618
LibWeb/HTML: Replace ThrowCompletionOr with ExceptionOr in Location
...
The former should not be used in LibWeb unless required due to
overriding a JS::Object virtual method, for example.
2023-03-04 23:27:08 +00:00
Linus Groh
7d50be0b09
LibWeb/HTML: Port Location to new String
2023-03-04 23:27:08 +00:00
Linus Groh
93ed1b59c8
LibWeb/Infra: Port strip_and_collapse_whitespace() to new String
2023-03-04 23:27:08 +00:00