summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-03-07WebDriver: Defer removing closed window handles until no longer neededTimothy Flynn
WebDriver::Session::close_window may invoke Session::stop, which needs the WebContent connection to still exist. Do not remove the window's handle (thus destroying the connection) until it is no longer needed.
2023-03-07LibWeb: Mark Web::WebDriver::Response as [[nodiscard]]Timothy Flynn
2023-03-07WebDriver: Do not ignore the result of closing a sessionTimothy Flynn
2023-03-07WebDriver: Keep WebDriver socket listening until session endAliaksandr Kalenik
WebDriver socket should not be closed as soon as first client got connected becaused there might more than one WebContent process spawned by browser.
2023-03-07WebContent+WebDriver: Move window commands handling back to WebDriverAliaksandr Kalenik
With current architecture every window has its own WebContent process and there is one WebDriver process that is responsible for talking to all opened windows. It thus make sense to manage open windows from WebDriver process instead of WebContent process that is not supposed to know about all other opened WebContent processes. This mostly reverts 826d5f8f9ab0e28606a0d07847056bd6562ebc49 but also adds `web_content_connection` to window structure and window id generation (currently out of spec). With these changes `get_window_handles`, `switch_to_window` and `close_window` start to actually switch, close and returned handles of currently opened windows.
2023-03-07LibWeb: Refactor XHR (almost) exactly to the specLuke Wilde
This makes XHR now rely on Fetch, which allows it to correct send Origin and Referer headers, CORS-preflight and filtering and many other goodies. The main thing that's missing is Streams, which means we can't properly produce progress events or switch to the Loading ready state. This also doesn't implement the Document responseType just yet.
2023-03-07LibWeb: Convert Platform::Timer to JS::SafeFunctionLuke Wilde
2023-03-07LibJS: Fix compilation of operator= for JS::SafeFunctionLuke Wilde
operator= for JS::SafeFunction was missing the CallableKind parameter in the call to init_with_callable. This was not picked up before as nothing used operator= on JS::SafeFunction.
2023-03-07LibWeb: Add function to EventTarget that says if it has any listenersLuke Wilde
Required by XHR to determine if it should use CORS-preflight if its upload object has any event listeners.
2023-03-07LibWeb/Fetch: Set length synchronously in extract_bodyLuke Wilde
Since we don't currently have streams, we didn't set length anywhere. However, this is required by XHR's reliance on Fetch to get the total number of bytes for the progress events.
2023-03-07LibWeb: Fully read body if there is one in fetch response handoverLuke Wilde
Required by XHR's reliance on Fetch.
2023-03-07LibWeb/Fetch: Implement Header's "extract a length" functionLuke Wilde
Required by XHR's reliance on Fetch.
2023-03-07LibWeb/Fetch: Implement Body's "fully read" function from the specLuke Wilde
Required by XHR's reliance on Fetch.
2023-03-07LibWeb: Remove the dummy execution contextLuke Wilde
2023-03-07LibWeb: Make BC::set_system_visibility_state use the active doc's globalLuke Wilde
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-07LibWeb: Propagate Realm instead of VM more through FetchLuke Wilde
This makes Fetch rely less on using main_thread_vm().current_realm(), which relies on the dummy execution context if no JavaScript is currently running.
2023-03-07LibWeb: Remove CSS::Parser::ParsingContext's default constructorLuke Wilde
This relied on pulling the current realm from the main thread VM, which requires an execution context to be on the VM's stack. This heavily relied on the dummy execution context that is always on the stack, for example, when parsing the UA style sheets where no JavaScript is running.
2023-03-07Browser: Handle close event in WebContentViewAliaksandr Kalenik
2023-03-07LibWebView+WebContent: Propagate close from WebContent to LibWebViewAliaksandr Kalenik
2023-03-07Help: Don't defer tree view selection updatesMathis Wiehl
It is unsafe to defer this selection update, because ::open_url itself is called when users make selection updates, creating a race. This fixes and infinite selection change loop one could easily reproduce by holding an up or down arrow key in the tree view while clicking on a tree view item a couple of times.
2023-03-07Shell: Fix bogus C-style casts from `NonnullOwnPtr<T>*` to `T*`Andreas Kling
Thanks UBSAN for spotting this!
2023-03-06LibWeb/HighResolutionTime: Add IDL typedef for DOMHighResTimeStampLinus Groh
We already have this for C++ code in DOMHighResTimeStamp.h, but let's also avoid using plain 'double' in IDL code.
2023-03-07LibWeb: Propagate errors from CSS Parser constructionSam Atkins
This requires Parser to be movable, so we remove the `default` destructors from Parser and TokenStream, and give them both move constructors. Since TokenStream only holds a reference to its tokens, (and it needs to, to avoid copying when given eg a function's contents,) we add a manual move constructor for Parser which creates a new TokenStream from the new Parser's tokens, and then manually copies the old TokenStream's state.
2023-03-07LibWeb: Use free functions for parsing in `@Supports`Sam Atkins
2023-03-07LibWeb: Propagate errors from CSS TokenizerSam Atkins
2023-03-07LibWeb: Propagate errors from CSS Tokenizer constructionSam Atkins
Instead of constructing a Tokenizer and then calling parse() on it, we now call `Tokenizer::tokenize(...)` directly. (Renamed from `parse()` because this is a Tokenizer, not a Parser.)
2023-03-07man: Skip shellrc when invoking pager using shMathis Wiehl
man invokes the pager command via `sh` which, since beaae6b420cbe85a2d382f8f75447fb49514c20f launches `Shell` in posix mode. As the referenced commits message indicates, launching `Shell` in posix mode while interactive, makes it choke on the default `.shellrc`. This made `man` spew out some shell syntax errors to stderr every time it invoked the pager. To fix that, invoke `sh` with `--skip-shellrc` for now as suggested by the aforementioned commit.
2023-03-06Settings: Remove outdated comment about NonnullPtrVectorAndreas Kling
2023-03-06Assistant: Remove outdated comment about NonnullPtrVectorAndreas Kling
2023-03-06Screensaver: Remove outdated comment about NonnullPtrVectorAndreas Kling
2023-03-06LibCpp: Remove Nonnull*PtrVector from list of known SerenityOS typesAndreas Kling
2023-03-06Kernel: Stop using NonnullLockRefPtrVectorAndreas Kling
2023-03-06Everywhere: Remove NonnullOwnPtr.h includesAndreas Kling
2023-03-06Everywhere: Stop using NonnullOwnPtrVectorAndreas Kling
Same as NonnullRefPtrVector: weird semantics, questionable benefits.
2023-03-06Everywhere: Remove NonnullRefPtr.h includesAndreas Kling
2023-03-06LibWeb: Stop using NonnullRefPtrVector for StyleValueVectorAndreas Kling
2023-03-06Everywhere: Stop using NonnullRefPtrVectorAndreas Kling
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-06less: Stop adding extra blank linesSam Atkins
Each time we wrapped a line, we were appending an extra blank span which wasn't needed. This was leading to an extra blank line after every single line.
2023-03-06VideoPlayer: Create submenu to set sizing modetimre13
Also add icon to the sizing mode cycling button.
2023-03-06LibJS: Enforce proper const-propogation with {Nonnull,}GCPtrMatthew Olsson
2023-03-06LibWeb: Fix a few const-ness issuesMatthew Olsson
2023-03-06LibJS: Handle both const and non-const Ts in Handle<T>::create()Matthew Olsson
Again, the const-ness only really involves Heap-internal metadata, so the callers shouldn't care about mutations here.
2023-03-06LibJS: Fix a few const-ness issuesMatthew Olsson
2023-03-06LibJS: Accept const GCPtrs in Cell::VisitorMatthew Olsson
The const_cast in these methods should be fine since the object really only needs to be mutable so it's Heap-internal metadata can be altered.
2023-03-06LibJS: Use a forwarding reference in ThrowCompletion constructorMatthew Olsson
This avoids compiler complaints when trying to use const types
2023-03-06LibJS: Temporarily disambiguate const-ness of GCPtr constructorsMatthew Olsson
Without this change, using {Nonnull,}GCPtr<T const> would complain that there are multiple constructors which resolve to the same type (T& and T const&). This removes that disambiguation and allows us to slowly fix all of the constness issues surrounding GCPtrs. This change will not be necessary in the future as we will be able to remove all of the const qualifiers from the Ptr classes (they'll be in the template type instead).
2023-03-06WebContent: Add missing LibGfx includeMatthew Olsson
2023-03-06Browser: Add a missing include in InspectorWidgetMatthew Olsson
2023-03-06LibJS+LibWeb: Add a bunch of missing includesMatthew Olsson
2023-03-06LibGfx: Remove unnecessary AK:: prefix in VectorN.hMatthew Olsson