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
Luke Wilde
7b635998a8
LibWeb: Make Window.screen a replaceable attribute
...
Required by Shadertoy.
2023-03-03 22:27:49 +00:00
Sam Atkins
c7736ef410
LibWeb: Add some folding regions to HTML syntax highlighter
...
This adds the regions generated from embedded CSS and JS, and also for
HTML block comments.
The glaring omission is that we don't add them for start/end tags. HTML
allows start and end tags to not always match up, and I believe that's
going to require some variation on the adoption-agency algorithm to
make it work correctly.
2023-03-03 21:56:42 +01:00
Linus Groh
11b40dbcf5
LibWeb/WebIDL: Store SimpleException message as a String{,View} variant
2023-03-03 19:50:36 +00:00
Linus Groh
2d7ce38ee2
LibWeb/MimeSniff: Port MimeType to new String
2023-03-03 11:02:21 +00:00
Linus Groh
fabea2a6a7
LibWeb/MimeSniff: Rename MimeType::from_string() to MimeType::parse()
...
This matches the spec's "parse a MIME type".
2023-03-03 11:02:21 +00:00
MacDue
7bd78d40e9
LibGfx+LibWeb: Propagate OOM when appending CanvasGradient color stops
2023-03-02 11:49:13 +01:00