Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Almost everything in LibJS includes Cell.h, don't force all code to
include AK/TypeCasts.h + AK/String.h. Instead include them where they
are actually used and required.
|
|
|
|
The hyperlink only gets printed when stdout is a TTY, so e.g. something
like `shot | cat` will not get the hyperlink escapes.
|
|
|
|
*Settings applications should use the same icon as the app they manage
the settings for.
|
|
This regressed in 538cc9d9 because of a typo.
|
|
|
|
Combining month and day like this doesn't always yield correct results.
Use dayOfYear multiplied by the seconds per day instead, which does.
|
|
Evidently, going one day forward on the last day of month increases the
month number by one and resets the day to 1. Doing the same on the last
day of the year resets the month to 1.
|
|
|
|
If a menu item requires additional user input before the action can be
taken, it should have an ellipsis.
|
|
This adds more possible extensions for highlighting C/C++ files
and JavaScript module files.
|
|
|
|
.html files were recognised before -- the name was shown on
the statusbar, but it didn't actually enable the syntax highlighting.
This also sneaks a highlighting for JSON using JS highlighting.
It isn't technically correct, but so does TextEditor. :^)
|
|
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
Otherwise, space is reserved but menus aren't shown.
|
|
|
|
|
|
|
|
Previously we were only ignoring quoted ones (eg `url("data:...")`), so
now we ignore unquoted ones (eg `url(data:...)`) too.
|
|
This is a port of the code from DeprecatedCSSParser, to work with CSS
Tokens and TokenStream. I've modified it as little as possible.
|
|
|
|
|
|
Previous multi-value properties use a ValueListStyleValue, which then
gets parsed into its sub-properties in the StyleResolver. However, that
is not ideal, especially as it exposes StyleResolver to the inner
workings of the Parser and Tokenizer, which it should not need to know
about.
The way `box-shadow` was implemented as a StyleValue subclass means that
the parsing can happen inside the Parser instead, which seems like a
better solution. Converting the other complicated cases (background,
font, list-style) is on my todo list for later.
|
|
This lets us get the Length and Color values directly, without having to
create a StyleValue object and then throw it away again, when parsing
the box-shadow property in the next commit.
|
|
This is three small, related changes:
1. Element::has_attribute() now returns true if the attribute exists but
has no value. (eg, `<div foo />` -> `has_attribute("foo")`)
2. SelectorEngine::matches_attribute() now makes sure there is a first
segment before comparing it, fixing a crash.
3. CSS::Parser now converts attribute names in attribute selectors to
lowercase, to match the expectations of the rest of the system.
Converting to lowercase is not always correct, depending on language,
but since we only currently support HTML, and that expects them to be
case-insensitive, it is fine for now.
|
|
Parsing this pattern from CSS tokens turns out to be slightly crazy, but
thankfully well documented in the spec.
The spec lists the cases in order of simple -> complicated, but this
would cause problems in code, since `<n-dimension> <signed-.integer>`
would never by reached, as `<n-dimension>` comes before. Instead, I
have grouped them by their first token.
Also renamed the NthChildPattern class to ANPlusBPattern, to match spec
terminology.
|
|
The spec does not directly tell us how to parse selectors, so there are
likely some bugs here, but I've used the spec language where possible.
This is very much based on the previous selector parsing code.
Any parse error inside a selector makes the entire SelectorList
invalid, so nothing is returned.
|
|
Encountering an attribute selector was immediately ending the dump
output by mistake, and it was assigning the match types to the wrong
variable.
|
|
- CompoundSelector -> *deleted*
- ComplexSelector -> CompoundSelector
- Relation -> Combinator
Our Selector is really a ComplexSelector, but only the Parser and
SelectorEngine need to know that, so keeping it named Selector makes it
more understandable for users.
Our CompoundSelector is really a CompoundSelectorAndCombinator.
Combining the two makes sense in our codebase, but the accurate name is
so long that I think it makes the code less readable.
Renamed some Combinators to also match the spec terminology:
- AdjacentSibling -> NextSibling
- GeneralSibling -> SubsequentSibling
The previous names are somewhat ambiguous, so hopefully this is clearer.
|
|
This was a hack copied over from the old parser, but it was causing
problems with flex-grow, and probably other properties that accept
numbers. Removing it does not seem to break anything, so lets' remove
it! :^)
|
|
You can now turn debug logging for them on using `CSS_PARSER_DEBUG` and
`CSS_TOKENIZER_DEBUG`.
|
|
A couple of places required a logic change to make this work, but mostly
it's a simple case of adding &.
|
|
Also added css-import.html, which tests the 3 syntax variations on
`@import` statements. Note that the optional media-query parameter to
`@import` is not handled yet.
|
|
|
|
|
|
LibJS gets this for free from LibRegex, but let's add test cases for it.
|