ladybird/Userland/Libraries/LibWeb
Sam Atkins bcacc2357e LibWeb: Implement smarter CSS StyleValue parsing
We know what types and identifiers a property can accept, so we can use
that information to only parse things that can be accepted. This solves
some awkward ambiguity problems that we have now or will face in the
future, including:

- Is `0` a number or a length with no unit?
- Is `3.5` a number or a ratio?
- Is `bottom` an identifier, or a custom-ident?

Two CSS Parser methods are introduced here:

`parse_css_value_for_property()` attempts to parse a StyleValue that the
property can accept, skipping any types that it doesn't want.

`parse_css_value_for_properties()` does the same, but takes multiple
PropertyIDs and additionally returns which one the parsed StyleValue is
for. This is intended for parsing shorthands, so you can give it a list
of longhands you haven't yet parsed.

Subsequent commits will actually use these new methods.
2023-05-25 06:36:10 +02:00
..
ARIA Everywhere: Rename equals_ignoring_case => equals_ignoring_ascii_case 2023-03-10 13:15:44 +01:00
Bindings LibJS+LibWeb: Add missing visit calls in visit_edges implementations 2023-04-30 06:04:33 +02:00
Cookie Userland: Remove remaining users of Duration::now_realtime() 2023-05-24 23:18:07 +02:00
Crypto AK+Everywhere: Change AK::fill_with_random to accept a Bytes object 2023-04-03 15:53:49 +02:00
CSS LibWeb: Implement smarter CSS StyleValue parsing 2023-05-25 06:36:10 +02:00
DOM Userland: Remove remaining users of Duration::now_realtime() 2023-05-24 23:18:07 +02:00
DOMParsing LibWeb: Don't include DOM/NamedNodeMap.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
Encoding LibWeb/WebIDL: Store SimpleException message as a String{,View} variant 2023-03-03 19:50:36 +00:00
Fetch LibWeb: Don't assume response object isn't null in fetch abort algorithm 2023-05-21 16:19:31 +02:00
FileAPI Userland: Remove remaining users of Duration::now_realtime() 2023-05-24 23:18:07 +02:00
Geometry LibWeb: Don't divide by 0 in DOMMatrix::invert_self() 2023-05-04 15:39:34 +02:00
HighResolutionTime Everywhere: Use MonotonicTime instead of Duration 2023-05-24 23:18:07 +02:00
HTML Everywhere: Use MonotonicTime instead of Duration 2023-05-24 23:18:07 +02:00
Infra LibJS: Make intrinsics getters return NonnullGCPtr 2023-04-13 14:29:42 +02:00
IntersectionObserver LibWeb: Make factory method of IntersectionObserver fallible 2023-02-22 09:55:33 +01:00
Layout LibWeb: Sum horizontal margins to calculate space used by floats 2023-05-24 18:58:42 +02:00
Loader AK: Rename Time to Duration 2023-05-24 23:18:07 +02:00
MimeSniff Everywhere: Remove unused DeprecatedString includes 2023-04-09 22:00:54 +02:00
NavigationTiming LibWeb: Specify snake case names for navigation timing entries too 2023-05-13 16:31:10 +02:00
Page LibWeb: Make CSSPixels and Length use 64-bit (double) floating point 2023-05-24 14:40:35 +02:00
Painting LibWeb: Make CSSPixels and Length use 64-bit (double) floating point 2023-05-24 14:40:35 +02:00
PerformanceTimeline LibWeb: Introduce Performance Timeline and its Performance functions 2023-03-23 21:00:43 +00:00
PermissionsPolicy LibWeb+LibWebView+WebContent: Add APIs to manage an autoplay allowlist 2023-04-18 16:30:02 +02:00
Platform LibWeb+Browser+Ladybird: Use JS::SafeFunction for EventLoop callbacks 2023-04-21 20:44:47 +01:00
ReferrerPolicy LibWeb: Add ReferrerPolicy::EmptyString 2023-04-25 12:54:01 +02:00
RequestIdleCallback LibWeb/HTML: Port Window.requestIdleCallback() to IDL 2023-03-07 23:33:34 +00:00
ResizeObserver LibWeb: Make factory method of ResizeObserver::ResizeObserver fallible 2023-02-22 09:55:33 +01:00
Scripts LibWeb: Store stylesheet sources as StringViews 2023-02-19 00:51:16 +01:00
SecureContexts Everywhere: Rename to_{string => deprecated_string}() where applicable 2022-12-06 08:54:33 +01:00
Selection LibWeb: Make factory method of Selection::Selection fallible 2023-02-22 09:55:33 +01:00
SRI LibWeb: Implement integrity-metadata part of fetch algorithm 2023-04-21 20:44:47 +01:00
Streams LibWeb: Implement ReadableByteStreamController.error() 2023-04-27 07:57:53 +02:00
SVG LibWeb: Make CSSPixels and Length use 64-bit (double) floating point 2023-05-24 14:40:35 +02:00
Tests Everywhere: Rename WrapperGenerator to BindingsGenerator 2022-09-21 23:06:08 +01:00
UIEvents LibWeb: Preserve case for key events 2023-05-23 06:02:00 +02:00
URL Everywhere: Change spelling of 'behaviour' to 'behavior' 2023-05-07 01:05:09 +02:00
UserTiming LibWeb: Implement performance.{measure,clearMeasures} 2023-05-13 16:31:10 +02:00
WebAssembly LibJS: Port Value::to_object() to NonnullGCPtr 2023-04-14 09:59:29 +02:00
WebAudio LibWeb: Stub AudioContext constructor 2023-05-22 06:07:05 +02:00
WebDriver Everywhere: Use MonotonicTime instead of Duration 2023-05-24 23:18:07 +02:00
WebGL LibWeb: Don't include Layout/Node.h from DOM/Element.h 2023-05-08 09:29:44 +02:00
WebIDL LibWeb: Implement IDL overload resolution steps to clamp argument counts 2023-05-07 06:30:27 +02:00
WebSockets LibWeb: Make WebSocket#send support typed arrays, Blob and DataView 2023-04-21 07:59:50 +02:00
XHR LibJS: Port create_iterator_result_object() to NonnullGCPtr 2023-04-15 16:26:42 +02:00
XML LibWeb: Make XMLDocumentBuilder create elements with the HTML namespace 2023-05-01 15:22:55 +02:00
CMakeLists.txt LibWeb: Stub AudioContext constructor 2023-05-22 06:07:05 +02:00
Dump.cpp LibWeb: Include weight and slope in CSSFontFaceRule debug dumps 2023-05-24 20:58:46 +02:00
Dump.h LibWeb+Browser+Ladybird: Add menu action to dump paint tree 2023-03-18 20:23:35 +01:00
FontCache.cpp LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
FontCache.h LibWeb: Scale the font when painting the text on buttons 2023-03-15 23:29:00 +01:00
Forward.h LibWeb: Stub AudioContext constructor 2023-05-22 06:07:05 +02:00
idl_files.cmake LibWeb: Stub AudioContext constructor 2023-05-22 06:07:05 +02:00
Namespace.cpp LibWeb: Initialize static web strings during main-thread VM creation 2023-03-18 19:50:45 +01:00
Namespace.h LibWeb: Initialize static web strings during main-thread VM creation 2023-03-18 19:50:45 +01:00
PixelUnits.h LibWeb: Make CSSPixels and Length use 64-bit (double) floating point 2023-05-24 14:40:35 +02:00
TreeNode.h LibJS+LibWeb: Move headers around to allow including Value from Cell 2023-01-29 00:02:45 +00:00