Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
This will simplify upcoming Label porting in ThemeEditor.
|
|
This can be used to convert a profile-dependent color to the L*a*b*
color space.
(I'd like to use this to implement the DeltaE (CIE 2000) algorithm,
which is a metric for how similar two colors are perceived.
(And I'd like to use that to evaluate color conversion roundtrip
quality, once I've implemented full conversions.)
|
|
|
|
To be able to port c-ares the IN6_IS_ADDR_V4COMPAT and
various macros of the form IN6_IS_ADDR_MC_XX_LOCAL were added
as well as the IN_CLASS{A,B} macros
|
|
Length units are either relative to the font, or to the viewport, but
never both. So we can save some work by not gathering font metrics for
a viewport unit, and not retrieving the viewport for a font unit.
Currently this is only helpful when the `to_px(Layout::Node)` method is
called, but since that is 208 places according to CLion, (plus 33
indirect uses via `Length::resolved()`) it still seems worthwhile. :^)
|
|
`*vi` and `*vb` vary on which direction they check depending on whether
the writing mode is horizontal or vertical, so they will need some
modification once we support that.
|
|
`sfoo` `lfoo` and `dfoo` are, for our purposes, identical to `foo`,
because we don't have dynamic GUI elements that cover the page content.
|
|
Using the rough heuristic instead of the actual spec measurement. It's
allowed by the spec, but not ideal:
> In the cases where it is impossible or impractical to determine the
ideographic advance measure, it must be assumed to be 1em.
|
|
As noted, the ascent of the font is not the best heuristic for this, but
it is one that's listed as OK to use by the spec:
> In the cases where it is impossible or impractical to determine the
cap-height, the fontโs ascent must be used.
|
|
These are the same as `ex` and `ch`, but using the root element's
metrics. We now have this information available, so let's use it. :^)
|
|
This saves us from doing a lot of the same work multiple times, when we
want both the root font size and its line height.
|
|
Rather than passing an increasingly-unwieldy number of font parameters
individually to every function that resolves lengths, let's wrap them
up.
This is frustratingly close to being `Gfx::FontPixelMetrics`, but bitmap
fonts cause issues: We choose the closest font to what the CSS
requests, but that might have a wildly different size than what the
page expects, so we have to fudge the numbers.
No behaviour changes.
|
|
|
|
|
|
I missed this when removing calc() from Length. Oops!
|
|
They previously weren't sorted at all. Alphabetical would be nice, but
then things like `em` and `rem` would be separated. So, let's copy the
spec's order. That way it's easier to keep track of which units we have
or haven't implemented. (Since there are so many...)
|
|
Fix table box width calculation to minus horizonal borders from space
available for columns.
|
|
|
|
|
|
Given that XYZ and xyz are distinct things, let's use the correct
case for these member variables.
No behavior change.
|
|
|
|
Only implemented for matrix profiles so far.
This API won't be fast enough to color manage images, but let's
get something working before getting something fast.
|
|
...and make its return type unsigned.
|
|
Should be good enough.
|
|
This commit implements following missing steps in table layout:
- Calculate final table height
- Resolve percentage height of cells and rows using final table height
- Distribute avilable height to table rows
|
|
If total max columns width (grid_max) is zero then available width
should be divided equally between columns. Previously there was
division by zero: `column.max_width / grid_max`.
|
|
|
|
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-all-used-history-steps
|
|
|
|
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-session-history-entries
|
|
|
|
|
|
|
|
This bit is mostly ad-hoc for now. This simply turns fill: url(#grad1)
into document().get_element_by_id('grad1') then resolves the gradient.
This seems to do the trick for most use cases, but this is not
attempting to follow the spec yet to keep things simple.
|
|
This represents the SVG <linearGradient>. The actual gradient is
converted to a Gfx::PaintStyle for use in SVG fills... There is a little
guesswork in the implementation, but it seems to match Chrome/Firefox.
Note: Still not hooked up to actual painting in this commit.
|
|
|
|
This is the base class for all SVG gradient types. This supports:
- The `gradientUnits` attribute
- The `gradientTransform` attribute
- And following `xlink:hrefs` for inheriting <stops>/attributes
|
|
This does not do anything yet, but will allow for gradients later!
|
|
This is primarily being added to support `fill: url(#gradient)` for
SVGs.
|
|
This is used to specify the color/position of color stops for SVG
gradients.
|
|
(This is to set the color of a stop for an SVG gradient)
|
|
This will be needed to access the color of a stop from a SVG gradient
<stop> element (which does not participate in layout, so does not have
a layout node).
|
|
|
|
See https://www.w3.org/TR/2013/WD-SVG2-20130409/types.html#InterfaceSVGAnimatedNumber
|
|
I found this handy for debugging, and so might others.
This now also adds a formatter for TimeZone::TimeZone. This is needed
for FormatIfSupported<Optional<TimeZone::TimeZone>> to compile. As
FormatIfSupported sees a formatter for Optional exists, but not that
there's not one for TimeZone::TimeZone.
|
|
Previously, the minimum height of a table row was calculated based
on the automatic height of the cells inner layout. This change makes
computed height of a cell boxes also be considered if it has definite
value.
|
|
Fixes the issue that currently we do not consider table rows height
while calculating min row height even if it is definite value.
|