summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLTableElement.cpp
AgeCommit message (Collapse)Author
2023-03-25LibWeb: Split ColorStyleValue out of StyleValue.{h,cpp}Sam Atkins
2023-02-22LibWeb: Make factory method of DOM::ElementFactory fallibleKenneth Myhra
2023-02-18LibWeb: Make factory method of DOM::HTMLCollection fallibleKenneth Myhra
2023-01-29LibJS+Everywhere: Allow Cell::initialize overrides to throw OOM errorsTimothy Flynn
Note that as of this commit, there aren't any such throwers, and the call site in Heap::allocate will drop exceptions on the floor. This commit only serves to change the declaration of the overrides, make sure they return an empty value, and to propagate OOM errors frm their base initialize invocations.
2023-01-10LibWeb: Move setting of Web object prototypes to initialize()Timothy Flynn
This needs to happen before prototype/constructor intitialization can be made lazy. Otherwise, GC could run during the C++ constructor and try to collect the object currently being created.
2022-12-17LibWeb: Improve variable name in HTMLTableElementQuentin Ligier
The variables 'child_to_append_after' are used to specify the child before which new elements will be inserted, its name is misleading. These variables are always passed as 'child' to pre_insert.
2022-12-16LibWeb: Add spec links to IDL APIs in HTMLTableElementAndreas Kling
2022-12-16LibWeb: Allow setting HTMLTableElement.tFoot to null valueAndreas Kling
This annihilates 2 FIXMEs :^)
2022-12-16LibWeb: Allow setting HTMLTableElement.tHead to null valueAndreas Kling
This deals with 2 FIXMEs :^)
2022-12-16LibWeb: Allow setting HTMLTableElement.caption to null valueAndreas Kling
This takes care of 2 FIXMEs :^)
2022-12-16LibWeb: Add spec link and comment to HTMLTableElement::caption()Andreas Kling
2022-11-25LibWeb: Implement [SameObject] for HTMLTableElement.{rows,tBodies}Andreas Kling
2022-10-31LibWeb: Handle currently ignored `WebIDL::ExceptionOr<T>`sLinus Groh
2022-10-01LibWeb: Cleanup unecessary uses and includes of HTML::WindowAndrew Kaster
The big global refactor left some stragglers behind for atomicity. Clean up the rest, and remove a ton of includes of LibWeb/HTML/Window.h
2022-10-01LibWeb: Remove unecessary dependence on Window from HTML classesAndrew Kaster
These classes only needed Window to get at its realm. Pass a realm directly to construct HTML classes.
2022-09-25LibWeb: Move DOMException from DOM/ to WebIDL/Linus Groh
2022-09-25LibWeb: Move ExceptionOr from DOM/ to WebIDL/Linus Groh
This is a concept fully defined in the Web IDL spec and doesn't belong in the DOM directory/namespace - not even DOMException, despite the name :^)
2022-09-06LibWeb: Make DOMException GC-allocatedAndreas Kling
2022-09-06LibWeb: Use cached_web_prototype() as much as possibleAndreas Kling
Unlike ensure_web_prototype<T>(), the cached version doesn't require the prototype type to be fully formed, so we can use it without including the FooPrototype.h header. It's also a bit less verbose. :^)
2022-09-06LibWeb: Make HTMLCollection and subclasses GC-allocatedAndreas Kling
2022-09-06LibWeb+LibJS: Make the EventTarget hierarchy (incl. DOM) GC-allocatedAndreas Kling
This is a monster patch that turns all EventTargets into GC-allocated PlatformObjects. Their C++ wrapper classes are removed, and the LibJS garbage collector is now responsible for their lifetimes. There's a fair amount of hacks and band-aids in this patch, and we'll have a lot of cleanup to do after this.
2022-03-26LibWeb: Move HTML dimension value parsing from CSS to HTML namespaceAndreas Kling
These are part of HTML, not CSS, so let's not confuse things.
2022-03-26LibWeb: Treat width/height on table elements as non-zero dimension valueAndreas Kling
2022-03-17Libraries: Use default constructors/destructors in LibWebLenny 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-03-12LibWeb: Correct invalid index check in HTMLTableElement::insertRow()Idan Horowitz
As well as change the matching error message in deleteRow(), which likely caused this mistake in the first place.
2022-02-19LibWeb: Move QualifiedName into the Web::DOM namespaceAndreas Kling
2021-12-21LibWeb: Fix null-deref in <table> delete_row with index = -1 and no rowsLuke Wilde
This wasn't quite following what the spec says for step 2: "If index is −1, then remove the last element in the rows collection from its parent, or do nothing if the rows collection is empty." It was behaving like: "If index is −1 and the rows collection is not empty, then remove the last element in the rows collection from its parent." Which is not the same, as it will fall into the "Otherwise" if `index == -1` and the rows collection is empty and try and get the -2nd element of the rows. Found with Domato.
2021-09-03Everywhere: Prevent risky implicit casts of (Nonnull)RefPtrDaniel Bertalan
Our existing implementation did not check the element type of the other pointer in the constructors and move assignment operators. This meant that some operations that would require explicit casting on raw pointers were done implicitly, such as: - downcasting a base class to a derived class (e.g. `Kernel::Inode` => `Kernel::ProcFSDirectoryInode` in Kernel/ProcFS.cpp), - casting to an unrelated type (e.g. `Promise<bool>` => `Promise<Empty>` in LibIMAP/Client.cpp) This, of course, allows gross violations of the type system, and makes the need to type-check less obvious before downcasting. Luckily, while adding the `static_ptr_cast`s, only two truly incorrect usages were found; in the other instances, our casts just needed to be made explicit.
2021-08-02LibWeb: Switch to new CSS Parser :^)Sam Atkins
Change all the places that were including the deprecated parser, to include the new one instead, and then delete the old parser code. `ParentNode::query_selector[_all]()` now treat their input as a comma-separated list of selectors, instead of just one, and return elements that match any of the selectors in that list. This is according to these specs: - querySelector/querySelectorAll: https://dom.spec.whatwg.org/#ref-for-dom-parentnode-queryselector%E2%91%A0 - selector matching algorithm: https://www.w3.org/TR/selectors-4/#match-against-tree
2021-07-11LibWeb: Fix HTMLTable Element attributesAdam Hodgen
`Element::tag_name` return an uppercase version of the tag name. However the `Web::HTML::TagNames` values are all lowercase. This change fixes that using `Element::local_name`, which returns a lowercase value.
2021-07-05LibWeb: Make WrapperGenerator generate nullable wrapper typesLuke
Previously it was not doing so, and some code relied on this not being the case. In particular, set_caption, set_t_head and set_t_foot in HTMLTableElement relied on this. This commit is not here to fix this, so I added an assertion to make it equivalent to a reference for now.
2021-06-24AK: Rename downcast<T> => verify_cast<T>Andreas Kling
This makes it much clearer what this cast actually does: it will VERIFY that the thing we're casting is a T (using is<T>()).
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-04-22Everything: Move to SPDX license identifiers in all files.Brian Gianforcaro
SPDX License Identifiers are a more compact / standardized way of representing file license information. See: https://spdx.dev/resources/use/#identifiers This was done with the `ambr` search and replace tool. ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-03-09LibWeb: Rename CSSParser => DeprecatedCSSParserAndreas Kling
2021-02-07LibWeb: Use move semantics for QualifiedName more oftenAndreas Kling
2021-01-12Libraries: Move to Userland/Libraries/Andreas Kling