mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-22 17:24:48 -05:00
eb11c35640
When we originally implemented calc(), the result of a calculation was guaranteed to be a single CSS type like a Length or Angle. However, CSS Values 4 now allows more complex type arithmetic, which is represented by the CSSNumericType class. Using that directly makes us more correct, and allows us to remove a large amount of now ad-hoc code. Unfortunately this is a large commit but the changes it makes are interconnected enough that doing one at a time causes test regressions. In no particular order: - Update our "determine the type of a calculation" code to match the newest spec, which sets percent hints in a couple more cases. (One of these we're skipping for now, I think it fails because of the FIXMEs in CSSNumericType::matches_foo().) - Make the generated math-function-parsing code aware of the difference between arguments being the same type, and being "consistent" types, for each function. Otherwise those extra percent hints would cause them to fail validation incorrectly. - Use the CSSNumericType as the type for the CalculationResult. - Calculate and assign each math function's type in its constructor, instead of calculating it repeatedly on-demand. The `CalculationNode::resolved_type()` method is now entirely unused and has been removed. |
||
---|---|---|
.. | ||
EditorConfiguration | ||
HumanInterfaceGuidelines | ||
Images | ||
AddNewIDLFile.md | ||
AdvancedBuildInstructions.md | ||
BrowsingContextsAndNavigables.md | ||
BuildInstructionsLadybird.md | ||
BuildProfilingInstructions.md | ||
CodingStyle.md | ||
CSSGeneratedFiles.md | ||
EventLoop.md | ||
FAQ.md | ||
GettingStartedContributing.md | ||
LibWebFromLoadingToPainting.md | ||
LibWebPatterns.md | ||
Patterns.md | ||
Porting.md | ||
ProcessArchitecture.md | ||
README.md | ||
SmartPointers.md | ||
StringFormatting.md | ||
Testing.md | ||
Troubleshooting.md |
Ladybird Documentation
Ladybird development moves quickly, so some of these might be out of date. Please let us know if something here is wrong, or submit a PR with any additions or corrections! If you have any questions that are not answered here or in the FAQ, you are welcome to ask on Discord.
Building and Running
Configuring Editors
Development
- How to Contribute
- Coding Style
- Common Patterns
- Guidelines for Text in UI
- EventLoop
- Smart Pointers
- String Formatting