Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
...and take a flag '--report-to-debug' that determines this behaviour.
|
|
This can definitely be improved, but it does the basic job!
|
|
This makes finding fonts from the same family much less difficult. :^)
|
|
Font files are now all named like this:
<Family><Weight><Size>.font
This will make it much easier/sane to perform font lookup.
|
|
This makes tables look a lot nicer with different-sized fonts. :^)
|
|
These aren't perfect, but it's a start and we can tweak the glyphs
as we go and discover what might look nice. :^)
|
|
|
|
|
|
|
|
This adds support for (basic) brace expansions with the following
syntaxes:
- `{expr?,expr?,expr?,...}` which is directly equivalent to `(expr expr
expr ...)`, with the missing expressions replaced with an empty string
literal.
- `{expr..expr}` which is a new range expansion, with two modes:
- if both expressions are one unicode code point long, the range is
equivalent to the two code points and all code points between the
two (numerically).
- if both expressions are numeric, the range is equivalent to both
numbers, and all numbers between the two.
- otherwise, it is equivalent to `(expr expr)`.
Closes #3832.
|
|
|
|
We need to skip over widgets that are not visible as the layout does
not update their location. This fixes finding the correct widgets
surrounding the splitter.
Fixes #3491
|
|
https://tc39.es/ecma262/#sec-directive-prologues-and-the-use-strict-directive
A Use Strict Directive is an ExpressionStatement in a Directive Prologue
whose StringLiteral is either of the exact code point sequences
"use strict" or 'use strict'. A Use Strict Directive may not contain an
EscapeSequence or LineContinuation.
|
|
https://tc39.es/ecma262/#sec-additional-syntax-string-literals
The syntax and semantics of 11.8.4 is extended as follows except that
this extension is not allowed for strict mode code:
Syntax
EscapeSequence::
CharacterEscapeSequence
LegacyOctalEscapeSequence
NonOctalDecimalEscapeSequence
HexEscapeSequence
UnicodeEscapeSequence
LegacyOctalEscapeSequence::
OctalDigit [lookahead ∉ OctalDigit]
ZeroToThree OctalDigit [lookahead ∉ OctalDigit]
FourToSeven OctalDigit
ZeroToThree OctalDigit OctalDigit
ZeroToThree :: one of
0 1 2 3
FourToSeven :: one of
4 5 6 7
NonOctalDecimalEscapeSequence :: one of
8 9
This definition of EscapeSequence is not used in strict mode or when
parsing TemplateCharacter.
Note
It is possible for string literals to precede a Use Strict Directive
that places the enclosing code in strict mode, and implementations must
take care to not use this extended definition of EscapeSequence with
such literals. For example, attempting to parse the following source
text must fail:
function invalid() { "\7"; "use strict"; }
|
|
We're passing a token to this function, so m_current_token is actually
the next token - which leads to incorrect line/column numbers for string
literal syntax errors:
"\u"
^
Uncaught exception: [SyntaxError]: Malformed unicode escape sequence (line: 1, column: 5)
Rather than:
"\u"
^
Uncaught exception: [SyntaxError]: Malformed unicode escape sequence (line: 1, column: 1)
|
|
This was a regression introduced by 9ffe45b - a TryStatement without
'catch' clause *is* allowed, if it has a 'finally' clause. It is now
checked properly that at least one of both is present.
|
|
|
|
|
|
Previously, I abused the copy constructor, this is a lot better.
|
|
This fixes an assertion in TextEditor when changing the system theme,
since that would trigger a repaint request for the HTML preview widget
which may not have backing unless it's actually been used to perform
HTML (or Markdown) preview yet.
|
|
|
|
If the window title font is taller than the theme's specified title
height, compute the title height based on the font instead. :^)
|
|
I only drew the ASCII codepoints so far. We'll probably need to tweak
these here & there, but I feel like they turned out pretty good. :^)
|
|
This separates matching/parsing of statements and declarations and
fixes a few edge cases where the parser would incorrectly accept a
declaration where only a statement is allowed - for example:
if (foo) const a = 1;
for (var bar;;) function b() {}
while (baz) class c {}
|
|
From the spec: https://tc39.es/ecma262/#sec-literals-numeric-literals
The SourceCharacter immediately following a NumericLiteral must not be
an IdentifierStart or DecimalDigit.
For example: 3in is an error and not the two input elements 3 and in.
|
|
|
|
Otherwise we crash the interpreter when an exception is thrown during
evaluation of the while or do/while test expression - which is easily
caused by a ReferenceError - e.g.:
while (someUndefinedVariable) {
// ...
}
|
|
Fixes #3825
|
|
Also tweak the default tooltip color to be more bright and yellow!
|
|
|
|
I added this while doing the original theming implementationa and it's
just not good.
|
|
This makes them stand out a bit from buttons that are being pressed
(but not checked.)
|
|
And don't use the padding from the item's text rect as extra space for
glyphs when breaking lines.
|
|
This is nice when long item titles don't fit. You can now hover them
(or select them) and we'll break the item text into two lines instead
of just one.
It might make sense to go even further in some cases. Perhaps when
hovering an item, we could show the full item text, painted above
all other items. That's something for a future patch.
It would also be nice if the text didn't jump back and forth when
going in and out of this mode. Also for a future patch.
|
|
|
|
Ref-counted objects must not be stack allocated. Make DOM::Document's
constructor private to avoid this issue. (I wish we could mark classes
as heap-only..)
|
|
Until we can figure out how shift+enter works (or an alternative), this
can be used to input literal newlines:
```ini
[keybinds]
\\\n=\n
```
|
|
...and use it in `consume_and_unescape_string()'.
|
|
|
|
When a document reaches ref_count==0, we will now remove all of the
descendant nodes from the document, and also break all the explicit
links (such as the currently hovered element.)
Basically, DOM nodes will keep the document alive even after the
document reaches ref_count==0. This allows JS wrappers to stay alive
and keep the document alive as well. This matches the behavior of
at least some other browsers.
This patch also adds a bunch of sanity checking assertions around
DOM teardown, to help catch mistakes in the future.
Fixes #3771.
|
|
Otherwise, the "referencing node count" accounting won't be accurate,
and anything that accesses the document will be confused.
|
|
The old selection is obviously not relevant in the new document.
|
|
|
|
DOM::Node now points to its LayoutNode with a WeakPtr.
LayoutNode points to its DOM::Node and DOM::Document with RefPtrs.
Layout trees come and go in response to various events, so the DOM tree
already has to deal with that. The DOM should always live at least as
long as the layout tree, so this patch enforces that assumption by
making layout nodes keep their corresponding DOM objects alive.
This may not be optimal, but it removes a lot of ambiguous raw pointer
action which is not worth accomodating.
|
|
Fixes #3636.
|
|
|
|
We can't use current_view() before we've actually constructed the
subviews, so just ignore statusbar update requests before they get
a chance to call current_view().
This is not the most beautiful thing, and maybe we can think of a
nicer approach.
|