summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-05-16LibWebView: Remove the DumpLayoutTree programTimothy Flynn
This program's purpose is now achieved with headless-browser, which has the added benefit of being runnable outside of Serenity.
2023-05-16Browser: Move screenshot context menu actions above inspector actionsTimothy Flynn
Feels a bit more natural, at least to align with muscle memory from other browsers.
2023-05-16GMLPlayground: Keep view_frame_action around to prevent a crashSam Atkins
The `view_frame_action` variable only exists for the duration of `initialize_menubar()`, so calling it in `m_preview_window->on_close` would crash. This fixes that by storing the action pointer inside MainWidget. (And storing the `view_window_action` too because it felt weird storing one and not the other.)
2023-05-16LibWeb: Make text justification work between floatsAndreas Kling
While inline content between floating elements was broken correctly, text justification was still using the original amount of available space (without accounting for floats) when justifying fragments.
2023-05-16LibWeb: Rewrite calculation of available space between floatsAndreas Kling
This code now works in terms of *intrusion* by left and right side floats into a given box whose insides we're trying to layout. Previously, it worked in terms of space occupied by floats in the root box of the BFC they participated in. That created a bunch of edge cases since the code asking about the information wasn't operating in root coordinate space, but in the coordinate space of some arbitrarily nested block descendant of the root. This finally allows horizontal margins in the containing block chain to affect floats and nested content correctly, and it also allows us to remove a bogus workaround in InlineFormattingContext.
2023-05-16LibGfx: Make FontDatabase lookups case insensitiveAndreas Kling
This seems mostly harmless and matches what CSS expects from us at the moment. Eventually our CSS font selection will become more sophisticated and stop relying on Gfx::FontDatabase for things like this, but for now it's a simple stopgap that lets websites do "font-family: arial" :^)
2023-05-16LibWeb: Fix for absolutely positioned elements with specified heightAndi Gallo
Use inner height since the paintable adds padding back. Fixes #18842.
2023-05-16LibGUI: Actually set the first allowed file extension list in FilePickerKarol Kosek
Previously, the File Picker didn't activate the pre-selected filter.
2023-05-16GMLPlayground: Make 'Open' action start in the Application source folderKarol Kosek
Font Editor and Theme Editor already open the dialog in system folders (/res/fonts and /res/themes). To be fair, they do have a special folder just for their files, but I think this is good enough if you want to start hacking an app :^) Additionaly, this also adds a filter to show only .gml files by default.
2023-05-16GMLPlayground: Reuse request_close() in 'Open' and recent files actionsKarol Kosek
2023-05-16GMLPlayground: Use current file name in the 'Save as...' dialogKarol Kosek
Previously it was always "Untitled".
2023-05-16GMLPlayground: Use `try_make` for syntax highlighting and autocompleteKarol Kosek
2023-05-16GMLPlayground: Set parent window for preview windowKarol Kosek
Closing the main window didn't close the preview window along with it.
2023-05-16GMLPlayground: Remove one DeprecatedString usageKarol Kosek
2023-05-16GMLPlayground: Handle drop eventsKarol Kosek
2023-05-16GMLPlayground: Extract most logic into a MainWidget classKarol Kosek
2023-05-16GMLPlayground: Set file path when reading fileKarol Kosek
We weren't setting the path on the 'Open' action, which meant that a startup file name was always visible in the title bar (unless we save a file to a different path, or pick a file from the 'recent files' list). By setting it to update the stored file path in the load_file() function, it'll be guaranteed the file name will always be set. This also will add the startup opened file to the recently opened files list.
2023-05-16ping: Add -i option to specify the time to wait between packetsTim Ledbetter
2023-05-16ping: Add -q option to specify quiet modeTim Ledbetter
Quiet mode suppresses all output except the statistics shown before the program exits.
2023-05-16ps: Add `-u` option, to list processes associated with specified usersSam Atkins
2023-05-16ps: Perform filtering step before the output loopSam Atkins
Previously we did some of the filtering before the loop, and some inside it, which made things awkward to reason about. This also lets us avoid generating a TTY string for each process unless there's a column for it.
2023-05-16ps: Add `-p` option, and distinguish it from `-q`Sam Atkins
2023-05-16ps: Allow `-q` option multiple times, and separated by spaces or commasSam Atkins
Several differences here: - Passing `-q` multiple times will add them together, instead of the last one overwriting the previous ones. - `-q` PIDs can be separated by commas as well as spaces. - We check that the PIDs are integers while parsing the arguments, instead of later on. The "parse a list of things as an option" is extracted into a helper function, because we're going to want the same logic for `-g`, `-G`, `-p`, `-t`, `-u`, and `-U`.
2023-05-16ps: Add the `-a` option, to list all processes associated with terminalsSam Atkins
2023-05-16ps: Add the `-A` optionSam Atkins
This is identical to our existing `-e` option, but both are required by POSIX.
2023-05-16ps: Use Optional for column indices, instead of -1 meaning "not present"Sam Atkins
2023-05-16ps: Ensure columns capacity in advanceSam Atkins
Also use unchecked_append() in a couple of other places where we can.
2023-05-16ps: Migrate from DeprecatedString to StringSam Atkins
2023-05-16ps: Use Core::System::fstat()Sam Atkins
2023-05-16pgrep: Add -d option to specify a pid delimiterTim Ledbetter
This is useful for commands which expect a comma-separated list of pids.
2023-05-16Browser: Add a context menu for video elementsTimothy Flynn
This includes actions such as controlling play state, downloading the video, and opening the video in a new tab.
2023-05-16LibWeb+WebContent: Add APIs to control video playback stateTimothy Flynn
This allows for the browser process to control the play/pause state, whether we paint user agent controls on the video, and whether the video loops when it finishes playing.
2023-05-16Browser+LibWeb+WebContent: Broadcast video element context menu requestsTimothy Flynn
This just sets up the IPC to notify the browser process of context menu requests on video elements. The IPC contains a few pieces of information about the state of the video element.
2023-05-16LibWeb: Propagate non-primary mouse button clicks on video elementsTimothy Flynn
Otherwise, returning "no" here will disallow the browser process from showing a context menu, as the event handler will bail early.
2023-05-16LibCore: Support the WebM file extension when determining MIME typeTimothy Flynn
This enables, for example, navigating to a file:// URL in Ladybird with a .webm file extension.
2023-05-16LibVT: Correctly wrap text when the scrollbar is hiddennetworkException
2023-05-16LibJS/Bytecode: Implement initial support for super member expressionsLuke Wilde
2023-05-16LibWeb: Implement location.assignLuke Wilde
2023-05-16LibWeb: Skip frozen tracks while distributing space in GFCAliaksandr Kalenik
2023-05-16LibWeb: Reset item_incurred_increase before distributing space in GFCAliaksandr Kalenik
item_incurred_increase should be reset before every next distirbution because otherwise it will accumulate increases from previous distributions which is not supposed to happen.
2023-05-15LibWeb: Basic support for CSS `text-indent: <length-percentage>`Andreas Kling
Note that this simple form of text-indent only affects the first line of formatted content in each block. Percentages are resolved against the width of the block.
2023-05-15LibWeb: Make `processBodyError` take an optional exceptionSam Atkins
Changed here: https://github.com/whatwg/fetch/commit/018ac19838ade92324a1900113636a8bf98f3a1b
2023-05-15LibWeb: Do not layout grid items during grid container intrinsic sizingAliaksandr Kalenik
There is not need to run layout inside grid items for intrinsic sizing of grid container.
2023-05-15LibWeb: Fix specified_size_suggestion to use size of dimensionAliaksandr Kalenik
specified_size_suggestion() should use width or height depending on specified dimension.
2023-05-15LibWeb: Fix UBSAN issue caused by invalid TemporaryTrack pointer in GFCAliaksandr Kalenik
Fixes the issue when if there are enough rows/column to force m_row_gap_tracks or m_column_gap_tracks be resized during gaps initialization then pointers stored in m_grid_columns_and_gaps or m_grid_rows_and_gaps become invalid.
2023-05-15LibGUI: Fix bad title alignment in GroupBoxAndreas Kling
Make a separate rect for the text and use IntRect::centered_within() to sidestep any subpixel jitter. This way it looks good with both bitmap and vector fonts.
2023-05-15LibWeb: Cache state of the contenteditable attribute on HTMLElementAndreas Kling
Instead of recomputing the state whenever someone asks for it, we now cache it when the attribute is added/changed/removed. Before this change, HTMLElement::is_editable() was 6.5% of CPU time when furiously resizing Hacker News. After, it's less than 0.5%. :^)
2023-05-15LibWeb: Fix iframes flickering on window resizeAndreas Kling
After finishing layout, iframe layout boxes (FrameBox) get notified about their new size by LayoutState::commit(). This information is forwarded to the nested browsing context, where it can be used for layout of the nested document. The problem here was that we notified the FrameBox twice. Once when assigning the used offset to its paintable, and once when assigning its size. Because the offset was assigned first, we ended up telling the FrameBox "btw, your size is 0x0". This caused us to throw away all the layout information we had for the nested document. We'd then say "actually, your size is 300x200" (or something) but by then it was already too late, and we had to do a full relayout. This caused iframes to flicker as every time their containing document was laid out, we'd nuke the iframe layout and redo it (on a zero timer). The fix is pleasantly simple: we didn't need to inform the nested document of its offset in the containing document's layout anyway. Only its size is relevant. So we can simply remove the first call, which removes the bogus 0x0 temporary size. Note that iframes may still flicker if they change size in the containing document. That's a separate issue that will require more finesse to solve. However, this fixes a very noticeable common case.
2023-05-15WindowServer: Catch more Window stealing misbehaviorthankyouverycool
Previously it was possible for a window to register as a parentless blocking modal then add itself to a stealable parent's modal chain, bypassing a mode misbehavior check in create_window() Also relaxes reciprocity for blockers with the same parent. This scenario is usually created by simultaneous MessageBoxes. It's not an ideal UX to cascade these, but there's no need to crash over it.
2023-05-15LibGUI: Put a governor on Action activationthankyouverycool
Many actions affect Window modality, so let's put a temporary change governor on activation to stop race conditions. Fixes being able to spam open/close shortcuts and spawn multiple FilePickers, among other things.