Commit Graph

6783 Commits

Author SHA1 Message Date
Max Wipfli
15d8635afc LibWeb: User getter+setter for HTMLToken tag name and self-closing flag 2021-07-17 16:24:57 +04:30
Max Wipfli
1aeafcc58b LibWeb: Use getter and setter for Character type HTMLTokens
While storing the code point in a UTF-8 encoded String in horrendously
inefficient, this problem will be addressed at a later stage.
2021-07-17 16:24:57 +04:30
Max Wipfli
e8e9426b4f LibWeb: User getter and setter for Comment type HTMLTokens 2021-07-17 16:24:57 +04:30
Max Wipfli
f886aa15b8 LibWeb: Rename HTMLToken::AttributeBuilder struct to Attribute
This does not contain StringBuilders anymore, so it can do with a
simpler name: Attribute.
2021-07-17 16:24:57 +04:30
Max Wipfli
d82f3eb085 LibWeb: Make HTMLToken::{Position,AttributeBuilder} structs public
There was and is no reason for those to be private. Making them public
also allows us to explicitly specify the return type of some getters.
2021-07-17 16:24:57 +04:30
Jean-Baptiste Boric
ad6c385c9e LibC: Fix grp.h includes
That header file uses FILE*, which is defined in bits/FILE.h.

Fixes #8827.
2021-07-17 13:00:33 +02:00
Peter Bindels
a5a62f99c5 LibC: Use 64-bit stack smash value for 64-bit mode
Otherwise it'll use the first 32 bits that happen to come after,
leading to very weird bugs. Fixes #8601
2021-07-17 01:45:20 +02:00
Marcus Nilsson
205c8a12ed ThemeEditor: Disable focus for demo widgets
Pressing tab would focus on the demo widgets instead of switching
between the combo box and color input field. Instead set the focus
policy to NoFocus for all the widgets.
2021-07-17 01:30:33 +02:00
Karol Kosek
c66f484bce HackStudio: Continue removing files after failure 2021-07-17 01:11:00 +02:00
Karol Kosek
6e51fe146c HackStudio: Disable Delete action on insufficient permissions
Hack Studio will now disable the action when any parent
of selected files do not have write permission.
2021-07-17 01:11:00 +02:00
Peter Bindels
85c2ad94d5 LibC: Make scanf always copy its va_list
On x86_64 GCC implements va_list as an array. This makes the syntax
for taking a pointer to it break & crash. The workaround / solution is
to create a copy. Since va_list is a tiny struct referencing the
actual varargs, this is little overhead (especially compared to
va_args itself)
2021-07-17 00:43:34 +02:00
Ali Mohammad Pur
124ca30d49 Shell: Don't assume that only the current shell may continue children
That can happen because of anyone sending the process a SIGCONT.
Fixes an issue where continuing a process launched by the shell from
the System Monitor would cause the shell to spin on waitpid().
2021-07-17 02:00:24 +04:30
Alexander
459aa44f6b LibWeb: Avoid UAF in query_selector{,_all}()
This fixes a bug that caused the selector to be dumped.
It would relase the RefPtr into a dump function, and then use it.
2021-07-17 01:48:04 +04:30
Linus Groh
86c6e68431 LibJS: Implement Temporal.Duration.prototype.abs() 2021-07-16 21:59:13 +01:00
Linus Groh
7df47bf3fb LibJS: Implement Temporal.Duration.prototype.negated() 2021-07-16 21:59:13 +01:00
Linus Groh
9aa1e4b885 LibJS: Implement Temporal.Duration.prototype.with() 2021-07-16 21:59:13 +01:00
Linus Groh
510f668ae3 LibJS: Add TokenType::{Debugger,With} to Token::is_identifier_name()
Also remove TokenType::Interface, that should be handled elsewhere (as
a 'future reserved word' in strict mode).
2021-07-16 21:59:13 +01:00
Ali Mohammad Pur
52a2518a69 LibWasm: Remove a useless use of ScopeGuard
There are no multiple exit paths in that function, so we can just put
the ending logic right at the end of the function instead.
2021-07-17 01:13:39 +04:30
Ali Mohammad Pur
65cd5526cb LibWasm+Everywhere: Make the instruction count limit configurable
...and enable it for LibWeb and test-wasm.
Note that `wasm` will not be limited by this.
2021-07-17 01:13:39 +04:30
Ali Mohammad Pur
70b94f58b2 LibWasm: Inline some very hot functions
These are mostly pretty small functions too, and they were about ~10%
of runtime.
2021-07-17 01:13:39 +04:30
Ali Mohammad Pur
bacf5a7220 wasm: Don't try to print the function results if it traps 2021-07-17 01:13:39 +04:30
Ali Mohammad Pur
23b48f8fe1 Revert "LibWasm: Some more performance stuff (#8812)"
This reverts commit 35394dbfaa.
I pushed the wrong button again, hopefully this will be the last of
such incidents.
2021-07-17 01:11:28 +04:30
Ali Mohammad Pur
35394dbfaa
LibWasm: Some more performance stuff (#8812)
* wasm: Don't try to print the function results if it traps

* LibWasm: Inline some very hot functions

These are mostly pretty small functions too, and they were about ~10%
of runtime.

* LibWasm+Everywhere: Make the instruction count limit configurable

...and enable it for LibWeb and test-wasm.
Note that `wasm` will not be limited by this.

* LibWasm: Remove a useless use of ScopeGuard

There are no multiple exit paths in that function, so we can just put
the ending logic right at the end of the function instead.
2021-07-17 01:04:37 +04:30
Timothy Flynn
860417fb4f LibJS: Ensure RegExpStringIterator keeps the RegExp matcher object alive
Fixes a crash found with 'test-js -g' due to this object going out of
scope.
2021-07-16 20:44:48 +02:00
Wesley Moret
1b8f73b6b3 LibPDF: Fix treating not finding the linearized dict as a fatal error
We now try to parse the first indirect value and see 
if it's the `Linearization Parameter Dictionary`. if it's not, we 
fallback to reading the xref table from the end of the document
2021-07-16 20:44:10 +02:00
Wesley Moret
5d4d70355e LibPDF: Fix checking minor_ver instead of major_ver 2021-07-16 20:44:10 +02:00
LuK1337
b94931e7f6 ThemeEditor: Set window size to 480x385 and disable resizing 2021-07-16 20:43:04 +02:00
LuK1337
12f0602379 ThemeEditor: Add menu bar with quit and about items 2021-07-16 20:43:04 +02:00
Idan Horowitz
8d01d43f5e LibJS: Replace the boolean argument of Object::set with an enum class
This is more serenity-esque and also makes pointing out missing
exception checks during reviews much easier.
2021-07-16 17:50:01 +01:00
Idan Horowitz
4b39e718b3 LibJS: Remove unused Object::PutOwnPropertyMode enum class
All usages of this enum class were removed in the Object rewrite, but
this enum was left behind.
2021-07-16 17:50:01 +01:00
Timothy Flynn
4812b95795 LibJS: Implement RegExp AdvanceStringIndex abstraction
This isn't particularly useful yet because the underlying LibRegex
engine doesn't support unicode matching yet. But the debt of FIXMEs
related to AdvanceStringIndex have added up, so let's get this out of
the way.
2021-07-16 13:53:11 +01:00
Timothy Flynn
5135f4000c LibJS: Implement RegExp.prototype [ @@matchAll ]
This also allows String.prototype.matchAll to work, as all calls to that
method result in an invocation to @@matchAll.
2021-07-16 13:53:11 +01:00
Timothy Flynn
cfddcad7cf LibJS: Implement the RegExpStringIterator object
This implementation closely follows the StringIterator object in that
the abstract closure meant to be created in CreateRegExpStringIterator
is instead unrolled into RegExpStringIterator.prototype.next.
2021-07-16 13:53:11 +01:00
Timothy Flynn
6cf64d0f09 LibJS: Make the RegExpExec abstraction publically available
For RegExpStringIterator, this will be needed outside of the RegExp
prototype.
2021-07-16 13:53:11 +01:00
Gunnar Beutner
c7265ee6bd Assistant: Keep the Terminal window open after the command has run 2021-07-16 13:05:55 +02:00
ry-sev
2634cab7a8 HackStudio: Add statusbar with file and selected text information 2021-07-16 12:58:20 +02:00
Max Wipfli
e22a34badb LibWeb: Fix assertion failures in HTMLTokenizer
The *TagName states are all very similar, so it seems to be correct to
apply the fix from #8761 to all of those states.

This fixes #8788.
2021-07-16 11:55:55 +02:00
Peter Bindels
ca9c53c1a8
LibELF/DynamicLinker: Evaluate symbols in library insertion order (#8802)
When loading libraries, it is required that each library uses the same
instance of each symbol, and that they use the one from the executable
if any. This is barely noticeable if done incorrectly; except that it
completely breaks RTTI on Clang. This switches the hash map to be
ordered; tested to work for Clang by @Bertaland
2021-07-16 11:55:01 +02:00
Linus Groh
9d7e391f94 LibJS/Tests: Add test for Temporal.Instant.prototype.valueOf() 2021-07-16 01:07:01 +01:00
Linus Groh
173630c5ef js: Implement pretty-printing of Temporal.Duration objects 2021-07-16 01:07:01 +01:00
Linus Groh
8daf35e1b1 LibJS: Implement Temporal.Duration.prototype.valueOf() 2021-07-16 01:07:01 +01:00
Linus Groh
a06b034a9a LibJS: Implement Temporal.Duration.prototype.blank 2021-07-16 01:07:01 +01:00
Linus Groh
3713164fa3 LibJS: Implement Temporal.Duration.prototype.sign 2021-07-16 01:07:01 +01:00
Linus Groh
be5254dcac LibJS: Implement Temporal.Duration.prototype.nanoseconds 2021-07-16 01:07:01 +01:00
Linus Groh
04e2d215a1 LibJS: Implement Temporal.Duration.prototype.microseconds 2021-07-16 01:07:01 +01:00
Linus Groh
db22f86055 LibJS: Implement Temporal.Duration.prototype.milliseconds 2021-07-16 01:07:01 +01:00
Linus Groh
b81331a110 LibJS: Implement Temporal.Duration.prototype.seconds 2021-07-16 01:07:01 +01:00
Linus Groh
dbdbfbeebc LibJS: Implement Temporal.Duration.prototype.minutes 2021-07-16 01:07:01 +01:00
Linus Groh
067c2346ed LibJS: Implement Temporal.Duration.prototype.hours 2021-07-16 01:07:01 +01:00
Linus Groh
2015640168 LibJS: Implement Temporal.Duration.prototype.days 2021-07-16 01:07:01 +01:00