summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/WebContentClient.cpp
AgeCommit message (Collapse)Author
2021-09-13LibWeb: Add the Web::URL namespace and move URLEncoder to itIdan Horowitz
This namespace will be used for all interfaces defined in the URL specification, like URL and URLSearchParams. This has the unfortunate side-effect of requiring us to use the fully qualified AK::URL name whenever we want to refer to the AK class, so this commit also fixes all such references.
2021-09-11LibWeb+WebContent: Add WebContentClient::did_request_scroll_to() callSam Atkins
This call sets the absolute scroll position for the window.
2021-09-11LibWeb+WebContent: Modify did_request_scroll() IPC to take x&y deltasSam Atkins
This is in preparation for implementing JS scrolling functions, which specify both x and y scrolling deltas. The visible behavior has not changed. Also, moved the "mouse wheel delta * 20" calculation to the `EventHandler` since the JS calls will want to work directly in pixels.
2021-09-06LibWeb+WebContent: Remove old console-logging IPC callsSam Atkins
This patch removes the following WebContent IPC calls, which are no longer used: - `Server::js_console_initialize()` - `Client::did_js_console_output()`
2021-09-06LibWeb+WebContent: Add new console-message IPC callsSam Atkins
This patch introduces three new IPC calls for WebContent: - `Client::did_output_js_console_message(index)`: Notifies the client that a new console message was logged. - `Server::js_console_request_messages(start_index)`: Ask the server for console messages starting at the given index. - `Client::did_get_js_console_messages(start_index, types, messages)`: Send the client the messages they requested. This mechanism will replace the current `Client::did_js_console_output()` call in the next few commits. This will allow us to display messages in the console that happened before the console was opened.
2021-09-02LibWeb+WebContent: Implement asynchronous DOM Node properties callSam Atkins
This lets us "push" a new style-properties list to the DOM Inspector, for example when JS changes the style of the inspected node.
2021-06-29LibWeb+WebContent: Add IPC flow for Inspect DOM TreeAdam Hodgen
Add `inspect_dom_tree` to WebContentServer and 'did_get_dom_tree' to WebContentClient. These two async methods form a request & response for requesting a JSON representation of the Content's DOM tree.
2021-05-23LibIPC: Remove unnecessary IPC::ServerConnection::handshake()Andreas Kling
This is no longer used by any of our IPC pairs.
2021-05-23WebContent: Remove unnecessary greet() messageAndreas Kling
2021-05-03Userland: Use snake case names in .ipc filesGunnar Beutner
This updates all .ipc files to have snake case names for IPC methods.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-03Userland: Change IPC funcs to use plain arguments instead of a structGunnar Beutner
Instead of having a single overloaded handle method each method gets its own unique method name now.
2021-05-02Userland: Make IPC handlers return void if they don't have any outputsGunnar Beutner
2021-05-02Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlersGunnar Beutner
2021-05-01Everywhere: Turn #if *_DEBUG into dbgln_if/if constexprGunnar Beutner
2021-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-16Browser+LibWeb+WebContent: Parse cookies in the OOP tabTimothy Flynn
To protect the main Browser process against nefarious cookies, parse the cookies out-of-process and then send the parsed result over IPC to the main process. This way, if the cookie parser blows up, only that tab will be affected.
2021-04-14Browser+LibWeb+WebContent: Track the source of document.cookie requestsTimothy Flynn
To implement the HttpOnly attribute, the CookieJar needs to know where a request originated from. Namely, it needs to distinguish between HTTP / non-HTTP (i.e. JavaScript) requests. When the HttpOnly attribute is set, requests from JavaScript are to be blocked.
2021-04-11LibWeb+WebContent: Hook document.cookie to the backend cookie storageTimothy Flynn
2021-04-11LibWeb+WebContent: Support image context menus in OOPWVAndreas Kling
You can now right-click images in web content and get a context menu.
2021-03-30LibWeb+WebContent: Support displaying tooltips in OOPWVTimothy Flynn
2021-03-26LibWeb+WebContent: Support displaying favicons in OOPWVTimothy Flynn
In single process mode, the browser will display a page's favicon in both the location bar and tab. This adds the same support for multi- process mode.
2021-03-02LibWeb: Handle scrolling an OutOfProcessWebViewAngus Gibson
When a mousewheel scroll event isn't handled by the web content itself (e.g. an overflowed box or similar), the event needs to get passed back up to the OutOfProcessWebView.
2021-02-28LibWeb: Support setting the cursor in OutOfProcessWebViewAdam Hodgen
2021-02-28LibWeb: Add in all of the plumbing required to use the JS console over IPCBrandon Scott
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-23LibWeb: Added get source functionality and hook eventBrandon Scott
2021-02-20LibWeb: Implement Window.prompt()Linus Groh
2021-02-10LibWeb+WebContent: Support window.confirm() in OOPWVAndreas Kling
2021-02-08Everywhere: Replace dbgln<flag>(...) with dbgln_if(flag, ...)AnotherTest
Replacement made by `find Kernel Userland -name '*.h' -o -name '*.cpp' | sed -i -Ee 's/dbgln\b<(\w+)>\(/dbgln_if(\1, /g'`
2021-02-01LibIPC: Stop sending client ID to clientsAndreas Kling
The client ID is not useful to normal clients anymore, so stop telling everyone what their ID is.
2021-01-31LibIPC: Stop exchanging client/server PIDs in greeting handshakeAndreas Kling
The PIDs were used for sharing shbufs between processes, but now that we have migrated to file descriptor passing, we no longer need to know the PID of the other side.
2021-01-30LibWeb: Handle WebContent process crashes gracefully :^)Andreas Kling
The OOPWV will now detect WebContent process crashes/disconnections and simply create a new WebContent process in its place. We also generate a little error page with a link to the crashing URL so you can reload and try again. This a huge step forward for OOPWV since it now has a feature that IPWV can never replicate. :^)
2021-01-25Everywhere: Debug macros instead of constexpr.asynts
This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/dbgln<debug_([a-z_]+)>/dbgln<\U\1_DEBUG>/' {} \; find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/if constexpr \(debug_([a-z0-9_]+)/if constexpr \(\U\1_DEBUG/' {} \;
2021-01-25Everywhere: Name debug macros more consistently.asynts
Personally, I prefer the naming convention DEBUG_FOO over FOO_DEBUG, but the majority of the debug macros are already named in the latter naming convention, so I just enforce consistency here. This was done with the following script: find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/DEBUG_PATH/PATH_DEBUG/' {} \;
2021-01-25Everywhere: Use CMake to generate AK/Debug.h.asynts
This was done with the help of several scripts, I dump them here to easily find them later: awk '/#ifdef/ { print "#cmakedefine01 "$2 }' AK/Debug.h.in for debug_macro in $(awk '/#ifdef/ { print $2 }' AK/Debug.h.in) do find . \( -name '*.cpp' -o -name '*.h' -o -name '*.in' \) -not -path './Toolchain/*' -not -path './Build/*' -exec sed -i -E 's/#ifdef '$debug_macro'/#if '$debug_macro'/' {} \; done # Remember to remove WRAPPER_GERNERATOR_DEBUG from the list. awk '/#cmake/ { print "set("$2" ON)" }' AK/Debug.h.in
2021-01-22Everywhere: Replace a bundle of dbg with dbgln.asynts
These changes are arbitrarily divided into multiple commits to make it easier to find potentially introduced bugs with git bisect.
2021-01-16LibWeb+WebContent: Use anonymous files for OOPWV backing storesAndreas Kling
To support this, the GUI process and the WebContent service will now coordinate their backing store bitmaps. Each backing store can be referred to by a serial ID, and we don't need to keep resending it as a file descriptor. We should probably do something similar in WindowServer. :^)
2021-01-16Everywhere: Remove a bunch of <AK/SharedBuffer.h> includesAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling