summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-10-13LibWeb: Fix position: fixed canvases/images disappearing when scrollingMacDue
This fixes the Serenity logo vanishing after scrolling on the 4th birthday post. The previous check did not account for any translation in the painter. This now uses the painter's clip rect and translation to work out if a rect is visible. It also makes use of `absolute_paint_rect()` rather than `absolute_rect()` which can account for things like box-shadows.
2022-10-13Utilities: Add pkillMaxwell Trussell
2022-10-13LibWeb: Implement navigator.webdriverLinus Groh
This is defined via the NavigatorAutomationInformation interface mixin from the WebDriver spec: https://w3c.github.io/webdriver/#interface
2022-10-13LibWeb: Update Navigator.idl to use 4 spaces for indentationLinus Groh
2022-10-13Browser: Set 'webdriver-active flag' when creating a new TabLinus Groh
2022-10-13LibWeb+WebContent: Add plumbing for 'webdriver-active flag'Linus Groh
2022-10-12WebDriver: Implement `GET /session/{id}/url` endpointSam Atkins
2022-10-12WebDriver: Implement `GET /status` endpointSam Atkins
2022-10-12WebDriver: Add new WebDriver serviceSam Atkins
WebDriver aims to implement the WebDriver specification found at https://w3c.github.io/webdriver/webdriver-spec.html . It's an HTTP server that can create Browser sessions and control them. Co-authored-by: Florent Castelli <florent.castelli@gmail.com>
2022-10-12Browser: Add a basic WebDriver APISam Atkins
This adds a new option "--webdriver" that opens a local unix socket in /tmp/browser_{pid} which the WebDriver server can use to send commands to the Browser instance. Co-authored-by: Florent Castelli <florent.castelli@gmail.com>
2022-10-12LibC+LibCore: Fix file argument name in posix_spawnpFlorent Castelli
posix_spawnp takes a file, which is subject to PATH search, while posix_spawn takes a path.
2022-10-12checksum: Support the '--check' optionimplicitfield
This commit also updates 'checksum' to use the Core::Stream::File API.
2022-10-12LibCore: Add standard_{output, input, error} functions to File::Streamdavidot
2022-10-12LibCore: Add option to Stream::File to not close the file on destructiondavidot
2022-10-12HexEditor: Fix two off-by-one errorsMart G
The 'select all' feature now also selects the last byte of the document. The find function now also selects the last byte of a match.
2022-10-12LibGUI: Delete from current position to end of line in VimEditingEnginehuttongrabiel
When in normal mode pressing Shift+D will delete from the current cursor position to the end of the line. Leaving the cursor on the character before where the cursor was when the deletion took place.
2022-10-12Userland: Properly populate GENERATED_SOURCESAli Mohammad Pur
We previously put the generated headers in SOURCES, which did not mark them as GENERATED (and did not produce a proper dependency). This commit moves all generated headers into GENERATED_SOURCES, and removes useless header SOURCES.
2022-10-12PixelPaint: Call update after clearing guidesMart G
2022-10-12TextEditor: Set window title before showing the main windowGunnar Beutner
Previously TextEditor updated its window title after the window was already visible. This causes the default title ("GUI::Window") to be shown for a short period of time which was especially noticeable when opening files.
2022-10-12LibWeb: Remove code duplication in computing height for abs-pos elementsTimon Kruiper
This refactors the solve_for_{top, bottom, height, etc} lambdas to use a common solve_for lambda that takes the length to be solved as an argument. This way some code duplication is removed.
2022-10-12LibWeb: Add missing else's in absolutely positioned height computationSamuel Bowman
Rules 1, 2, and 3 use else if, so rules 4, 5, and 6 should too.
2022-10-12LibC: Declare _setjmp and _longjmp on non i386 platformsJan200101
These aliases were previously only implemented for i386 and are required for certain Ports e.g. Lua.
2022-10-12LibVideo: Allow the VP9 decoder to decode ultra high resolution videoZaggy1024
Previously, some integer overflows and truncations were causing parsing errors for 4K videos, with those fixed it can fully decode 8K video. This adds a test to ensure that 4K video will continue to be decoded. Note: There seems to be unexpectedly high memory usage while decoding them, causing 8K video to require more than a gigabyte of RAM. (!!!)
2022-10-12shot: Add ability to edit in PixelPaintJeremy Borgman
2022-10-11test: Guard code paths that may lead to a null pointer dereferenceimplicitfield
test no longer crashes with a segmentation violation if invalid arguments are passed.
2022-10-11LibCompress: Brotli support metadata of skip_length=0Tommy Murphy
The relevant RFC section from https://www.rfc-editor.org/rfc/rfc7932#section-9.2 MSKIPBYTES * 8 bits: MSKIPLEN - 1, where MSKIPLEN is the number of metadata bytes; this field is only present if MSKIPBYTES is positive; otherwise, MSKIPLEN is 0 (if MSKIPBYTES is greater than 1, and the last byte is all zeros, then the stream should be rejected as invalid) So when skip_bytes is zero we need to break and re-align bytes. Added the relevant test case that demonstrates this from: https://github.com/google/brotli/blob/master/tests/testdata/x.compressed
2022-10-11LibWeb: Constrain abspos element heights by min-height and max-heightAndreas Kling
2022-10-11LibWeb: Fix dumb typos in solver helpers for abspos heightAndreas Kling
2022-10-11LibHTTP: Include request body in HttpRequest::from_raw_request()Sam Atkins
2022-10-11pro: Stop closing stdout earlySam Atkins
This was causing a race-condition where sometimes the response body would not get printed. Co-authored-by: Ali Mohammad Pur <mpfard@serenityos.org>
2022-10-11LibProtocol: Remove redundant return statementSam Atkins
2022-10-11pro: Add argument `--method/-m` for controlling the HTTP methodSam Atkins
This lets you send requests like DELETE.
2022-10-11pro: Print the response code if it's an errorSam Atkins
2022-10-11LibHTTP: Make HTTP method names more accessibleSam Atkins
Previously you could only get the name of an HttpRequest::Method if you already had an HttpRequest.
2022-10-11LibWeb: Calculate height of absolute-position elements according to specAndreas Kling
This patch implements the full "old model" height algorithm from the CSS Positioned Layout spec. I went with the old model since we don't yet have the machinery required to implement the new model. Also, the width calculations already follow the old model, so this is symmetric with that. Eventually we should of course implement the new positioned layout model.
2022-10-11LibWeb: Implement a large chunk of the Selection APIAndreas Kling
This patch implements enough of the Selection API specification that we stop hitting unimplemented functions when loading Twitter.
2022-10-11LibWeb: Make Range's boundary point comparison a public functionAndreas Kling
We'll need this in the Selection API implementation as well.
2022-10-11LibWeb: Add spec link for DOM::Document::m_selectionAndreas Kling
2022-10-11LibWeb: Scroll elements into view when they become focusedAndreas Kling
This makes both user-interactive (tab keys) and programmatic focus changes scroll the viewport if necessary to reveal the newly focused element.
2022-10-11LibWeb: Update layout in Element.getClientRects()Andreas Kling
We always have to flush any pending layout updates before inspecting the layout tree.
2022-10-11WindowServer+LibGUI: Shrink window edge resize hot-spotsMart G
The hot-spots for resizing a window by dragging its corner are now limited to a small area around the actual corner instead of an area with 1/3rd the length or width of the window. The hot-spots to resize a window while holding a modifier key and the right mouse button are unchanged.
2022-10-11HackStudio: Set proper action scope for editor shortcutsTimothy Slater
This fixes issue #14429. The editor actions were not given a parent as scope so defaulted to global. Because HackStudio can have multiple editors and even multiple editor tab widgets, I chose the VerticalSplitter that all editor tab widgets get added to as the parent. With a Widget set as the parent, the action gets WidgetLocal scope and allows the embedded terminals to receive shortcuts. Thanks to Andreas for doing a quick look at this and pointing in the right direction during an Office Hours stream :)
2022-10-10LibWeb: Fix two uninitialized variables in FormattingContextAndreas Kling
2022-10-10LibWeb: Make Window.getSelection() forward to Document.getSelection()Andreas Kling
(And have document create the Selection object on demand.)
2022-10-10LibWeb: Split intrinsic heights cache based on available widthAndreas Kling
Now that intrinsic heights (correctly) depend on the amount of available width, we can't just cache the first calculated min-content and max-content heights and reuse it without thinking. Instead, we have to cache three pairs: - min-content & max-content height with definite available width - min-content & max-content height with min-content available width - min-content & max-content height with max-content available width There might be some more elegant way of solving this, but basically this makes the cache work correctly when someone's containing block is being sized under a width constraint.
2022-10-10LibWeb: Resolve vertical margins against containing block widthAndreas Kling
We were incorrectly resolving them against the available width, which may or may not be the same as the containing block width. The specification for these properties says that percentages resolve against the containing block width, so that's what we should do.
2022-10-10LibWeb: Use *outside* available space for fit-content sizing in FFCAndreas Kling
When calculating the fit-content width or height for a flex item, we need to use the available space *outside* the item, not the available space *inside*.
2022-10-10LibWeb: Update FFC for spec change to intrinsic min-content cross sizeAndreas Kling
We now know exactly how to calculate the min-content cross size for multi-line flex containers, which is great. The other three intrinsic constraints still fall back to the old ad-hoc code path. https://github.com/w3c/csswg-drafts/commit/5630e7b064addc6f2f9f57e68935e3cb3e778b65
2022-10-10LibWeb: Put HTML parser encoding sniffing debug logging behind a flagAndreas Kling
2022-10-10LibWeb: Make DOMStringMap a LegacyPlatformObjectAndreas Kling
Since it has a custom named getter, it should have been this all along.