summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
AgeCommit message (Collapse)Author
2021-05-12LibWeb: Position the ListItemMarkers according to their widthTobias Christiansen
Previously they were positioned with a fixed offset. However this lead to wider markers with more than one character to collide with the element itself. Now the ListItemMarkerBox generates and stores the appropriate String in its constructor and sets its own width according to that. The ListItemBox then lays out the Marker taking this width into account. This also made the painting a lot easier since we don't generate the needed Strings every time we repaint, just once.
2021-05-12LibWeb: Remove unused alphabet constants from ListItemMarkerBoxTobias Christiansen
Why exactly the linter didn't whine about this is a mystery. These constants aren't needed anymore since the functionality moved to AK/String a while ago.
2021-05-12LibWeb: Move clearing boxes below preceding floating boxesTimothy Flynn
When computing the y-position of a clearing element, use the height of the border box of the associated floating elements. This also extracts this block of code to a helper lambda since it is used twice.
2021-05-11LibWeb: Add a maximum redirects limit to FrameLoaderIdan Horowitz
This prevents the browser from crashing when trying to load an infinite redirects loop. The chosen limit is based on the fetch specification: "If request's redirect count is twenty, return a network error."
2021-05-11LibWeb: Implement :nth-last-child pseudo-classmiere43
2021-05-11LibWeb: Paint an element's foreground before painting its childrenTimothy Flynn
The current implementation is missing the emphasized text of the following rule in the painting order spec: 7. Otherwise: *first for the element*, then for all its in-flow, non-positioned, block-level descendants in tree order... This ensures the foreground is painted for the current element before descending into its children.
2021-05-11LibWeb: Make Element::tag_name return the HTML uppercased qualified nameLuke
I forgot to change tag_name when this was added. Also makes html_uppercased_qualified_name return a const reference.
2021-05-11LibWeb: Expose Element.{prefix,localName}Luke
2021-05-09LibWeb: Add tests for HTMLTableElement attributesAdam Hodgen
These tests aim to exercise all attributes on <html> elements, including all edge cases.
2021-05-09LibWeb: Fix nodeName attribute in testsAdam Hodgen
Commit 19731fc14c (#6864) made all nodeName attributes on HTML elements uppercased. This change fixes that in all HTML & DOM tests.
2021-05-09LibWeb: Implement HTMLTableElement tbody attributesAdam Hodgen
* tBodies - returns a HTMLCollection of all tbody elements * createTBody - If necessary, creates a new tbody element and add it to the table after the last tbody element
2021-05-09LibWeb: Implement HTMLTableElement tfoot attributesAdam Hodgen
* tFoot - Getter for the tfoot element The setter is not currently implemented * createTFoot - If necessary, creates a new tfoot element and add it to the table after any tbody elements * deleteTFoot - If a tfoot element exists in the table, delete it
2021-05-09LibWeb: Implement HTMLTableElement thead attributesAdam Hodgen
* tHead - Getter for the thead element The setter is not currently implemented * createTHead - If necessary, creates a new thead element and add it to the table after any caption or colgroup elements, but before anything else * deleteTHead - If a thead element exists in the table, delete it
2021-05-09LibWeb: Implement HTMLTableElement caption attributesAdam Hodgen
* caption - Getter and setter for the caption element * createCaption - If necessary, creates a new caption element and add it to the table * deleteCaption - If a caption element exists in the table, delete it
2021-05-09LibWeb: Implement HTMLTableElement row attributesAdam Hodgen
rows returns a HTMLCollection of all the tr elements contained within the table. We leave the SameObject attribute off the attribute in the IDL as we cannot currently return the same HTMLCollection every time (see the FIXME on DOM::Document::applets) The WrapperGenerator currently does not correctly handle the default value for the type long on insertRow. Currently not specifying the index will insert a row at index 0.
2021-05-09LibWeb: Implement :nth-child pseudo-classmiere43
2021-05-09LibWeb: Allow white space inside pseudo-class argumentsmiere43
2021-05-08LibWeb: Use list-style-type circle/square for nested unordered listsLinus Groh
An idea shamelessly stolen from other UAs :^)
2021-05-07LibWeb: Make frames nesting-aware and disallow deep nestingTobias Christiansen
A Frame now knows about its nesting-level. The FrameLoader checks whether the recursion level of the current frame allows it to be displayed and if not doesn't even load the requested resource. The nesting-check is done on a per-URL-basis, so there can be many many nested Frames as long as they have different URLs. If there are however Frames with the same URL nested inside each other we only allow this to happen 3 times. This mitigates infinetely recursing <iframe>s in an HTML-document crashing the browser with an OOM.
2021-05-07LibWeb: Make painting order more spec-compliantEgor Ananyin
Now our painting order inside stacking contexts is closer to the algorithm specified by CSS 2.1 (see section 9.9 and Appendix E)
2021-05-07LibWeb: Convert StringBuilder::appendf() => AK::FormatAndreas Kling
2021-05-07LibWeb: Implement replacing the current body when setting document.bodyLuke
Also adds an exception check to the append at the end.
2021-05-07LibWeb: Add non-const variants of Document::{html_element,body,head}()Luke
2021-05-07LibWeb: Implement Node.replaceChildLuke
The `if (child->parent())` check seems to be redundant, but I'm keeping it just to match the spec.
2021-05-05LibWeb: Remove double comma in FrameLoader debug loggingIdan Horowitz
2021-05-04LibWeb: Implement EventTarget.dispatchEventLuke
Used by Web Platform Tests to test events
2021-05-04LibWeb: Add Document.{images,embeds,plugins,links,forms,scripts}Luke
2021-05-04LibWeb: Use HTML-uppercased qualified name for the Element node nameLuke
For regular elements, this is just the qualified name. However, for HTML elements in HTML documents, it is the qualified name uppercased. This is used by jQuery to determine the document is an HTML document. Not having this made jQuery assume the document was XML, causing weird behaviour. To do this, an internal string of qualified name is created. This is to prevent constantly regenerating it. This is allowed by the spec. This is the same for the HTML-uppercased qualified name.
2021-05-04LibWeb: Add createDocument and createDocumentType for DOMImplementationLuke
Both required for the acid3 test. createDocument is used extensively in Web Platform Tests.
2021-05-04LibWeb: Add support for extended attributes on IDL parametersLuke
Also adds support for [LegacyNullToEmptyString] for parameters.
2021-05-04LibWeb: Expose HTMLInputElement.nameLuke
2021-05-04LibWeb: Compute intrinsic height of absolute replaced elementsTimothy Flynn
Previously, the method for computing the height of absolutely positioned replaced elements only invoked the method for non-replaced elements. That method is now implemented fully enough that it sometimes computed a height of 0 for replaced elements. This implements section 10.6.5 rule 1 of the CSS spec to avoid that behavior.
2021-05-03Userland: Use snake case names in .ipc filesGunnar Beutner
This updates all .ipc files to have snake case names for IPC methods.
2021-05-03Userland: Update IPC calls to use proxiesGunnar Beutner
This updates all existing code to use the auto-generated client methods instead of post_message/send_sync.
2021-05-03Userland: Change IPC funcs to use plain arguments instead of a structGunnar Beutner
Instead of having a single overloaded handle method each method gets its own unique method name now.
2021-05-03LibGUI: Rename ScrollableWidget => AbstractScrollableWidgetAndreas Kling
2021-05-03LibWeb: Use node_to_insert instead of node in Node::insert_beforeLuke
It was using the passed in node instead of the node from the vector. Fixes a crash I found while testing jQuery.
2021-05-02LibWeb: Expose Node.ownerDocumentLuke
Required by jQuery.
2021-05-02LibGfx: Unify Rect, Point, and SizeMatthew Olsson
This commit unifies methods and method/param names between the above classes, as well as adds [[nodiscard]] and ALWAYS_INLINE where appropriate. It also renamed the various move_by methods to translate_by, as that more closely matches the transformation terminology.
2021-05-02Userland: Make IPC handlers return void if they don't have any outputsGunnar Beutner
2021-05-02Userland: Get rid of the OwnPtr<...> boilerplate code for IPC handlersGunnar Beutner
2021-05-01Everywhere: Turn #if *_DEBUG into dbgln_if/if constexprGunnar Beutner
2021-05-01LibWeb: Use new way of generating list-style-type: *-alphaTobias Christiansen
Removed the local conversion from number to alphabet and used the one offered in AK/String instead.
2021-04-30LibWeb: Position absolute boxes relative to the containing blockEgor Ananyin
In the absolute positioning model, a box is explicitly offset with respect to its containing block (CSS 2.1 section 9.6).
2021-04-30LibWeb: Use min-height in calculating block box heightEgor Ananyin
Now we use min-height for calculating the height of block boxes. Besides, now we check if min-height/max-height are percentage values and don't use them if parent's height isn't explicitly set (CSS 2.1 section 10.7).
2021-04-30LibWeb: Fix floating box position calculationEgor Ananyin
Now we set margins, borders and paddings for floating boxes and include them into calculating floating box positions by using margin_box() and margin_box_as_relative_rect().
2021-04-30LibWeb: Add selector support to the new CSSParserstelar7
This is stolen from the old parser, but it seems to parse fine :^)
2021-04-29LibWeb: Add list-style-type: upper-latin and upper-alpha supportTobias Christiansen
2021-04-29LibWeb: Add list-style-type: lower-alpha and lower-latin supportTobias Christiansen
They achieve the same, a list which markers are lowercase (latin) characters.
2021-04-29LibWeb: Conversion from number to bijective-base with alphabet.Tobias Christiansen
This allows us to convert a number to a String given a bijective (zero-less) alphabet. So you count A,B,C,...,Y,Z,AA,AB,... This was surprisingly very tricky! This allows the ListItemMarker to be displayed with different (simple) alphabets in the future.