mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-22 17:28:30 +00:00
When parsing these, <number> is allowed anywhere that would usually allow a <length>, <length-percentage>, or <angle>. The spec is not clear on exactly how this should work (see https://github.com/w3c/svgwg/issues/792 ) so I'm using some artistic license until things are clearer: - If we expected a <length>, treat the <number> as pixels. - If we expected an <angle>, treat the <number> as degrees. - Only allow direct <number> tokens, not calc() or other functions. From what I can tell this is what the spec *intended* but I may be very wrong. In any case, telling the ParsingContext whether we're parsing one of these attributes is a cleaner approach and more correct than temporarily enabling quirks mode, which we did previously.
1.6 KiB
1.6 KiB