Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Specifically, IDL files that do not include interface or enumeration
declarations do not generate any code, and as such should not be
included.
|
|
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.
|
|
These values may not fit into an i32.
|
|
|
|
|
|
This makes wrappers stringify to the expected "[object InterfaceName]"
instead of just "[object Object]".
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
We were mistakenly treating all CSS properties as if changing them
requires a rebuild of the stacking context tree.
|
|
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.
|
|
|
|
The float type is used quite a bit in the SVG spec.
|
|
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. :^)
|
|
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.
|
|
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.
|
|
|
|
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`.
|
|
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.
|
|
Co-Authored-By: Luke Wilde <lukew@serenityos.org>
|
|
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%. :^)
|
|
|
|
|
|
|
|
|
|
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.
|
|
Only "range" type media-features are allowed to appear in range syntax,
or have a `min-/max-` prefix.
|
|
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. :^)
|
|
These were duplicated among the CSS generators.
|
|
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.
|
|
The Window object is part of the HTML spec. :^)
https://html.spec.whatwg.org/multipage/window-object.html
|
|
|
|
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.
|
|
|
|
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/'
|
|
|
|
As there's a somewhat active development going on, let's keep the
expected behaviour under tests to make sure nothing blows up :^)
|
|
LibSyntax was already building for lagom without any extra changes
so let's just enable it :^)
|
|
Avoid trying to memcpy from 0-byte sources as well, by bailing early on
nullptr data inputs.
|
|
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.
|
|
|
|
This also fixes some indentation issues in the generated code.
|
|
This allows dictionaries to appear in sequences, records and unions.
|
|
|
|
WebIDL checks the type of the value is Object instead of performing
ToObject on the value.
https://webidl.spec.whatwg.org/#implements
|
|
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.
|