Age | Commit message (Collapse) | Author |
|
|
|
|
|
To no one's surprise, this patch is pretty big - this is possibly the
most used AO of all of them. Definitely worth it though.
|
|
HTML::EventLoop tries to reschedule itself when there are more tasks in
any of its queues, but let's not do it if none of them are runnable.
|
|
|
|
Since we expose these strings to web content via LengthStyleValue,
let's not have non-standard brackets in there to confuse anyone trying
to parse these values. :^)
|
|
[CSS Color 4] tells us to use either rgb() or rgba() notation, depending
on the color's alpha value.
|
|
This patch adds the "has a rendering opportunity" concept from the spec
to BrowsingContext and uses it to filter out contexts that are unable
to render right now when doing the event loop's rendering updates.
Note that we actually consider all contexts to have a rendering
opportunity at all times right now. Coming up with reasons to avoid
rendering is left as a FIXME. :^)
|
|
|
|
|
|
This will be used by the event loop processing model.
|
|
DOM::Document has some special lifetime rules to support the DOM
lifetime semantics expected on the web. Any DOM node will keep its
document alive as well, even after the document's ref-count has reached
zero. This is achieved by the Document::m_referencing_node_count
counter.
Because of this mechanism, we can't VERIFY(m_ref_count) in TreeNode
where T may be a DOM::Document.
|
|
We were previously willing to execute tasks before they had become
runnable.
|
|
This algorithm now saved and restores the JavaScript execution context
stack while performing a microtask checkpoint, as the spec mandates.
|
|
This also allows removing the cssText attribute being on CSSStyleRule.
|
|
The timestamp needs to be consistent with the "current high resolution
time" as reflected by window.performance.now
|
|
We now invoke DOM timer callbacks via HTML tasks. This brings callback
sequencing closer to the spec, although there are still many
imperfections in this area.
|
|
This changes the old child_nodes implementation to children_as_vector
so that can still be used in insert_before.
|
|
|
|
This introduces 3 classes: NodeList, StaticNodeList and LiveNodeList.
NodeList is the base of the static and live versions. Static is a
snapshot whereas live acts on the underlying data and thus inhibits
the same issues we have currently with HTMLCollection.
They were split into separate classes to not have them weirdly
mis-mashed together.
The create functions for static and live both return a NNRP to the base
class. This is to prevent having to do awkward casting at creation
and/or return, as the bindings expect to see the base NodeList only.
|
|
Since this is a debug-only feature, let's not have it impact GC marking
performance when you don't need it.
|
|
|
|
|
|
There are a handful of FIXME's here, but this seems generally good.
Note that CSS *values* don't get serialized in a spec-compliant way
since we currently rely on StyleValue::to_string() which is ad-hoc.
|
|
Turns out we need to support *both* of these styles since there's
content that uses one or both of these.
|
|
|
|
A flex-basis of zero doesn't actually mean that the preferred size of
the particular Box is 0. It means that the Box should take the least
amount of space possible while still accomodating the content inside.
We catch and circumvent this now right when the flex-basis property gets
read for the FlexFormattingContext.
This isn't mentioned anywhere in the seemingly relevant portions of the
spec, however thanks to this answer https://stackoverflow.com/a/47579078
(which is not entirely correct about width either) lead to the behavior
that is wanted and used by other Browsers.
|
|
|
|
These are defined as integers only in the legacy specification, the
new one defines these as doubles.
|
|
This commit also does a bit of general cleanup on the header file.
|
|
|
|
This was accidentally set to Event
|
|
|
|
|
|
|
|
|
|
This commit also removes the SubmitEvent.cpp file, as all of the method
implementations were trivial and could be inlined into the header file.
|
|
|
|
|
|
|
|
|
|
This allows us to include IDL files from other base LibWeb directories
wihout using relative `../foo.idl` references.
|
|
While not complete by any means, we are now compatible with the [level 3
spec](https://www.w3.org/TR/css3-mediaqueries/#syntax) and some parts of
[level 4.](https://www.w3.org/TR/mediaqueries-4#mq-syntax)
Compatibility with level 4+ requires:
- Implementing the range syntax: `(800px <= width <= 1200px)`
- Parsing `<general-enclosed>`, which represents syntax that is not yet
used but they may use in the future.
|
|
Parsing media queries sometimes requires significant back-tracking, so
`reconsume_current_input_token()` was not good enough.
`rewind_to_position()` lets you reconsume an erbitrary number of tokens
to return to an earlier point in the stream, which you previously saved
from `TokenStream::position()`.
|
|
This is not yet actually useful, since we only have a stub for parsing
the query part, but now I have a nice way to test that things are
working. :^)
|
|
This now matches the spec, and fixes the situation where if it was given
a TokenStream of StyleComponentValueRules, it would drop any Blocks on
the floor instead of adding them to the result StyleRule.
|
|
|
|
This does everything except actually parse the individual media queries.
|
|
This is the class corresponding to a `@media` rule. It contains a list
of media queries and a list of child css rules.
|
|
This is a list of MediaQuery objects. Not to be confused with
`MediaQueryList`, which is concerned with firing events when a media
query's match-state changes.
|