summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-02-15LibWeb: Support implicit <label> targetsAndreas Kling
We already supported "<input id=id><label for=id>". This patch implements the other labeling mode, where the first labelable descendant of the <label> element becomes the labeled control.
2022-02-15LibCore: Exit get_next_timer_expiration() sooner if possibleAndreas Kling
If we find a timer that needs to be fired immediately, we can stop looking through the remaining timers. This significantly reduces time spent in get_next_timer_expiration() on ACID3. Of course, with a better data structure, we could reduce time spent further. I've left a FIXME about that.
2022-02-15LibWeb: Fail gracefully when reaching the unimplemented part of the AAALinus Groh
Pages such as https://html5test.com are testing all sorts of weird, incomplete, and wrong HTML but can be useful or at least interesting for development - let's try to avoid crashing the process.
2022-02-15LibWeb: Implement state switch for "[CDATA[" in HTML parserLinus Groh
2022-02-15LibWeb: Add an optional pointer to an HTMLParser to the HTMLTokenizerLinus Groh
This is needed to access the 'adjusted current node' in the 'Markup declaration open state'. We don't want to create a full parser for something like syntax highlighting, so it's optional (null) by default.
2022-02-15LibWeb: Remove unused HTMLParser function declarationLinus Groh
There is no implementation of this function: HTMLParser::stack_of_open_elements_has_element_with_tag_name_in_scope
2022-02-15LibWeb: Add spec links to each HTML tokenizer state sectionLinus Groh
I didn't add full spec comments this time, but this is better than nothing :^)
2022-02-15LibWeb: Add stubs for document.write and document.writelnMaciej
ACID3 test page throws exception about document.write. Let's at least get rid of it by defining these stubs. I added document.writeln too because it is similar.
2022-02-15LibArchive: Default initialize member variablesLenny Maiorani
Problem: - `memset` is used to initialize data instead of using default initialization. Solution: - Default initialize all member variables. - Eliminate use of `memset` in favor of C++ braced initialization.
2022-02-15LibArchive: Use constexpr variables where possibleLenny Maiorani
2022-02-15LibArchive: Refactor Tar to make DRY (Don't Repeat Yourself)Lenny Maiorani
Problem: - The getters and setters duplicate code for conversions. - Getters are returning `const StringView` rather than non-`const`. Solution: - Factor out common code to helper functions. - Return `StringView` as non-`const`.
2022-02-15Demos: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-02-15Applications: Run gml-formatIdan Horowitz
2022-02-15FontEditor: Add a ListView to sort glyphs by their Unicode blockthankyouverycool
2022-02-15CharacterMap: Add a ListView to sort glyphs by their Unicode blockthankyouverycool
2022-02-15LibGUI: Allow GlyphMapWidget to filter by code point rangesthankyouverycool
2022-02-15Meta+LibUnicode: Download and parse Unicode block propertiesthankyouverycool
This parses Blocks.txt for CharacterType properties and creates a global display array for use in apps.
2022-02-15LibWeb: Don't delay document load event forever with cached style sheetsAndreas Kling
If we try to <link> a stylesheet that was already cached, we'll get a synchronous resource_did_load() callback. Because of this, it's necessary to set up the document load event delayer *before* calling set_resource(), as otherwise we'd be stuck without a load event forever.
2022-02-15LibWeb: Don't delay document load event forever with cached CSS importsAndreas Kling
If we try to @import a stylesheet that was already cached, we'll get a synchronous resource_did_load() callback. Because of this, it's necessary to set up the document load event delayer *before* calling set_resource(), as otherwise we'd be stuck without a load event forever.
2022-02-15LibWeb: Force a relayout when scrolling to anchorAndreas Kling
This ensures that the layout information is current, even when the scroll request happens immediately upon page load. This fixes an issue where reloading ACID2 wouldn't scroll down to the "#top" anchor point.
2022-02-15LibWeb: Don't trigger page load for fragment navigation within same URLAndreas Kling
2022-02-15LibWeb: Repaint entire viewport after document layoutAndreas Kling
This fixes an issue with the eyes on ACID2 not appearing until the page is repainted after loading.
2022-02-15LibIPC: Always shutdown() the Connection if reached EOFVitaly Dyachkov
2022-02-15Spreadsheet: Improve 'Functions Help' buttonelectrikmilk
Add icon and tooltip to 'Functions Help' button.
2022-02-15Spreadsheet: Insert missing iconselectrikmilk
Add icons where they are missing.
2022-02-15Base+Piano: Insert missing icons into menubarelectrikmilk
Inserts icons for 'Export', 'Add Track' and 'Next Track'.
2022-02-15LibJS: Fix cases where we incorrectly allowed 'in' in for loopsAnonymous
We needed to propagate the forbidden token set to all parsing functions that can call back into parse_expression.
2022-02-15DisplaySettings: Include aspect ratio in resolution list textForLoveOfCats
2022-02-15LibWeb: Compute some height of BlockFormattingContexts earliermichiell1
In some cases the height of the parent is needed in computations of the height for the child. This patch attempts to fix these cases.
2022-02-15Base+PixelPaint: Use Merge Active Layer Up/Down Iconselectrikmilk
The icons for these actions were added in a previous commit but never used, now they are.
2022-02-15PixelPaint: Implement Merge Active Layer Upelectrikmilk
Implements 'Merge Active Layer Up' and adds it to the 'Layer' menu.
2022-02-15Playground: Add editor actions to the window menuKarol Kosek
2022-02-15LibWeb: Make IFC register absolutely positioned descendants with BFCAndreas Kling
This allows BFC to position all absolutely positioned descendants in the same pass.
2022-02-15LibWeb: Make InlineLevelIterator skip over positioned elementsAndreas Kling
2022-02-15LibWeb: Implement HTMLElement.click()Andreas Kling
This doesn't send the correct type of click event, but it does send something, so it's already somewhat useful. :^)
2022-02-15LibWeb: Add spec comments to the StackOfOpenElements classAndreas Kling
2022-02-15LibWeb: Rename element_before() => element_immediately_above()Andreas Kling
This matches the spec terminology around the "stack of open elements".
2022-02-15LibWeb: Add spec comments to find_appropriate_place_for_inserting_node()Andreas Kling
2022-02-15LibJS: Correct an include in PrimitiveStringdavidot
2022-02-15LibJS: Use CopyDataProperties when spreading in object expressionsdavidot
Before this was a mix of different strategies but copy_data_properties does all of that in a spec way. This fixes numeric properties in object spreading. And ensures that any new properties added during spreading are not taken into account.
2022-02-15LibJS: Use entire array of SimpleIndexedPropertyStorage before growingdavidot
A common use case in JS is pushing items in an array in a loop. A simple test case of 100_000 pushes took around ~20 seconds. This is due to the fact that any pushed element per definition is beyond the current size of the array. This meant calling grow_storage_if_needed which then grew the storage by 25%. But this was done on every single push, growing the array just a little bigger than its current capacity. Now we now first use capacity of the array and only grow if the array is actually full. This decreases the time for 100_000 to around 0.35 seconds. One problem is that we never shrink the capacity of the array but this was already an issue before this.
2022-02-15LibWeb: Remove non-standard ReturnNullIfCrossOrigin IDL attributeLinus Groh
This is no longer needed as BrowsingContextContainer::content_document() now does the right thing, and HTMLIFrameElement.contentDocument is the only user of this attribute. Let's not invent our own mechanisms for things that are important to get right, like same origin comparisons.
2022-02-15LibWeb: Implement BCC's "content document" concept according to specLinus Groh
2022-02-15LibWeb: Implement Origin's "same origin-domain" conceptLinus Groh
Check of domains is left as a FIXME as our Origin class doesn't support those yet.
2022-02-15LibWeb: Rename Origin::is_same() to Origin::is_same_origin()Linus Groh
The HTML Origin spec has two similar but slightly different concepts of origin equality: "same origin" and "same origin-domain". Let's be explicit with the naming here :^) Also add spec comments.
2022-02-15LibWeb: Rename Origin::is_null() to Origin::is_opaque()Linus Groh
This is what the HTML Origin spec calls it.
2022-02-14LibJS: Add missing include for 'u32' to CanonicalIndex.hLinus Groh
2022-02-14Applications: Use default constructors/destructorsLenny Maiorani
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules "The compiler is more likely to get the default semantics right and you cannot implement these functions better than the compiler."
2022-02-14LibJS: Get rid of unnecessary work from canonical_numeric_index_stringAnonymous
The spec version of canonical_numeric_index_string is absurdly complex, and ends up converting from a string to a number, and then back again which is both slow and also requires a few allocations and a string compare. Instead this patch moves away from using Values to represent canonical a canonical index. In most cases all we need to know is whether a PropertyKey is an integer between 0 and 2^^32-2, which we already compute when we construct a PropertyKey so the existing is_number() check is sufficient. The more expensive case is handling strings containing numbers that don't roundtrip through string conversion. In most cases these turn into regular string properties, but for TypedArray access these property names are not treated as normal named properties. TypedArrays treat these numeric properties as magic indexes that are ignored on read and are not stored (but are evaluated) on assignment. For that reason there's now a mode flag on canonical_numeric_index_string so that only TypedArrays take the cost of the ToString round trip test. In order to improve the performance of this path this patch includes some early returns to avoid conversion in cases where we can quickly know whether a property can round trip.
2022-02-14LibWeb: Add stacking contexts to Node::for_each_child_in_paint_orderSteven Schmoll
The existing implementation, which is used by Node::hit_test() and sub-classes, does not include stacking contexts which prevents hit testing from returning elements contained by those stacking contexts in some situations. This is quite rough and definitely not optimal. The stacking contexts are not retrieved in the correct order. They should be sorted by z-index then tree order. This change makes DuckDuckGo technically usable with all the absolute and relative positioning they use.