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
Liav A
a411a44fda
Kernel/PCI: Cache interrupt line and interrupt pin of a device
...
This allows us to remove the PCI::get_interrupt_line API function. As a
result, this removes a bunch of not so great patterns that we used to
cache PCI interrupt line in many IRQHandler derived classes instead of
just using interrupt_number method of IRQHandler class.
2021-09-29 11:24:33 +02:00
Liav A
057f5a12c2
Kernel/PCI: Propagate usage of DeviceIdentifier everywhere
...
This allows us to remove a bunch of PCI API functions, and instead to
leverage the cached data from DeviceIdentifier object in many places.
2021-09-29 11:24:33 +02:00
Liav A
da327746a2
Kernel: Rename two PCI components
...
Rename ID => HardwareID, and PhysicalID => DeviceIdentifier.
This change merely does that to clarify what these objects really are.
2021-09-29 11:24:33 +02:00
Liav A
82bb08a15c
Kernel/PCI: Cache more details about PCI devices when enumerating them
...
There's no good reason to fetch these values each time we need them.
2021-09-29 11:24:33 +02:00
Idan Horowitz
e22d9dc360
LibWeb: Add the missing EventInit property to Event constructor
2021-09-29 10:09:33 +03:00
Idan Horowitz
071a358ffb
LibWeb: Add support for converting IDL dictionaries to native structs
2021-09-29 10:09:33 +03:00
Idan Horowitz
5ce468338e
LibJS: Drop the Temporal prefix from TemporalMissingRequiredProperty
...
This allows us to use it for other exposed JS APIs that accept options
objects.
2021-09-29 10:09:33 +03:00
Idan Horowitz
c3810b827a
LibWeb: Add support for parsing IDL dictionaries
2021-09-29 10:09:33 +03:00
Idan Horowitz
87f655f2af
LibWeb: Change IDL::parse_interface's return type to NonnullOwnPtr
...
We always returned an interface, so there's no need for the null state.
2021-09-29 10:09:33 +03:00
Ali Mohammad Pur
2020ced9f1
RequestServer: Correctly start preconnected TLS sockets
...
We need to set the root certificates, and tell the connection cache that
the preconnect job finished (otherwise it would spin forever, waiting
for us to tell it that).
2021-09-29 00:47:54 +02:00
Andreas Kling
63d971d33b
LibWeb: Support window.screen{X,Y,Left,Top}
...
Some sites query these properties for whatever reason, so let's support
them. (But let's always pretend the screen coordinates are (0, 0))
2021-09-29 00:22:46 +02:00
Andreas Kling
0a90d466a0
LibWeb: Expose CSSStyleDeclaration on the window object
2021-09-28 23:28:44 +02:00
Andreas Kling
651f30dfbe
WebContent: Coalesce paint invalidations to avoid spamming client
...
Some content cause a lot of paint invalidations (e.g someone drawing to
a <canvas> repeatedly) and we don't need to spam the client about this.
Instead, accumulate a dirty rect, and send it once per event loop step.
2021-09-28 22:53:59 +02:00
Andreas Kling
82af69376b
LibJS: Avoid unnecessary HashMap copy in FunctionEnvironment
2021-09-28 22:32:40 +02:00
Andreas Kling
d294a3f54a
LibJS: Avoid unnecessary HashMap growth in Interpreter::enter_scope()
...
Don't bother pre-allocating a hash map if we're not gonna put anything
into it anyway.
2021-09-28 22:32:40 +02:00
Andreas Kling
5855b19ff3
LibJS: Avoid unnecessary HashMap copy in ECMAScriptFunctionObject
2021-09-28 22:32:40 +02:00
Ali Mohammad Pur
3d24850db5
LibTLS: Mark the connection as finished and disconnected on TLS error
2021-09-28 22:32:31 +02:00
Ali Mohammad Pur
f0e2c517fc
LibWeb: Implement the dns-prefetch and preconnect link relationships
2021-09-28 22:32:31 +02:00
Ali Mohammad Pur
e9b9f89e70
LibWeb: Use Document::parse_url() for preload links
2021-09-28 22:32:31 +02:00
Ali Mohammad Pur
3ec39fc62e
RequestServer+LibProtocol: Add an 'EnsureConnection' IPC endpoint
...
This will allow LibWeb (and other components) to request a connection to
be premade and cached, to make subsequent loads faster.
2021-09-28 22:32:31 +02:00