Age | Commit message (Collapse) | Author |
|
We can now use vh, vw, vmax and vmin as length units in CSS.
|
|
...{All} to ParentNode. Exposes createDocumentFragment and
createComment on Document. Stubs out the document.body setter.
Also adds ParentNode back :^).
|
|
|
|
This enables a nice warning in case a function becomes dead code. Also, in the
case of {Event,Node}WrapperFactory.cpp, the corresponding header was forgotten.
This would cause an issue later when we enable -Wmissing-declarations.
Is my clang-format misconfigured? Why is the diff for NodeWrapperFactory.cpp
so large?
|
|
This file has been moved from DOM/ to HTML/ in
a784090b91139776b26fbac2a8426de3abdea308.
|
|
We've had StringView::ends_with(..., CaseSensitivity) for a while,
so let's use it to avoid creating a bunch of unnecessary strings here.
|
|
These are pretty rare, but they do come up in some places and it's not
hard to support. The Gfx::Font information is approximate (and bad)
but we can fix that separately.
|
|
|
|
|
|
|
|
|
|
LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
|
|
|
|
Take a hint from SVG and more all the HTML classes into HTML instead of
mixing them with the DOM classes.
|
|
To prepare for fully qualified tag names, let's call this local_name.
Note that we still keep an Element::tag_name() around since that's what
the JS bindings end up calling into for the Element.tagName property.
|
|
Thanks @nico for teaching me about this!
|
|
|
|
|
|
|
|
Quite often, we want the same behavior in both cases. This allows us
to express that with a single method.
|
|
|
|
"width: 500" is not a valid CSS property in standards mode and should
be ignored.
To plumb the quirks-mode flag into CSS parsing, this patch adds a new
CSS::ParsingContext object that must be passed to the CSS parser.
Currently it only allows you to check the quirks-mode flag. In the
future it will be a good place to put additional information needed
for things like relative URL resolution, etc.
This narrows <div class=parser> on ACID2 to the correct width. :^)
|
|
|
|
Note that we don't use the property for anything yet, as I'm still
wrapping my head around how to implement floats.
|
|
|
|
|
|
Instead of storing the three-part specificy for every selector,
just mash them together into a 32-bit value instead.
This saves both space and time, and matches the behavior of other
browser engines.
|
|
"10 percentage" looked rather silly. :^)
|
|
|
|
|
|
The display property is not interesting after we've built the layout
tree, so we don't have to move it into LayoutStyle.
|
|
This patch also adds the ability for Length to contain percentage
values. This is a little off-spec, but will make storing and dealing
with lengths a lot easier.
To resolve a Length to a px-or-auto Length, there are now helpers
for that. After calling them, you no longer have to think about
em, rem, %, and such things.
|
|
A default-constructed Length now gives you an undefined length value,
which can be used to signify the absence of a value.
|
|
To prepare for adding an undefined/empty state for Length, let's first
move away from Length() creating an auto value.
|
|
|
|
Only do the relative Length units out of line.
|
|
|
|
To support z-ordering when painting, the layout tree now has a parallel
sparse tree of stacking contexts. The rules for which layout boxes
establish a stacking context are a bit complex, but the intent is to
encapsulate the decision making into establishes_stacking_context().
When we paint, we start from the ICB (LayoutDocument) who always has a
StackingContext and then paint the tree of StackingContexts where each
node has its children sorted by z-index.
This is pretty crude, but gets the basic job done. Note that this does
not yet support hit testing; hit testing is still done using a naive
treewalk from the root.
|
|
|
|
|
|
Note that align=center and align=middle both behave like the <center>
element, and not like text-align:center.
|
|
To get the expected behavior for <center>, we needed a special text
alignment mode that centers block-level elements (and not just line
box fragments.)
|
|
I think maybe this is only supposed to happen in quirks mode but I'm
not entirely sure. This makes "<center><table>..." behave as expected.
|
|
If two rules have equal specificity, they should be applied in the
order in which we encountered them.
|
|
|
|
If we don't do this, something like "a:visited" is parsed as "a" which
may then take precedence over a previous "a:link" etc.
|
|
This is very hackish and will be fixed by writing a proper CSS parser.
|
|
If something is already e.g a length or a color value, we don't need
to try to expand it by stringifying and looking at the parts.
|
|
This gives us a yellow forehead on ACID2! :^)
|
|
|