davidot
bfc1b4ba61
LibJS: Allow member expressions in binding patterns
...
Also allows literal string and numbers as property names in object
binding patterns.
2021-09-30 08:16:32 +01:00
davidot
9cb5700398
LibJS: Disallow comma after rest parameter in formal parameters
2021-09-30 08:16:32 +01:00
davidot
7081fb4eb0
LibJS: Make the default constructed reference invalid
...
Since we have the to_reference method on every expression class we must
somehow communicate it did not actually return a reference.
This (ab)uses the fact that property name is only invalid with the
default constructor and already has is_valid().
2021-09-30 08:16:32 +01:00
davidot
ce3f29a135
LibJS + test-js: Get results from the global object directly
...
This is as the spec would require you to do it and necessary for changes
to come in the following commits.
2021-09-30 08:16:32 +01:00
davidot
53cc7e8398
LibJS: Remove unused delete_variable method in VM
2021-09-30 08:16:32 +01:00
Nico Weber
e6a97f1b7b
Documentation: Add texinfo to build instructions
...
`Meta/serenity.sh rebuild-toolchain aarch64` failed with the gdb build
complaining about missing `makeinfo` without this.
2021-09-30 02:56:21 +00:00
Andreas Kling
198bb322ef
LibWeb: Fix null dereference when assigning an ImageStyleValue via JS
...
When parsing a CSS value in the context of a CSSStyleDeclaration
camelCase property setter, we don't necessarily have a Document to
provide the CSS parser for context.
So the parser can't go assuming that there's always a Document in the
ParsingContext. And ImageStyleValue can't go assuming that there's
always a Document either. This will require some more work to get things
right, I'm just patching up the null dereference for now.
2021-09-30 02:18:30 +02:00
Andreas Kling
3006e15c94
LibWeb: Support Element.client{Top,Left,Width,Height}
2021-09-30 02:17:23 +02:00
Andreas Kling
9d852623f2
LibWeb: Support Element.matches(selectors)
...
This returns whether an element matches any of a set of selectors.
2021-09-30 02:16:36 +02:00
Andreas Kling
439be913cf
LibWeb: Support HTMLElement.offset{Width,Height}
2021-09-30 01:35:19 +02:00
Rodrigo Tobar
840822b8f1
LibSymbolication+SystemMonitor: Show ELF object in stack
...
This small patch allows SystemMonitor's Stack tab to show the name of
the ELF object to which the displayed address refers to. This gives a
bit more of contextual information to the viewer.
A better to show this is probably a table, but I'm not that familiar yet
with the GUI framework in general, so I'm keeping things simple.
2021-09-30 00:51:08 +02:00
Linus Groh
ee8380edea
LibJS: Convert internal_own_property_keys() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
fbfb0bb908
LibJS: Convert internal_delete() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
e5409c6ead
LibJS: Convert internal_set() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
6c2b974db2
LibJS: Convert internal_get() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
d9895ec12d
LibJS: Convert internal_has_property() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
5da210125e
LibJS: Convert internal_define_own_property() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
0e69a6e487
LibJS: Convert internal_get_own_property() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
73bae7d779
LibJS: Convert internal_prevent_extensions() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
9b4362f10a
LibJS: Convert internal_is_extensible() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
8c81c84c18
LibJS: Convert internal_set_prototype_of() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Linus Groh
5148150e1c
LibJS: Convert internal_get_prototype_of() to ThrowCompletionOr
2021-09-29 23:49:53 +01:00
Andreas Kling
c8bf7f9c41
LibWeb: Expose CSSStyleRule on the window object
2021-09-30 00:05:40 +02:00
Andreas Kling
d462a6720a
LibWeb: Reimplement the <style> element following the spec
...
We now follow the "update a style block" algorithm from the HTML spec
instead of using the ad-hoc CSSLoader mechanism.
This necessitated improving our StyleSheet and CSSStyleSheet classes as
well, so that's baked into this commit.
2021-09-30 00:00:55 +02:00
Andreas Kling
6cda24097b
LibWeb: Add the CSSStyleRule interface with some limited functionality
2021-09-30 00:00:55 +02:00
Andreas Kling
71087422f6
LibWeb: Add Node::in_a_document_tree()
...
This is "in a document tree" from the DOM spec.
2021-09-30 00:00:55 +02:00
Marcus Nilsson
d660e86d13
LibGUI: Implement automatic scrolling in AbstractView
...
This adds automatic scrolling when dragging items in TreeViews and other
widgets that inherit from AbstractView when the overloaded
accepts_drag() returns true. This is implemented in FileSystemModel to
allow directories and files to be dragged.
2021-09-29 23:58:55 +02:00
Marcus Nilsson
53cfc6ec9f
LibGUI: Account for scrollbar width when calculating autoscroll delta
2021-09-29 23:58:55 +02:00
Andreas Kling
994e33b0f7
LibWeb: Implement most of CSSStyleRule.insertRule()
2021-09-29 21:21:57 +02:00
Andreas Kling
f53d0ddba2
LibWeb: Make CSSStyleDeclaration.camelCaseProperty work :^)
...
This resolves a long-standing FIXME about exposing CSS properties to
JavaScript via "camelCase" names rather than "dash-separated" names.
2021-09-29 21:21:57 +02:00
Andreas Kling
dadb92a155
LibWeb: Generate CSS::property_id_from_camel_case_string()
...
This allows us to resolve a "camelCase" CSS property name to our own
CSS::PropertyID enum. This will be used by CSSOM bindings.
2021-09-29 21:21:57 +02:00
Andreas Kling
30d710a0a2
LibWeb: Add CSSStyleSheet.{insert,delete,remove}Rule() APIs
...
Note that insertRule() is really just a big TODO right now.
2021-09-29 21:21:57 +02:00
Andreas Kling
3a4565beec
LibWeb: Make CSSRule and CSSRuleList available to JavaScript :^)
...
This patch makes both of these classes inherit from RefCounted and
Bindings::Wrappable, plus some minimal rejigging to allow us to keep
using them internally while also exposing them to web content.
2021-09-29 21:21:57 +02:00
Linus Groh
87f0059088
LibJS: Fix a typo in a comment in Object.h
2021-09-29 19:20:28 +01:00
Marcus Nilsson
1026819135
PixelPaint: Add new icons for layer actions
...
Add icons for three more layer actions.
2021-09-29 20:04:20 +02:00
Marcus Nilsson
578318ca0f
Browser: Use CommonActions where possible and various fixes
...
This replaces some actions with CommonActions and also adds '...' to
menu items that require user input.
2021-09-29 20:04:20 +02:00
Idan Horowitz
3b9e8ec597
LibWeb: Add the missing CustomEvent IDL constructor
2021-09-29 19:38:41 +02:00
Idan Horowitz
e04f3c713c
LibWeb: Add support for custom #import IDL statements
...
This will currently be used to support dictionary inheritance between
dictionaries defined across different IDL definition files.
2021-09-29 19:38:41 +02:00
Sam Atkins
0b23a20ad5
LibWeb: Add CSSConditionRule
...
https://www.w3.org/TR/css-conditional-3/#the-cssconditionrule-interface
This simply exposes a condition string, which is implemented differently
in each sub-class.
2021-09-29 18:57:48 +02:00
Sam Atkins
06f9395056
LibWeb: Add CSSGroupingRule
...
This is an abstract base class for CSSRules that hold a CSSRuleList.
2021-09-29 18:57:48 +02:00
Sam Atkins
eb83d2617c
LibWeb: Use a CSSRuleList inside CSSStyleSheet
...
This better matches the spec. :^)
2021-09-29 18:57:48 +02:00
Sam Atkins
97a78cdd28
LibWeb: Add CSSRuleList
...
"The CSSRuleList interface represents an ordered collection of CSS style
rules." - https://www.w3.org/TR/cssom-1/#the-cssrulelist-interface
2021-09-29 18:57:48 +02:00
Andreas Kling
2758d99bbc
LibRegex: Flatten bytecode before performing optimizations
...
This avoids doing DisjointChunks traversal for every bytecode access,
significantly reducing startup time for large regular expressions.
2021-09-29 18:45:26 +02:00
Luke Wilde
7bdf0be667
LibWeb: Implement ChildNode.remove
2021-09-29 17:56:13 +02:00
Luke Wilde
2202428ca4
LibWeb: Add initial support for the IDL [Unscopable] extended attribute
...
This adds support for the [Unscopable] extended attribute to attributes
and functions.
I believe it should be applicable to all interface members, but I
haven't done that here.
2021-09-29 17:56:13 +02:00
Tobias Christiansen
610f14992a
LibWeb: Flexbox: Wrap inline Nodes if their parent is display: flex
2021-09-29 17:55:57 +02:00
Luke Wilde
881e9d1341
LibWeb: Make StyleSheetList.item an IDL getter
2021-09-29 14:57:59 +01:00
Ali Mohammad Pur
398435277b
RequestServer: Use an OwnPtr for cached connections
...
Otherwise we'd end up trying to delete the wrong connection if a
connection made before us is deleted.
Fixes _some_ RequestServer spins (though not all...).
This commit also adds a small debug mechanism to RequestServer (which
can be enabled by turning REQUEST_SERVER_DEBUG on), that can dump all
the current active connections in the cache, what they're doing, and how
long they've been doing that by sending it a SIGINFO.
2021-09-29 11:47:18 +02:00
Liav A
ef9b8ff0c7
Kernel/PCI: Remove all macros and replace them with enum classes
2021-09-29 11:24:33 +02:00
Liav A
9d9d57056e
Kernel/PCI: Remove Address from enumeration callback
...
If we need that address, we can always get it from the DeviceIdentifier.
2021-09-29 11:24:33 +02:00