summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-03-10Browser: Replace inspector's dom_node_id with a Selection structSam Atkins
2022-03-10LibWeb: Display pseudo-elements in the DOM inspectorSam Atkins
This patch only makes them appear in the tree - they are not yet inspectable themselves.
2022-03-10LibWeb: Move pseudo-element-from-string code into SelectorSam Atkins
2022-03-10LibWeb: Move pseudo-class/element names into the headerSam Atkins
These are constexpr, meaning that while the implementations were in the cpp file, nobody outside that file could actually call them.
2022-03-10LibWeb: Add window.sessionStoragePaul Wratt
2022-03-10LibWebSocket: Add to the total read in bytes instead of subtractingLuke Wilde
read_length in WebSocket::read_frame is used to track how many bytes we have read in from the network. However, we was subtracting the number of read in bytes instead of adding, underflowing it to about the 64-bit unsigned integer limit. This effectively limited us to only doing one read from the network. This was only an issue if the server stalled when sending data, which is especially common for large payloads. This would also cause us to go out of sync. This meant when a new frame came in, we would read the payload data of the previous frame as if it was the frame header and payload of the next frame. This allows us to read in the initial payload from Discord Gateway that describes to the client the servers we are in, the emotes the server has, the channels it has, etc. For an account that's only in the Serenity Discord, this was about 20 KB (compressed!)
2022-03-10Browser: Show currently loading host and remaining resource countBen Abraham
2022-03-10LibJS: Update RoundDuration after DRY refactor in specLinus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/4ef2748 Apparently I missed this in December! :^)
2022-03-09LibWeb: Only try parsing valid types of media-feature valuesSam Atkins
This resolves the ambiguity between whether a single number is a number or a ratio. :^) Also removed the "no more tokens" checks from deea129b8c730e717dc1a83c2eafa81b0e2b34ec - that logic was completely wrong, since there are always tokens after a value in the `(123 < foo < 456)` syntax.
2022-03-09LibWeb: Use ValueID for media-query identifiersSam Atkins
2022-03-09LibWeb+Meta: Stop discrete media-features from parsing as rangesSam Atkins
Only "range" type media-features are allowed to appear in range syntax, or have a `min-/max-` prefix.
2022-03-09LibWeb: Use MediaFeatureIDs instead of Strings :^)Sam Atkins
2022-03-09Meta: Generate CSS::MediaFeatureID enumSam Atkins
This works largely the same as the PropertyID and ValueID generators, but using LibMain, Core::Stream, and TRY(). Rather than have a MediaFeatureID::Invalid, I decided to return an Optional. We'll see if that turns out better or not. :^)
2022-03-09LibWeb: Add MediaFeatures.json file, and associated identifiersSam Atkins
This data will be used to generate code for parsing media-queries. So far, it includes all MEDIAQUERIES-4 features, and `prefers-color-scheme` from MEDIAQUERIES-5 since we support that.
2022-03-09LibGL: Merge GLContext and SoftwareGLContextStephan Unverwerth
This merges GLContext and SoftwareGLContext into a single GLContext class. Since the hardware abstraction is handled via the GPU device interface we do not need the virtual base of GLContext anymore. All context handling functionality from the old GLContext has been moved into the new version. All methods in GLContext are now non virtual and the class is marked as final.
2022-03-09LibJS/Tests: Add tests for '−000000' (U+2212) DateExtendedYearLinus Groh
I noticed we only have coverage for this with the ASCII minus sign in our own test suite.
2022-03-09LibWeb: Invalidate style after CSSStyleSheet.{insert,remove}Rule()Andreas Kling
When rules are inserted or removed via the CSSOM API, we now invalidate document style to ensure that any changes made are reflected. 1% progression on ACID3. :^)
2022-03-09LibWeb: Add the StyleSheet.href attributeAndreas Kling
This is only ever null at the moment, as we only set it on <style> elements to begin with.
2022-03-09LibWeb: Respect inline-axis margins between line box fragments :^)Andreas Kling
This makes the buckets on ACID3 space out nicely.
2022-03-09LibJS: Keep PrivateEnvironment through NativeFunction callsdavidot
Previously the variable and lexical environments were already kept in a NativeFunction call. However when we (try to) call a private method from within an async function we go through async_block_start which sets up a NativeFunction to call. This is technically not exactly as the spec describes it, as that requires you to actually "continue" the context. Since we don't have that concept (yet) we use this as an implementation detail to access the private environment from within a native function. Note that this not allow general private environment access since most things get blocked by the parser already.
2022-03-09LibWeb: Establish parent/child relationship between BrowsingContextsAndreas Kling
When an iframe is inserted or removed from a document, we now take it in and out of the BrowsingContext tree.
2022-03-09LibWeb: Always relayout document on element style changeAndreas Kling
Let's get this right before trying to make it fast. This patch removes the code that tried to do less work when an element's style changes, and instead simply invalidates the entire document. Note that invalidations are still coalesced, and will not be synchronized until update_style() and/or update_layout() is used.
2022-03-09LibWeb: Always call update_style() in update_layout()Andreas Kling
If the style is dirty, update_style() may cause layout to become dirty. Therefore we must always update style when updating layout, to ensure up-to-date results.
2022-03-09LibWeb: Invalidate document style when a node is removedAndreas Kling
This forces us to recompute style everywhere, since all kinds of selectors may produce different results now. In the future, we should look at narrowing down the invalidation that occurs here, but for now let's just invalidate everything and make the results correct before worrying about performance.
2022-03-09LibWeb: Flush pending layouts when accessing element resolved styleAndreas Kling
We were handing out stale values from window.getComputedStyle() objects after the first layout. Fix this by always updating layout on property access. This is not necessary for all properties, but for now let's go with the simplest approach to make it work correctly.
2022-03-09LibWeb: Add StyleValue::equals() override for PositionStyleValueAndreas Kling
2022-03-09LibWeb: Use reverse iterator for reverse loop into NonnullRefPtrVectorFederico Guerinoni
2022-03-09PixelPaint: Support saving/loading masks to project fileTobias Christiansen
2022-03-09PixelPaint: Rename typo'ed BMPWriter in serialize_as_json()Tobias Christiansen
2022-03-09PixelPaint: Fix saving projectTobias Christiansen
Some json objects didn't get finished, so it crashed.
2022-03-09LibWeb: Implement "NodeIterator pre-removing steps"Andreas Kling
These steps run when a node is about to be removed from its parent, and adjust the position of any live NodeIterators so that they don't point at a now-removed node. Note that while this commit implements what's in the DOM specification, the specification doesn't fully match what other browsers do. Spec bug: https://github.com/whatwg/dom/issues/907
2022-03-09LibWeb: Add support for DOM's TreeWalkerAndreas Kling
This patch adds TreeWalker (created via Document.createTreeWalker()) which allows you to traverse a filtered view of the DOM in all directions.
2022-03-09LibWeb: Add basic support for DOM's NodeIterator and NodeFilterAndreas Kling
This patch adds NodeIterator (created via Document.createNodeIterator()) which allows you to iterate through all the nodes in a subtree while filtering with a provided NodeFilter callback along the way. This first cut implements the full API, but does not yet handle nodes being removed from the document while referenced by the iterator. That will be done in a subsequent patch.
2022-03-09LibWeb: Allow returning JS::ThrowCompletionOr<T> from wrapped functionsAndreas Kling
In some cases, we need more nuance than what DOM::ExceptionOr<T> offers.
2022-03-09LibWeb: Fail resource loads on HTTP 4xx or 5xx errorAndreas Kling
This fixes an issue on ACID3 where failing image loads with body content would still get displayed.
2022-03-09LibJS: Be more lenient when parsing milliseconds for Datedavidot
Other engines don't give NaN if there is at least one digit after the dot for milliseconds. We were much stricter and required exactly three digits. But there is real world usage of different amounts of digits such as discord having three extra trailing zeros.
2022-03-09Demos: Create demo for VirGL gpu deviceSahan Fernando
This is a simple demo for VirGL, that does the bare minimum required to create and render a spinning cube (with one color per face).
2022-03-09SystemServer: Create device files for gpus on startupSahan Fernando
We are adding a new class of file, a GPU device. These devices have major number 28, and are bound to files named /dev/gpuN.
2022-03-09LibC: Add ioctls for VirGLSahan Fernando
2022-03-09LibTLS: Add support for curve x448stelar7
2022-03-09LibCrypto: Add curve X448stelar7
2022-03-09Spreadsheet: Add CommonRange#unique()u9g
2022-03-09Spreadsheet: Add SplitRange class and CommonRange#filteru9g
2022-03-08Help: Remove redundant selection update when opening pagekimlintu
Since the selection already gets updated in AbstractView::keydown_event and AbstractView::mousedown_event we don't have to update it again in the MainWidget::open_url function. This fixes a bug that causes the selection to "spaz out" when scrolling too fast between pages.
2022-03-08LibC: Set `saved_str` to null in strtok_r if no tokens were foundDaniel Bertalan
If we do not do this, the next call to strtok_r will start tokenizing (and possibly modifying!) the memory pointed to by `saved_ptr`.
2022-03-08LibDiff: Generate hunks for new/deleted filesDaniel Bertalan
Previously we would fail to generate any hunks if the old or the new file was empty. We now do, with the original/target line index set to 0, as specified by POSIX.
2022-03-08date: Allow using a custom format stringDaniel Bertalan
This commit adds an optional string positional argument which is used a custom format string for the date.
2022-03-08LibCore: Do not skip dotfiles when copying directories recursivelyDaniel Bertalan
2022-03-08LibArchive: Accept space characters as terminators of tar numeric fieldsDaniel Bertalan
POSIX specifies that each numeric field is terminated with one or more space or NUL characters.
2022-03-08DynamicLinker: Replace $ORIGIN with the executable pathTim Schumacher