summaryrefslogtreecommitdiff
path: root/Meta/Lagom
AgeCommit message (Collapse)Author
2022-03-31LibWeb: Add support for IDL callback functionsIdan Horowitz
2022-03-31LibWeb: Support non-interface top-level extended attributesIdan Horowitz
2022-03-31LibWeb: Add support for IDL typedefsIdan Horowitz
2022-03-31LibWeb: Stop generating C++ includes for non-code-generating IDL filesIdan Horowitz
Specifically, IDL files that do not include interface or enumeration declarations do not generate any code, and as such should not be included.
2022-03-30LibJS+LibUnicode: Align ECMA-402 "sanctioned" terminology with UTS 35Timothy Flynn
This is an editorial change in the Intl spec. See: https://github.com/tc39/ecma402/commit/087995c https://github.com/tc39/ecma402/commit/233d29c This also adds a missing spec link for the sanctioned units and fixes a broken spec link for IsSanctionedSingleUnitIdentifier. In LibUnicode, the NumberFormat generator is updated to use the constexpr helper to retrieve sanctioned units.
2022-03-30LibWeb: Stop casting unsigned long IDL return values to i32Idan Horowitz
These values may not fit into an i32.
2022-03-30LibWeb: Support IDL optional integer argumentsIdan Horowitz
2022-03-29markdown-check: Port to LibMainKenneth Myhra
2022-03-29LibWeb: Add @@toStringTag own property on wrappersAndreas Kling
This makes wrappers stringify to the expected "[object InterfaceName]" instead of just "[object Object]".
2022-03-29Tests: Add a basic UTF-8 to UTF-8 LibTextCodec testKarol Kosek
2022-03-28LibXML: Add a fairly basic XML parserAli Mohammad Pur
Currently this can parse XML and resolve external resources/references, and read a DTD (but not apply or verify its rules). That's good enough for _most_ XHTML documents as the HTML 5 spec enforces its own rules about document well-formedness, and does not make use of XML DTDs (aside from a list of predefined entities). An accompanying `xml` utility is provided that can read and dump XML documents, and can also run the XML conformance test suite.
2022-03-28Meta: Refactor the IPC-compiler and port it to LibMainHendiadyoin1
This does a few things in total: * Ports the IPC-compiler to LibMain * Extract some compiler steps into separate functions * Minify some appends to use appendln (or appendff in the case of StringBuilder) This reduces the clang-tidies maximum cognitive-complexity score for this file from 325 to under 100.
2022-03-26Meta: Add range checking to all numeric CSS typesSam Atkins
We did already have range checking for the `<integer>` and `<number>` types, but this patch adds this functionality to all numeric types (dimensions and percentages). The syntax in Properties.json is taken from the spec: https://www.w3.org/TR/css-values-3/#numeric-ranges eg, `length [0,∞]` defines that a Length is allowed as long as it has a positive value. The implementation here allows for any number to be the positive or negative limit, even though only 0 and positive/negative infinity are meaningful values without a unit.
2022-03-25LibWeb: Mark CSS properties as not affecting stacking context by defaultAndreas Kling
We were mistakenly treating all CSS properties as if changing them requires a rebuild of the stacking context tree.
2022-03-22LibWeb: Support IDL default values of "null" for optional argumentsTimothy Flynn
This is a bit strange in the IDL syntax, but e.g., in HTMLSelectElement, we have (simplified): undefined add(optional (HTMLElement or long)? before = null) This could instead become: undefined add(optional (HTMLElement or long) before) This change generates code for the former as if it were the latter.
2022-03-21LibWeb: Begin implementing SVGRectElement's SVGAnimatedLength attributesTimothy Flynn
2022-03-21LibWeb: Support generating IDL float typesTimothy Flynn
The float type is used quite a bit in the SVG spec.
2022-03-21LibWeb: Only invalidate stacking context tree for opacity/z-index changeAndreas Kling
I came across some websites that change an elements CSS "opacity" in their :hover selectors. That caused us to relayout on hover, which we'd like to avoid. With this patch, we now check if a property only affects the stacking context tree, and if nothing layout-affecting has changed, we only invalidate the stacking context tree, causing it to be rebuilt on next paint or hit test. This makes :hover { opacity: ... } rules much faster. :^)
2022-03-20Lagom: Build with -fsigned-charNico Weber
When building on an arm host system, char defaults to unsigned, leading to errors such as: serenity/AK/StringBuilder.cpp:198:20: error: comparison is always true due to limited range of data type [-Werror=type-limits] 198 | if (ch >= 0 && ch <= 0x1f) | Building with -fsigned-char makes things work like on Intel, and it's what we already do in Kernel/CMakeLists.txt for the same reasons.
2022-03-19Meta: Error out on find_program errors with CMake less than 3.18Brian Gianforcaro
We have seen some cases where the build fails for folks, and they are missing unzip/tar/gzip etc. We can catch some of these in CMake itself, so lets make sure to handle that uniformly across the build system. The REQUIRED flag to `find_program` was only added on in CMake 3.18 and above, so we can't rely on that to actually halt the program execution.
2022-03-19LibWeb: Handle nullish this_value when creating idl functionsstelar7
2022-03-18Everywhere: Deduplicate day/month name constantsLenny Maiorani
Day and month name constants are defined in numerous places. This pulls them together into a single place and eliminates the duplication. It also ensures they are `constexpr`.
2022-03-16LibWeb: Annotate which CSS properties may affect layoutAndreas Kling
This patch adds CSS::property_affects_layout(PropertyID) which tells us whether a CSS property would affect layout if it were changed. This will be used to avoid unnecessary relayout work when something changes that really only requires us to repaint the page. To mark a property as not affecting layout, set "affects-layout" to false in the corresponding Properties.json entry. Note that all properties affect layout by default.
2022-03-16Meta: Use the ImplementedAs value in the attribute settersin-ack
Co-Authored-By: Luke Wilde <lukew@serenityos.org>
2022-03-13LibWeb: Make CSS::property_initial_value() use an Array internallyAndreas Kling
Since we want to store an initial value for every CSS::PropertyID, it's pretty silly to use a HashMap when we can use an Array. This takes the function from ~2.8% when mousing around on GitHub all the way down to ~0.6%. :^)
2022-03-10Meta: Port Generate_CSS_PropertyID_cpp to LibMain/Core::StreamSam Atkins
2022-03-10Meta: Port Generate_CSS_PropertyID_h to LibMain/Core::StreamSam Atkins
2022-03-10Meta: Port Generate_CSS_ValueID_cpp to LibMain/Core::StreamSam Atkins
2022-03-10Meta: Port Generate_CSS_ValueID_h to LibMain/Core::StreamSam Atkins
2022-03-09Meta: Generate functions for validating media-query valuesSam Atkins
These work differently from how we validate StyleValues. There, we parse a StyleValue from the CSS, and then see if it is allowed in the property. That causes problems when the syntax is ambiguous - for example, `0` can be a number or a Length. Here instead, we ask what kinds of value are allowed for a media-feature, and then only attempt to parse those kinds of value. This makes the ambiguity problem go away. :^) Each media-feature in the spec only accepts one type of value, and/or some identifiers. This makes the switch statements for the type a bit excessive, but the spec does not *require* that only one type is allowed, so this is more future-proof.
2022-03-09LibWeb+Meta: Stop discrete media-features from parsing as rangesSam Atkins
Only "range" type media-features are allowed to appear in range syntax, or have a `min-/max-` prefix.
2022-03-09Meta: Generate CSS::MediaFeatureID enumSam Atkins
This works largely the same as the PropertyID and ValueID generators, but using LibMain, Core::Stream, and TRY(). Rather than have a MediaFeatureID::Invalid, I decided to return an Optional. We'll see if that turns out better or not. :^)
2022-03-09Meta: Move title/camel_casify() functions into their own fileSam Atkins
These were duplicated among the CSS generators.
2022-03-09LibWeb: Add basic support for DOM's NodeIterator and NodeFilterAndreas Kling
This patch adds NodeIterator (created via Document.createNodeIterator()) which allows you to iterate through all the nodes in a subtree while filtering with a provided NodeFilter callback along the way. This first cut implements the full API, but does not yet handle nodes being removed from the document while referenced by the iterator. That will be done in a subsequent patch.
2022-03-08LibWeb: Move Window from DOM directory & namespace to HTMLLinus Groh
The Window object is part of the HTML spec. :^) https://html.spec.whatwg.org/multipage/window-object.html
2022-03-07LibPDF: Propagate errors in Parser and DocumentMatthew Olsson
2022-03-05LibWeb: Add a very basic and ad-hoc version of IDL overload resolutionIdan Horowitz
This initial version lays down the basic foundation of IDL overload resolution, but much of it will have to be replaced with the actual IDL overload resolution algorithms once we start implementing more complex IDL overloading scenarios.
2022-02-26Lagom/Fuzzers: Add MP3 fuzzerLuke Wilde
2022-02-25Userland: Rename IPC ClientConnection => ConnectionFromClientItamar
This was done with CLion's automatic rename feature and with: find . -name ClientConnection.h | rename 's/ClientConnection\.h/ConnectionFromClient.h/' find . -name ClientConnection.cpp | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
2022-02-24LibWeb: Allow Angle/Frequency/Resolution/Time values for CSS propertiesSam Atkins
2022-02-23LibTest+Spreadsheet: Add some basic spreadsheet runtime behaviour testsAli Mohammad Pur
As there's a somewhat active development going on, let's keep the expected behaviour under tests to make sure nothing blows up :^)
2022-02-21Lagom: Port LibSyntaxFiliph Sandström
LibSyntax was already building for lagom without any extra changes so let's just enable it :^)
2022-02-20Fuzzers: Avoid unnecessary ByteBuffer copies in FuzzWAVLoaderAndrew Kaster
Avoid trying to memcpy from 0-byte sources as well, by bailing early on nullptr data inputs.
2022-02-20Lagom: Add two-stage build for Fuzzers to enable fuzzing generated codeAndrew Kaster
This allows us to fuzz the generated unicode and timezone database helpers, and to fuzz things like LibJS using Fuzzilli to get proper coverage of our unicode handling code. Update the Azure CI to use the new two-stage build as well, and cleanup some unused CMake options there.
2022-02-20LibWeb: Add AbortSignal as a wrappable typeLuke Wilde
2022-02-20LibWeb: Add support for dictionary types to union typesLuke Wilde
This also fixes some indentation issues in the generated code.
2022-02-20LibWeb: Add dictionary types to idl_type_name_to_cpp_typeLuke Wilde
This allows dictionaries to appear in sequences, records and unions.
2022-02-20LibWeb: Add support for optional, non-nullable wrapper typesLuke Wilde
2022-02-20LibWeb: Don't perform ToObject when converting values to wrapper typesLuke Wilde
WebIDL checks the type of the value is Object instead of performing ToObject on the value. https://webidl.spec.whatwg.org/#implements
2022-02-18LibWeb: Move WebSocket into the Web::WebSockets namespaceLinus Groh
WebSockets got moved from the HTML standard to their own, the new WebSockets Standard (https://websockets.spec.whatwg.org). Move the IDL file and implementation into a new WebSockets directory and C++ namespace accordingly.