summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2022-08-06LibJS+LibWeb: Restore type safety of Realm::set_global_object()Linus Groh
The changes from 8a03b17 to allow any JS::Value aren't a good fit, as shown by the excessive amount of verify_cast needed :^)
2022-08-06LibJS: Implement string concatenation using ropesAndreas Kling
Instead of concatenating string data every time you add two strings together in JavaScript, we now create a new PrimitiveString that points to the two concatenated strings instead. This turns concatenated strings into a tree structure that doesn't have to be serialized until someone wants the characters in the string. This *dramatically* reduces the peak memory footprint when running the SunSpider benchmark (from ~6G to ~1G on my machine). It's also significantly faster (1.39x) :^)
2022-08-05LibGUI: Register "bitmap" GML property for ImageWidgetthankyouverycool
2022-08-05LibGUI+Applications: Govern Splitter resizing by opportunistic growththankyouverycool
This patch replaces the concept of fixed resizees with opportunistic ones which use the new SpecialDimension::OpportunisticGrow UISize. This lets us simplify splitter resize code and take advantage of the layout system's automatic calculations for minimum size and expansion. Functionally the same as before, but fixes Splitter's unintended ability to grow window size.
2022-08-05LibGUI: Calculate maximum primary size for Splitter resizeesthankyouverycool
2022-08-05LibJS: Run clang-format on Realm.cppAndreas Kling
2022-08-05LibWeb: Port web workers to the "create a new JavaScript realm" APIAndreas Kling
2022-08-05LibWeb: Don't paint non-visible framesAndreas Kling
This fixes an issue where iframes hidden with CSS `visibility: none` would still be visible.
2022-08-05LibJS: Actually create a new Realm in $262.createRealm()Andreas Kling
2022-08-05LibWeb: Support assigning to window.locationAndreas Kling
Assignments actually forward to window.location.href, as the spec requires. Since the window object is implemented by hand, this looks a little janky. Eventually we should move all this stuff to IDL.
2022-08-05LibWeb: Bring browsing context creation closer to specAndreas Kling
This patch implements the "create a new browsing context" function from the HTML spec and replaces our existing logic with it. The big difference is that browsing contexts now initially navigate to "about:blank" instead of starting out in a strange "empty" state. This makes it possible for websites to create a new iframe and start scripting inside it right away, without having to load an URL into it.
2022-08-05LibWeb: Add API for setting a document's referrerAndreas Kling
2022-08-05LibWeb: Store document origin as a HTML::Origin objectAndreas Kling
This will allow us to remember an arbitrary origin instead of deriving it from the document's URL.
2022-08-05LibGfx: Don't use Span<u32> as hash key for cached emojisAndreas Kling
We can't rely on the caller to keep the code points alive, and this was sometimes causing incorrect cache hits, leading to the wrong emoji being displayed. Fixes #14693
2022-08-05LibWeb: Clear the "is initial about:blank" flag in Document.write()Andreas Kling
2022-08-05LibWeb: Use Document::m_type to check for XML documentsAndreas Kling
...instead of doing a string compare on the DOCTYPE node.
2022-08-05LibWeb: Show iframe URLs in layout tree dumpsAndreas Kling
2022-08-05LibWeb: Start implementing "create and initialize a Document" from HTMLAndreas Kling
The way we've been creating DOM::Document has been pretty far from what the spec tells us to do, and this is a first big step towards getting us closer to spec. The new Document::create_and_initialize() is called by FrameLoader after loading a "text/html" resource. We create the JS Realm and the Window object when creating the Document (previously, we'd do it on first access to Document::interpreter().) The realm execution context is owned by the Environment Settings Object.
2022-08-05LibWeb: Add HTML::NavigationParamsAndreas Kling
2022-08-05LibJS: Make Interpreter::create() call InitializeHostDefinedRealm()Andreas Kling
Instead of having two implementations of this AO, let's just have Interpreter::create() call the new full version of the AO in Realm.
2022-08-05LibJS: Implement a more general InitializeHostDefinedRealm AOAndreas Kling
The existing implementation of this AO lives in Interpreter::create(), which makes it impossible to use without also constructing an Interpreter. This patch adds a new Realm::initialize_host_defined_realm() and takes the global object and global this customization steps as Function callback objects. This will be used by LibWeb to create realms during Document construction.
2022-08-05LibWeb: Add a way to construct HTML::Window without a DOM::DocumentAndreas Kling
This will be used to implement the rather intricate construction order in the HTML spec.
2022-08-05LibWeb: Always put a dummy execution context on the main thread VM stackAndreas Kling
A lot of code assumes that there's a current execution context. By setting up a dummy context right after creating the main thread VM, we ensure that such code can always run.
2022-08-05LibWeb: Implement (naive) version of HTMLIFrameElement.contentWindowAndreas Kling
This should really return the WindowProxy, but since we don't have the infrastructure set up just yet, just return the window object itself for now.
2022-08-05LibWeb: Add HTML::SandboxingFlagSetAndreas Kling
2022-08-05LibWeb: Add HTML::CrossOriginOpenerPolicyEnforcementResultAndreas Kling
2022-08-05LibWeb: Add HTML::CrossOriginOpenerPolicyAndreas Kling
2022-08-05LibWeb: Move DOM::Document factory functions out of lineAndreas Kling
2022-08-05LibJS: Let Shape store a Realm instead of a GlobalObjectAndreas Kling
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
2022-08-05LibJS: Remove unused ShapeWithoutGlobalObject constructor mechanismAndreas Kling
2022-08-05LibWeb: Remove page_did_set_document_in_top_level_browsing_context()Andreas Kling
This PageClient callback was never used for anything.
2022-08-05LibWeb: Add browsing context "still on its initial about:blank Document"Andreas Kling
2022-08-05LibWeb: Add basic skeleton of HTML "session history" to BrowsingContextAndreas Kling
2022-08-05LibWeb: Add the "is initial about:blank" flag to DOM::DocumentAndreas Kling
2022-08-04LibMarkdown: Fix coloring of the first linedemostanis
The escape sequence to color a section's name was separated by a newline from the section's name, making less(1) trim the escape sequence off when the section's name was on the first line.
2022-08-04LibMarkdown: Indent code blocksdemostanis
2022-08-04LibGUI: Let Toolbars collapse into an overflow menuthankyouverycool
Previously Toolbars were governed by a strict minimum size which guaranteed all actions remained visible. Now, if set collapsible, extra actions will fold into an overflow menu on the Toolbar.
2022-08-04LibGUI: Let Buttons set their menu popup positionthankyouverycool
The previous ButtonStyle::Tray conditional was a hack for Statusbars.
2022-08-04LibGUI: Remove button padding on Toolbar constructionthankyouverycool
And assume 24x24 button sizes by default. There currently aren't any toolbars with custom button sizes, but if the need arises, they can always determine their own padding.
2022-08-04LibGUI: Remove useless frame members from Toolbarthankyouverycool
Frames had no effect within Toolbar and are now superceded by ToolbarContainer.
2022-08-04LibGfx: Improve error handling for BitmapFontsthankyouverycool
Adds fallible functions for cloning, creating, loading and writing BitmapFonts.
2022-08-04LibMarkdown: Implement the image size extensionMacDue
This implements the image size extension that's quite commonly used: https://github.com/commonmark/commonmark-spec/wiki/Deployed-Extensions#image-size This supports specifying... Both width and height: ![](foo.png =100x200) Width only: ![](foo.png =100x) Height only: ![](foo.png =x200) The size is always in pixels (relative sizing does not seem to be spec'd anywhere).
2022-08-03LibJS: Add previously skipped assertion in RegulateTimeLinus Groh
The spec issue preventing us from doing this in the past has long been fixed.
2022-08-03LibJS: Only coerce value once in BigInt constructordavidot
See https://github.com/tc39/ecma262/pull/2812.
2022-08-02LibHTTP+WebServer: Add querystring support0xbigshaq
Split the path from querystring when determining the requested resource.
2022-08-02LibC+LibCore: Use tm_isdst to handle time zone offsets in DSTTimothy Flynn
Previously, we were incorrectly assuming that the daylight global variable indicated whether the current time zone is in DST. In reality, the daylight variable only indicates whether a time zone *can* be in DST. Instead, the tm structure has a tm_isdst member that should be used for this purpose. Ensure our LibC handles tm_isdst, and avoid errant usage of the daylight variable in Core::DateTime.
2022-08-02LibC: Split time_t range validation to separate helper functionTimothy Flynn
Right now, the tm_to_time helper invokes time_to_tm to validate the time_t it creates. Soon, both tm_to_time and time_to_tm will perform some TZDB lookups to handle DST. This isn't a huge cost, but let's avoid the double lookup here.
2022-08-02LibC: Cache the time zone name found by tzset()Timothy Flynn
The time zone name will be needed for TZDB lookups in various time.h functions. Cache the value found by tzset(), defaulting to the system- wide default of UTC. This also moves the time.h global definitions to the top of the file. The cached time zone name will be needed above where these variables are defined, so this is just to keep them all together.
2022-08-02LibWeb: Declare variable with the auto keywordKenneth Myhra
Use the auto keyword instead of the full type name like we do elsewhere in the codebase.
2022-08-02LibWeb: Make sure Blob type is not outside range 0x0020-0x007EKenneth Myhra
This makes sure that type is set to an empty string if BlobPropertyBag::type is outside the range 0x0020 to 0x007E.