1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 15:48:12 +00:00
serenity/Userland/Libraries/LibWeb/DOM
Sam Atkins 1b72766e4e LibWeb: Fix issues with CSS attribute selector handling
This is three small, related changes:

1. Element::has_attribute() now returns true if the attribute exists but
has no value. (eg, `<div foo />` -> `has_attribute("foo")`)

2. SelectorEngine::matches_attribute() now makes sure there is a first
segment before comparing it, fixing a crash.

3. CSS::Parser now converts attribute names in attribute selectors to
lowercase, to match the expectations of the rest of the system.
Converting to lowercase is not always correct, depending on language,
but since we only currently support HTML, and that expects them to be
case-insensitive, it is fine for now.
2021-07-31 00:18:11 +02:00
..
Attribute.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterData.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterData.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
CharacterData.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Comment.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Comment.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Comment.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Document.cpp LibWeb: Don't print JavaScript syntax error hints 2021-07-20 16:20:59 +02:00
Document.h LibWeb: Make WrapperGenerator generate nullable wrapper types 2021-07-05 12:39:46 +02:00
Document.idl LibWeb: Add Document.{images,embeds,plugins,links,forms,scripts} 2021-05-04 23:40:43 +01:00
DocumentFragment.cpp LibWeb+HackStudio: Use lukew@serenityos.org for my copyright headers 2021-04-22 23:15:33 +02:00
DocumentFragment.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DocumentFragment.idl LibWeb: Move element_child_count to ParentNode and add its IDL attribute 2021-04-11 18:32:42 +02:00
DocumentType.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
DocumentType.h LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DocumentType.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
DOMException.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
DOMException.idl LibWeb: Add support for optional default values and optional bools in IDL 2021-04-11 18:27:52 +02:00
DOMImplementation.cpp LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DOMImplementation.h LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
DOMImplementation.idl LibWeb: Add createDocument and createDocumentType for DOMImplementation 2021-05-04 22:59:15 +01:00
Element.cpp LibWeb: Add context to new CSS parser, and deprecate the old one 2021-07-11 23:19:56 +02:00
Element.h LibWeb: Fix issues with CSS attribute selector handling 2021-07-31 00:18:11 +02:00
Element.idl LibWeb: Expose Element.{prefix,localName} 2021-05-11 18:01:36 +02:00
ElementFactory.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
ElementFactory.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Event.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
Event.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Event.idl LibWeb: Add Event.initEvent 2021-04-11 18:27:52 +02:00
EventDispatcher.cpp LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
EventDispatcher.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
EventListener.cpp LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
EventListener.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
EventTarget.cpp LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
EventTarget.h LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
EventTarget.idl LibWeb: Implement EventTarget.dispatchEvent 2021-05-04 23:41:44 +01:00
ExceptionOr.h LibWeb: Make ExceptionOr capable of holding all error types in the spec 2021-06-27 12:49:49 +01:00
HTMLCollection.cpp LibWeb: Implement a slow but functional HTMLCollection :^) 2021-04-22 21:21:46 +02:00
HTMLCollection.h AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
HTMLCollection.idl LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
Node.cpp LibWeb: Implement Node.contains 2021-07-05 12:39:46 +02:00
Node.h LibWeb: Implement Node.contains 2021-07-05 12:39:46 +02:00
Node.idl LibWeb: Implement Node.contains 2021-07-05 12:39:46 +02:00
NonDocumentTypeChildNode.h AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
NonElementParentNode.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ParentNode.cpp LibWeb: Avoid UAF in query_selector{,_all}() 2021-07-17 01:48:04 +04:30
ParentNode.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Position.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
Position.h LibWeb: Frame/Position: Implement cursor increment/decrement methods 2021-05-21 21:57:03 +02:00
ProcessingInstruction.cpp Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessingInstruction.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ProcessingInstruction.idl LibWeb: Add ProcessingInstruction node 2021-04-06 21:42:00 +02:00
Range.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Range.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Range.idl LibWeb: Add constructor to Range IDL interface 2021-02-17 23:45:07 +01:00
ShadowRoot.cpp AK: Rename downcast<T> => verify_cast<T> 2021-06-24 19:57:01 +02:00
ShadowRoot.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
ShadowRoot.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Text.cpp AK: Rename adopt() to adopt_ref() 2021-04-23 16:46:57 +02:00
Text.h Everything: Move to SPDX license identifiers in all files. 2021-04-22 11:22:27 +02:00
Text.idl Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Timer.cpp LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Timer.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Window.cpp LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00
Window.h LibJS: Rename Function => FunctionObject 2021-06-27 22:36:04 +02:00