Age | Commit message (Collapse) | Author |
|
This fixes the issue when margin collapsing state was always reset if
a box has clear property not equal to none even if it does not actually
introduce clearance.
|
|
|
|
This was crashing on google.com with the linux chrome user agent,
interestingly it seems like this behavior may have been accidental as
only two of the three `parse_number()` were changed in f7dbcb6
|
|
Ignore anonymous block boxes when resolving percentage weights that
would refer to them, per the CSS 2 visual formatting model
specification. This fixes the case when we create an anonymous block
between an image which uses a percentage height relative to a parent
which specifies a definite height.
Fixes #19052.
|
|
|
|
This makes cross-origin image loads actually see the MIME type the
server tells us. :^)
|
|
|
|
If some page throws "display: ruby-text" or some such at us, let's just
complain and carry on.
|
|
If CSS requests a font that we have loaded, but we didn't associate it
with a specific weight and/or slope, let's still use it if it matches
the family name.
This is a hack until we implement proper CSS font selection.
|
|
This corresponds to the `<custom-ident>` type in CSS grammar.
|
|
|
|
We now create a flex container inside the input element's UA shadow tree
and add the placeholder and non-placeholder text as flex items (wrapped
in elements whose style we can manipulate).
This fixes the visual glitch where the placeholder would appear below
the bounding box of the input element. It also allows us to align the
text vertically inside the input element (like we're supposed to).
In order to achieve this, I had to make two small architectural changes
to layout tree building:
- Elements can now report that they represent a given pseudo element.
This allows us to instantiate the ::placeholder pseudo element as an
actual DOM element inside the input element's UA shadow tree.
- We no longer create a separate layout node for the shadow root itself.
Instead, children of the shadow root are treated as if they were
children of the DOM element itself for the purpose of layout tree
building.
|
|
This is to prepare for making some custom internal divs inside the input
element UA shadow tree.
|
|
:^)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
To make this work, we also add `none` as a valid identifier for `flex`.
(This is correct, we just didn't need it before.)
|
|
|
|
|
|
|
|
|
|
That is, properties that don't have a bespoke parsing function.
|
|
We know what types and identifiers a property can accept, so we can use
that information to only parse things that can be accepted. This solves
some awkward ambiguity problems that we have now or will face in the
future, including:
- Is `0` a number or a length with no unit?
- Is `3.5` a number or a ratio?
- Is `bottom` an identifier, or a custom-ident?
Two CSS Parser methods are introduced here:
`parse_css_value_for_property()` attempts to parse a StyleValue that the
property can accept, skipping any types that it doesn't want.
`parse_css_value_for_properties()` does the same, but takes multiple
PropertyIDs and additionally returns which one the parsed StyleValue is
for. This is intended for parsing shorthands, so you can give it a list
of longhands you haven't yet parsed.
Subsequent commits will actually use these new methods.
|
|
Previously we were looking these up once per background layer. Let's not
do that. :^)
|
|
All of these identifiers can be treated as a color, so let's make sure
the parser understands that.
|
|
|
|
|
|
We don't yet have generic parsing support for `<filter-value-list>` or
`<paint>`, so listing them here confuses the new StyleValue parsing code
I'm working on. For now, let's skip `<filter-value-list>` since it's
only used in one pkace which manually parses it, and list the parts of
`<paint>` instead which are taken from here:
https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint
|
|
We never actually use this, we always initialize StyleValues with a
proper type.
|
|
This is easily identifiable by anyone who uses Duration::now_monotonic,
and any downstream users of that data.
|
|
This is a clear sign that they want to use a UnixDateTime instead.
This also adds support for placing durations and date times into SQL
databases via their millisecond offset to UTC.
|
|
That's what this class really is; in fact that's what the first line of
the comment says it is.
This commit does not rename the main files, since those will contain
other time-related classes in a little bit.
|
|
Before this change, we were quantizing to either 400, 700 or 900.
This caused us to treat 100/200/300 weighted fonts as if they were
interchangeable.
|
|
|
|
|
|
This fixes the issue where max margin is used to find offset of
floating box although horizonal margins do not collapse so they need
to be summed instead.
|
|
No longer is the last horizontal line of pixels ignored during layout.
This used to be a bug in `Gfx::Rect<float>` that was fixed in
f391ccfe53e18395842d0d6b743d08d23b9108e5.
|
|
Instead of keying downloaded @font-face fonts on just the family name,
we now key them on a tuple of the family name, weight and slope.
|
|
|
|
This isn't exactly ideal factoring (though I'm not sure what is) but
this will make it possible to reuse this code in the parser.
|
|
|
|
This fixes a plethora of rounding problems on many websites.
In the future, we may want to replace this with fixed-point arithmetic
(bug #18566) for performance (and consistency with other engines),
but in the meantime this makes the web look a bit better. :^)
There's a lot more things that could be converted to doubles, which
would reduce the amount of casting necessary in this patch.
We can do that incrementally, however.
|
|
|