summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML
AgeCommit message (Collapse)Author
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-08-14LibWeb: Add fixmes for other missing CRC2D mixinsSam Atkins
2022-08-14LibWeb: Extract CanvasPathDrawingStyles class from CRC2DSam Atkins
2022-08-14LibWeb: Extract CanvasImageData class from CRC2DSam Atkins
2022-08-14LibWeb: Extract CanvasDrawImage class from CRC2DSam Atkins
2022-08-14LibWeb: Extract CanvasText class from CRC2DSam Atkins
2022-08-14LibWeb: Extract CanvasDrawPath class from CRC2DSam Atkins
Again, this is an entirely virtual class since the methods involve direct access to the Painter. Though, maybe I could just expose the Painter...
2022-08-14LibWeb: Extract CanvasRect class from CRC2DSam Atkins
This one requires drawing to the canvas, so it doesn't make so much sense to move the implementation over.
2022-08-14LibWeb: Extract CanvasFillStrokeStyles class from CRC2DSam Atkins
2022-08-14LibWeb: Extract CanvasFillStrokeStyles class from CRC2DSam Atkins
2022-08-14LibWeb: Extract CanvasTransform class from CRC2DSam Atkins
The implementation of this got a little funky, because it has to access methods from CanvasState.
2022-08-14LibWeb: Extract CanvasState class from CRC2DSam Atkins
As with CanvasPath, this is to better match the spec IDL.
2022-08-14LibWeb: Teach CRC2D to draw Path2Ds :^)Sam Atkins
2022-08-14LibWeb: Implement Path2D classSam Atkins
2022-08-14LibWeb: Extract CanvasPath class from CRC2DSam Atkins
This better matches the spec, and makes it possible for things like Path2D to reuse the same implementation without duplicate code. :^)
2022-08-14LibWeb: Use "unrestricted float/double" where we should in IDLSam Atkins
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-05LibWeb: Port web workers to the "create a new JavaScript realm" APIAndreas Kling
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: 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-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: 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-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-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-07-29LibWeb: Extract the WindowOrWorkerGlobalScope IDL mixinSam Atkins
`Window` itself isn't generated from an IDL file so it doesn't get to make use of this mixin, but it ideally would do so.
2022-07-29LibWeb: Extract the LinkStyle IDL mixinSam Atkins
2022-07-29LibWeb: Extract the HTMLHyperlinkElementUtils IDL mixinSam Atkins
Also added FIXMEs for some missing methods while I was at it.
2022-07-27LibWeb: Add fast_is<HTMLElement>()Andreas Kling
This avoids slow RTTI lookups in selector matching.
2022-07-27LibWeb: Add fast_is<HTMLBaseElement>()Andreas Kling
This avoids slow RTTI lookups in Document::base_url().
2022-07-23LibWeb: Support `appearance: none` for `<progress>` elementsMacDue
This disables this system progress bar, and instead creates one out of pseudo elements, that can be selected and styled with the ::-webkit-progress-bar/value selectors.
2022-07-17LibWeb: Allow having a linear-gradient() as a background-imageMacDue
2022-07-15LibWeb: Mark Origin::serialize() as constLinus Groh
2022-07-14LibWeb: Add a stub PolicyContainer structLinus Groh
2022-07-14LibWeb: Move Origin into the HTML namespaceLinus Groh
Origin is defined in the HTML Standard, and therefore belongs into the HTML directory and namespace in LibWeb. https://html.spec.whatwg.org/multipage/origin.html#origin
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-11LibWeb: Store MessageEvent::m_data in a JS::HandleLuke Wilde
This protects it from GC.
2022-07-05LibWeb: Implement XMLSerializerLuke Wilde
The main thing that is missing is validating certain pieces of data against XML productions in well-formed mode, but nothing uses well-formed mode right now. Required by Closure Library for sanitising HTML. https://github.com/google/closure-library/blob/e687b3d8ab014787b9f10b08b3f597b637392480/closure/goog/html/sanitizer/safedomtreeprocessor.js#L117
2022-07-04LibWeb: Add the type field to DOM::DocumentnetworkException
This patch adds the document type concept to documents and sets it in various places.
2022-06-29LibWeb: Print unhandled rejections the same way as unhandled exceptionsLuke Wilde
2022-06-29LibWeb: Store PromiseRejectionEvent::m_reason in a JS::HandleLuke Wilde
2022-06-29LibWeb: Move ClassicScript::m_settings_object into the Script baseLuke Wilde
All Scripts have an associated settings object. https://html.spec.whatwg.org/multipage/webappapis.html#settings-object
2022-06-29LibWeb: Implement WindowEventHandlersLuke Wilde
2022-06-29LibWeb: Only make certain <body> and <frameset> events apply to WindowLuke Wilde
Previously we forwarded all event handler attributes to Window from these two elements, however, we are only supposed to forward blur, error, focus, load, resize and scroll.