Commit Graph

9728 Commits

Author SHA1 Message Date
Andreas Kling
14c57b4b7f LibJS: Remove transition avoidance & start caching prototype transitions
The way that transition avoidance (foo_without_transition) was
implemented led to shapes being unshareable and caused shape explosion
instead, precisely what we were trying to avoid.

This patch removes all the attempts to avoid transitioning shapes, and
instead *adds* transitions when changing an object's prototype.
This makes transitions flow naturally, and as a result we end up with
way fewer shape objects in real-world situations.

When we run out of big problems, we can get back to avoiding transitions
as an optimization, but for now, let's avoid ballooning our processes
with a unique shape for every object.
2021-10-01 02:59:29 +02:00
Luke Wilde
46686f7f94 LibWeb: Implement MediaQueryList.onchange 2021-10-01 01:35:30 +01:00
Nico Weber
61e9e80232 LibMarkdown: Fix typo in variable name 2021-10-01 01:33:43 +01:00
Nico Weber
6c9bc18a79 Userland: Fix typos 2021-10-01 01:18:52 +01:00
Luke Wilde
971d60c329 LibWeb: Implement AbortSignal.onabort 2021-10-01 02:10:56 +02:00
Nico Weber
de72332920 Libraries: Fix typos 2021-10-01 01:06:40 +01:00
Idan Horowitz
890d5e45ee Browser: Check m_console_client is non-null before dereferencing it
This added check matches CientConnection::js_console_input and makes
sure the webcontent process doesn't crash if the console is opened
while no page is available (like in a file not found situation)
2021-10-01 01:17:44 +02:00
Luke Wilde
10d4f2fc1e LibWeb: Implement HTMLStyleElement.sheet 2021-10-01 00:17:24 +01:00
Idan Horowitz
2c6c9b73c8 LibWeb: Add the Web::Crypto namespace, built-in, and getRandomValues
Since we don't support IDL typedefs or unions yet, the responsibility
of verifying the type of the argument is temporarily moved from the
generated Wrapper to the implementation.
2021-09-30 20:02:09 +02:00
davidot
715f9666f2 LibJS: Fix that in Bytecode mode functions where not created anymore
This is not a proper fix as we should follow the spec here but it gets
us back to a slightly more working state.
2021-09-30 15:37:56 +01:00
davidot
0f5fe3b70e SpreadSheet: Fix that non first sheets could not access global functions
Because we declare the functions in runtime.js we need the correct
global object to be setup otherwise they cannot be accessed when
switching to the SheetGlobalObject.
2021-09-30 15:37:56 +01:00
Ali Mohammad Pur
146aaec129 RequestServer: Avoid storing a strong reference to a socket in callbacks
Unused sockets created by EnsureConnection should not keep the socket
around (storing a strong reference will create a reference cycle).
This fixes a whole bunch more RS spins.
2021-09-30 11:46:37 +02:00
Ali Mohammad Pur
56bb7dde87 RequestServer: Use an OwnPtr for the connection cache vector
Just as removing individual connections can cause the vector entries to
change positions, adding or removing connections to the cache can also
move the connections around, which would make it possible for a
connection to avoid being deleted (and make the RS spin on the Notifier
for that connection).
This commit makes it so that no connection cache is left when it's
supposed to be deleted.
Fixes a few more RS spins.
2021-09-30 11:46:37 +02:00
Ali Mohammad Pur
b0a9c5673e LibHTTP: Respect the 'Connection: close' header on keep-alive jobs
If the server responds with this header, we _must_ close the connection,
as the server is allowed to ignore the socket and not respond to
anything past that response.
Fixes some RequestServer spins.
2021-09-30 11:46:37 +02:00
davidot
5611285312 SpreadSheet: Fix that the js integration abused global objects
Before this commit it only allocated the global object so when it wanted
to lookup 'thisSheet' it could not find it in the global environment.
We now hotswap the global object everytime a cell evaluated.

This also fixes that SheetGlobalObject did not have an
internal_has_property meaning 'A0' could not be referenced unless it was
via a member lookup (this.A0). This was already broken before the
bindings refactoring.

The correct behavior of realms in spreadsheet is not completely clear
since what is shared between sheets is not very well defined.

The reason that just setting the SheetGlobalObject as the
global_this_value is not enough is because ECMAScript does not check the
global_this_value for members when resolving a reference in the global
environment.
2021-09-30 08:16:32 +01:00
davidot
e5d48ee238 LibJS: Fix switch skipping case evaluation when hitting the default case
When no case match we should not just execute the statements of the
default case but also of any cases below the default case.
2021-09-30 08:16:32 +01:00
davidot
830ea0414c LibJS: Make scoping follow the spec
Before this we used an ad-hoc combination of references and 'variables'
stored in a hashmap. This worked in most cases but is not spec like.
Additionally hoisting, dynamically naming functions and scope analysis
was not done properly.

This patch fixes all of that by:
  - Implement BindingInitialization for destructuring assignment.
  - Implementing a new ScopePusher which tracks the lexical and var
    scoped declarations. This hoists functions to the top level if no
    lexical declaration name overlaps. Furthermore we do checking of
    redeclarations in the ScopePusher now requiring less checks all over
    the place.
  - Add methods for parsing the directives and statement lists instead
    of having that code duplicated in multiple places. This allows
    declarations to pushed to the appropriate scope more easily.
  - Remove the non spec way of storing 'variables' in
    DeclarativeEnvironment and make Reference follow the spec instead of
    checking both the bindings and 'variables'.
  - Remove all scoping related things from the Interpreter. And instead
    use environments as specified by the spec. This also includes fixing
    that NativeFunctions did not produce a valid FunctionEnvironment
    which could cause issues with callbacks and eval. All
    FunctionObjects now have a valid NewFunctionEnvironment
    implementation.
  - Remove execute_statements from Interpreter and instead use
    ASTNode::execute everywhere this simplifies AST.cpp as you no longer
    need to worry about which method to call.
  - Make ScopeNodes setup their own environment. This uses four
    different methods specified by the spec
    {Block, Function, Eval, Global}DeclarationInstantiation with the
    annexB extensions.
  - Implement and use NamedEvaluation where specified.

Additionally there are fixes to things exposed by these changes to eval,
{for, for-in, for-of} loops and assignment.

Finally it also fixes some tests in test-js which where passing before
but not now that we have correct behavior :^).
2021-09-30 08:16:32 +01:00
davidot
4428e494b0 LibJS: Handle escaped keywords in more cases and handle 'await' labels 2021-09-30 08:16:32 +01:00
davidot
79caca8ca2 LibJS: Allow multiple labels on the same statement
Since there are only a number of statements where labels can actually be
used we now also only store labels when necessary.
Also now tracks the first continue usage of a label since this might not
be valid but that can only be determined after we have parsed the
statement.
Also ensures the correct error does not get wiped by load_state.
2021-09-30 08:16:32 +01:00
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
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
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
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
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
Idan Horowitz
e22d9dc360 LibWeb: Add the missing EventInit property to Event constructor 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
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
Andreas Kling
6b2e4f896b LibDebug: Add missing break in AddressRanges::for_each_range() 2021-09-28 18:05:42 +02:00
Andreas Kling
0af0ee4293 LibWeb: Fire "keyup" events as well :^)
This was easy, now that we have KeyboardEvent.
2021-09-28 16:56:24 +02:00
Andreas Kling
554c344ffe LibWeb: Add a basic KeyboardEvent and fire "keydown" events :^) 2021-09-28 16:56:24 +02:00
Itamar
09153b8997 LibDebug: Use DW_AT_ranges to get address ranges of DIEs
Previously, we only supported DIEs with a contiguous address ranges and
ignored ones with a non-contiguous set of ranges.

We now check if a DIE has the DW_AT_ranges attribute, and if it does we
parse its range list.

This improves the quality of our backtraces - we previously missed many
inlined function calls because their DIEs had non-contigues address
ranges.
2021-09-28 16:54:39 +02:00
Itamar
26a96d315d LibDebug: Support parsing non-contiguous DWARF address ranges
This adds support for parsing DWARF "range lists", which are identified
by the DW_AT_ranges form.

They contain code addresses for DIEs whose location is not contiguous.
2021-09-28 16:54:39 +02:00
Itamar
2b04a86d4d LibDebug: Add Dwarf::CompilationUnit::base_address()
The base address of the compilation unit is used in some range lists
entry types.
2021-09-28 16:54:39 +02:00
Idan Horowitz
01417c82c5 LibWeb: Make URLSearchParams iterable
This uses the new support for the iterable IDL property.
2021-09-28 16:51:27 +02:00
Idan Horowitz
14e99b9b68 LibJS: Change create_iterator_result_object's return type to Object*
This always returns an Object, so there's no reason to return a less
explicit Value.
2021-09-28 16:51:27 +02:00
Idan Horowitz
cdde3ba5c5 LibWeb: Add partial support for IDL Iterable declarations
This currently only supports pair iterables (i.e. iterable<key, value>)
support for value iterables (i.e. iterable<value>) is left as TODO().

Since currently our cmake setup calls the WrapperGenerator separately
and unconditionally for each (hard-coded) output file iterable wrappers
have to be explicitly marked so in the CMakeLists.txt declaration, we
could likely improve this in the future by querying WrapperGenerator
for the outputs based on the IDL.
2021-09-28 16:51:27 +02:00
Ali Mohammad Pur
72a45a472a LibPthread: Correct nonsensical loop exit condition in RWLock unlock
The loop should terminate after the exchange happens, we shouldn't
repeat the operation until the count hits zero.
Fixes #10241.
2021-09-28 12:34:51 +03:30
Ali Mohammad Pur
b63ea3bad1 LibPthread: Calculate the correct lock value in RWLock {rd,un}lock
The previous version was putting the old count in the control bits,
which is all kinds of wrong.
2021-09-28 12:32:46 +03:30
Brian Gianforcaro
ea2d68d14b Assistant: Zero initialize fuzzy match array
SonarCloud flagged the read of the matches array as a potential garbage
read. I don't believe the case it flagged was possible to reach due to
how the code is structured, however we should really just be zero
initializing these stack arrays.
2021-09-28 10:58:09 +02:00
Brian Gianforcaro
998234f9e9 LibCpp: Remove redundant comparison to Token::Type::PipePipe
SonarCloud flagged this 'Identical sub-expressions on both sides of
operator "||"'. When looking at the git history it looks like it was
just a copy / paste mistake that happened when Token::Type::Arrow
support was added.
2021-09-28 10:58:09 +02:00
Brian Gianforcaro
69bc04d870 LibDSP: Remove unused Effects::Delay::m_old_delay_size member
SonarCloud flagged this as m_delay_buffer is technically uninitialized
at the point at which the POD types are initialized in a constructor.

I don't check to see if this was actually a real issue, as the member
is ultimately unused. So lets just get rid of it.
2021-09-28 10:58:09 +02:00
Rodrigo Tobar
ad33efbc8c SystemMonitor: Unveil /usr/local/lib
This is necessary to symbolicate libraries installed under
/usr/local/lib.
2021-09-28 10:55:14 +02:00
Rodrigo Tobar
12e18e44ae LibSymbolication: Look for libraries under /usr/local/lib
While trying to investigate a problem with the ssl module in the python
port I found that the SystemMonitor Stack tab for a process wouldn't
show the symbols for the libssl and libcrypto shared libraries that are
installed under /usr/local/lib. The main reason for this is that
LibSymbolication didn't look for libraries under /usr/local/lib.

This commit adds support for looking for libraries under /usr/local/lib.
Absolute paths are still respected, and lookup gives precedence to
/usr/lib, just like dynamic linker does.
2021-09-28 10:55:14 +02:00
Rodrigo Tobar
f4ebcf4867 LibSymbolication: Return empty value on error
This was probably the intended behavior, but a return statement was
missing.
2021-09-28 10:55:14 +02:00
Luke Wilde
f7ac3545cc LibWeb: Add initial support for CustomEvent
This is used surprisingly often. For example, it is used by a core
YouTube library called Structured Page Fragments.

It allows you to manually dispatch an event with arbitrary data
attached to it.

The only thing missing from this implementation is the constructor.
This is because WrapperGenerator is currently missing dictionary
capabilities.
2021-09-27 18:45:45 +02:00
Luke Wilde
b04fafee74 LibWeb: Add some missing events in EventWrapperFactory
I noticed some events we being wrapped into a generic Event while
working on CustomEvent. This also adds PageTransitionEvent's
constructor to the WindowObject.

I'm not sure if this is all of them.
2021-09-27 18:45:45 +02:00
Andreas Kling
8da21583db LibWeb: Make SVG <path> tolerate relative first path coordinates
If the first element of an SVG path spec uses relative coordinates,
we'll now treat them as absolute. This is achieved by defaulting to
(0,0) as the initial "last point" in the path.
2021-09-27 18:29:10 +02:00
Andreas Kling
975a71de45 LibWeb: Implement the Document.activeElement attribute
We were already tracking the active element in DOM::Document, so all we
had to do here was add the attribute to Document.idl :^)
2021-09-27 16:52:22 +02:00
Andreas Kling
7410736b0f LibWeb: Support window.devicePixelRatio
This always returns 1 for now. I've added a FIXME about returning 2 in
HiDPI mode.
2021-09-27 16:52:22 +02:00
Andreas Kling
e26e85a3d2 LibWeb: Support Document.hidden and Document.visibilityState
These just act as if the document is always visible for now.
2021-09-27 16:52:22 +02:00
Karol Kosek
484f6a7cfa LibCore: Buffer small byte reads
Prior this change, if you had a program which frequently reads small
amount of bytes, then it would constantly fire up syscalls.

This patch sets that the minimum size that is passed to the read syscall
is 1024 and then it saves these additional bytes in a buffer for next
reads, which greatly improves the cpu usage on such cases.

In other words: reading flacs is now very efficient.
2021-09-27 16:31:28 +02:00
Karol Kosek
48a925b1d2 LibCore: Add optional custom read size argument in populate_read_buffer
This is a small preparation so IODevice::read() can use it in the next
commit.
2021-09-27 16:31:28 +02:00
FrHun
34844dd547 LibGUI: Refine AbstractButton pressing behaviour
Previously the code couldn't handle leaving the AbstractButton through
tab, while having it pressed through space or enter.
2021-09-27 16:29:50 +02:00
Sam Atkins
d36e3af7be LibWeb: Don't try to ad-block data: urls
In some cases these can be several KiB or more in size, making checking
very slow, and it doesn't make sense to filter them out anyway. This
change speeds up loading pages with large data: urls, which previously
took up to 1ms per byte to process.
2021-09-27 16:13:29 +02:00
Andreas Kling
a79bdd2bd5 LibWeb+Browser: Make ad blocking work in the multi-process world
We now send the list of content filters over to new WebContent processes
after creating an OutOfProcessWebView. :^)
2021-09-27 11:40:56 +02:00
Andreas Kling
5bb2e6597a LibWeb: Preload resources hinted by <link rel="preload">
If a page is nice enough to give us some preload hints, we can tell
RequestServer to get started on downloading the resources right away,
instead of waiting until discovering them later on during parsing.
2021-09-27 02:07:55 +02:00
Andreas Kling
ed5c807c99 LibWeb: Allow passing a (String) body to XMLHttpRequest.send()
This patch implements the simplest form of send(body): strings.
2021-09-27 01:56:08 +02:00
Marco Cutecchia
194dc8b25d HackStudio: Support renaming files from the tree view 2021-09-27 01:20:48 +02:00
Marco Cutecchia
05630d2d5d LibGUI: Add 'on_rename_successful' callback to FileSystemModel 2021-09-27 01:20:48 +02:00
Andreas Kling
43d378940f LibWeb: Add DOMRect and Element.getBoundingClientRect()
This marks our entry into the Web::Geometry namespace, based on the
"Geometry" spec at https://drafts.fxtf.org/geometry/
2021-09-27 01:01:29 +02:00
Andreas Kling
0c63f0bf73 LibJS: Parse date strings like "Wed Apr 17 23:08:53 +0000 2019"
The ECMAScript spec says that Date parsing can support any number of
implementation-defined date formats. So let's support a format commonly
used on the web. And let Core::DateTime do the heavy lifting. :^)
2021-09-26 23:42:27 +02:00
Andreas Kling
7c6f229ec0 LibWeb: Make navigator.onLine always true for now
Some pages refuse to load if they think we are offline, so let's say
we're online. :^)
2021-09-26 19:14:19 +02:00
Andreas Kling
0ab31d8c84 LibWeb: Support simplest form of CSSStyleDeclaration.setProperty()
This patch adds the setProperty(name, value) API to CSSStyleDeclaration.
Setting an invalid or empty value will cause the property to be removed
from the declaration.

Note that this only works on mutable declarations (i.e element.style)
and not on resolved declarations (i.e window.getComputedStyle(element)).
2021-09-26 19:07:03 +02:00
Luke Wilde
e0e41116a4 LibWeb: Make WindowObject's prototype immutable
While I was implementing IDL special operations, I noticed that for
global platform objects (e.g. WindowObject), the IDL spec makes their
prototype immutable.

https://heycam.github.io/webidl/#platform-object-setprototypeof
2021-09-26 18:59:56 +02:00
Luke Wilde
f6b24a72ee LibWeb: Add support for HTMLOrSVGElement.dataset 2021-09-26 18:59:56 +02:00
Luke Wilde
37347cbcb6 LibWeb: Convert HTMLCollection to use IDL special operations 2021-09-26 18:59:56 +02:00
Luke Wilde
41ae0c0216 LibWeb: Add support for IDL legacy platform objects
A legacy platform object is a non-global platform object that
implements a special operation. A special operation is a getter, setter
and/or deleter. This is particularly used for old collection types,
such as HTMLCollection, NodeList, etc.

This will be used to make these spec-compliant and remove their custom
wrappers. Additionally, it will be used to implement collections that
we don't have yet, such as DOMStringMap.
2021-09-26 18:59:56 +02:00
Luke Wilde
e06762f312 LibJS: Make Object::ordinary_set_with_own_descriptor non-static
This needs to be accessible for implementing IDL legacy platform
objects.
2021-09-26 18:59:56 +02:00
Luke Wilde
27dfd0170e LibWeb: Implement Document.importNode 2021-09-26 18:59:19 +02:00
Andreas Kling
3252d984ae LibJS: Allow statements to have multiple labels
This is a curious thing that occurs more often than you'd think in
minified JavaScript:

    a: b: c: for (...) { ... break b; ... }
2021-09-26 18:24:19 +02:00
Linus Groh
ababcc5725 LibJS: Defer execution of switch default clause until after case clauses
When we encounter a default clause in a switch statement, we should not
execute it immediately, instead we need to wait until all case clauses
have been executed as a matching case clause can break from the
switch/case.

The code is nowhere close to the spec, so instead of fixing it properly
I just made it slightly worse, but correct. Needs a complete refactor at
some point.
2021-09-26 18:04:25 +02:00
Andreas Kling
a248ec63e3 LibWeb: Implement window.queueMicrotask(callback)
This API allows authors to schedule a serialized JS callback that will
get invoked at the next spec-allowed opportunity.
2021-09-26 14:39:14 +02:00
Andreas Kling
831fdcaabc LibWeb: Add the PageTransitionEvent interface and fire "pageshow" events
We now fire "pageshow" events at the appropriate time during document
loading (done by the parser.)

Note that there are no corresponding "pagehide" events yet.
2021-09-26 12:47:51 +02:00
Andreas Kling
508edcd217 LibWeb: Add a "page showing" flag to documents
This will be used to determine whether "pageshow" and "pagehide" events
are appropriate. We won't actually make use of it until we implement
more of history traversal and document unloading.
2021-09-26 12:47:51 +02:00
Andreas Kling
a2f77a2e39 LibWeb: Implement "update the current document readiness" from spec
The only difference from what we were already doing is that setting the
same ready state twice no longer fires a "readystatechange" event.
I don't think that could happen in practice though.
2021-09-26 12:47:51 +02:00
Andreas Kling
8496024756 LibWeb: Store HTML document ready state as an enum 2021-09-26 12:47:51 +02:00
Andreas Kling
c4ccbc5b83 LibWeb: Make unhandled JS exception stand out more in debug log
Let's log "unhandled exception" messages in red text so that they stand
out better among lots of other debug logging.
2021-09-26 12:47:51 +02:00
Rodrigo Tobar
5ae384fc33 LibELF: Indicate value of unimplemented dtag
For flags that are not mapped to a string this message prints DT_??,
which isn't really useful.
2021-09-26 12:45:55 +02:00
Rodrigo Tobar
a67e06184b LibC+LibELF: Add definitions for extra dtags
These are found in some libraries, and LibELF doesn't know how to handle
them, not even their name. Adding these definitions should at least help
readelf display information correctly, but more work is needed to
actually implement them.
2021-09-26 12:45:55 +02:00
Rodrigo Tobar
3efd7b458a LibELF+readelf: Remove duplicated dtag->string map
A copy of the same mapping was found both in LibELF and in the readelf
utility, which uses LibELF; keeping them both is redundant and removing
the duplicate saves (a bit of) space.
2021-09-26 12:45:55 +02:00
Karol Kosek
1803c5966d ThemeEditor: Show currently opened theme path in the window title
You can open files since #9979, so let's show the path there
to distinguish open theme files more easily!
2021-09-26 12:44:51 +02:00
Andreas Kling
5ac82efbe1 LibWeb: Mark event listeners generated by event handler attributes
We have to mark the EventListener objects so that we can tell them apart
from listeners added via the addEventListener() API.

This makes element.onfoo getters actually return the handler function.
2021-09-26 02:53:57 +02:00
Andreas Kling
5f4a723e51 LibWeb: Implement more of "completely finish loading the document" 2021-09-26 02:25:02 +02:00
Andreas Kling
bfec16ce46 LibWeb: Remove nonsensical assignment in script-became-ready callback
We don't need to set m_script_ready in the callback that gets invoked
precisely because m_script_ready has been set. :^)
2021-09-26 02:05:54 +02:00
Andreas Kling
65e0f8184d LibWeb: Make parser <script> elements delay the document load event 2021-09-26 02:05:49 +02:00
Andreas Kling
fc2a255c72 LibWeb: Make <link> style sheets delay the document load event 2021-09-26 02:00:24 +02:00
Andreas Kling
dbba0a520f LibWeb: Allow HTML parser to delay delivery of the document "load" event
We will now spin in "the end" until there are no more "things delaying
the load event". Of course, nothing actually uses this yet, and there
are a lot of things that need to.
2021-09-26 02:00:00 +02:00
Andreas Kling
b1529e3202 LibWeb: Remove some unused includes and a member in HTMLScriptElement 2021-09-26 01:03:17 +02:00
Andreas Kling
e7af6af626 LibWeb: Implement more of HTMLParser::the_end() and bring closer to spec 2021-09-26 00:52:19 +02:00
Andreas Kling
c772134e25 LibWeb: Make update_style() a no-op if there's no browsing context
Style is needed to lay out and paint a document, but we can't do either
those when the document isn't attached to a browsing context.
2021-09-26 00:48:30 +02:00
Andreas Kling
e452550fda LibWeb: Split out "The end" from the HTML parsing spec to a function
Also add a spec link and some comments.
2021-09-26 00:04:33 +02:00
Andreas Kling
f67648f872 LibWeb: Rename HTMLDocumentParser => HTMLParser 2021-09-25 23:36:43 +02:00
Andreas Kling
0ee457dfdf LibWeb: Provide a default DOM::EventTarget::dispatch_event()
All EventTarget subclasses except Window do the same exact thing in
their overrides, so let's just share an implementation in the base.
2021-09-25 23:36:43 +02:00
Karol Kosek
5a5f6d11ef PixelPaint: Close image tabs on middle click 2021-09-25 23:34:02 +02:00
Karol Kosek
df195188bc PixelPaint: Close New Image dialog after pressing return key
13e526de43 added the feature to new Layer
dialog. This patch adds it to Image dialog to stay consistent across
the app. :^)
2021-09-25 23:34:02 +02:00
Andreas Kling
926a49cd81 LibWeb: Use Core::EventLoop::spin_until() for the ad-hoc loop spinning
The ideal solution here is to implement a more spec-compliant event
loop, but while we get all the pieces in place for that, this at least
makes the HTML event loop a bit more responsive since it never has to
wait for a 16ms timer to fire.
2021-09-25 19:34:21 +02:00
Andreas Kling
f2b9ec9f8a LibCore: Add Core::EventLoop::spin_until(Function<bool()>)
This function spins the event loop until a goal condition is met.
2021-09-25 19:32:14 +02:00
Andreas Kling
2c0987c93b LibWeb: Move window.scroll{X,Y} from wrapper into DOM::Window
The less we do in WindowObject, the easier it will be to eventually
auto-generate the entire thing.
2021-09-25 18:47:19 +02:00
Linus Groh
38157a6093 LibJS: Move has_constructor() from NativeFunction to FunctionObject
At a later point this will indicate whether some FunctionObject "has a
[[Construct]] internal method" (separate from the current FunctionObject
call() / construct()), to help with a more spec-compliant implementation
of [[Call]] and [[Construct]].
This means that it is no longer relevant to just NativeFunction.
2021-09-25 17:51:30 +02:00
Linus Groh
e14f420a44 LibJS: Add const Value::as_function() 2021-09-25 17:51:30 +02:00
Linus Groh
2dba048146 LibJS: Remove unused FunctionObject::environment()
ECMAScriptFunctionObject::environment() can just be non-virtual.
2021-09-25 17:51:30 +02:00
Linus Groh
9043041dd3 LibJS: Move [[BoundThis]] and [[BoundArguments]] to BoundFunction 2021-09-25 17:51:30 +02:00
Linus Groh
4566472ed6 LibJS: Rename BoundFunction::m_target_function to match spec name 2021-09-25 17:51:30 +02:00
Linus Groh
a08292d76c LibJS: Move has_simple_parameter_list to ECMAScriptFunctionObject 2021-09-25 17:51:30 +02:00
Linus Groh
76eb8fe717 LibJS: Move [[Fields]] to ECMAScriptFunctionObject 2021-09-25 17:51:30 +02:00
Linus Groh
136451c3af LibJS: Move [[HomeObject]] to ECMAScriptFunctionObject 2021-09-25 17:51:30 +02:00
Linus Groh
06726d41ac LibJS: Move [[ConstructorKind]] to ECMAScriptFunctionObject 2021-09-25 17:51:30 +02:00
Linus Groh
1e97a85095 LibJS: Move [[ThisMode]] to ECMAScriptFunctionObject 2021-09-25 17:51:30 +02:00
Linus Groh
ce946dd656 LibJS: Add ECMAScriptFunctionObject forward declaration 2021-09-25 17:51:30 +02:00
Linus Groh
d5f90cf187 LibJS: Rename ECMAScriptFunctionObject members to match spec names
Also add the internal slot names as comments, and separate them into
groups of spec and non-spec members.
This will make it easier to compare the implementation code with the
spec, as well as identify internal slots currently missing or only
present on FunctionObject.
2021-09-25 17:51:30 +02:00
Linus Groh
e37cf73300 LibJS: Rename OrdinaryFunctionObject to ECMAScriptFunctionObject
The old name is the result of the perhaps somewhat confusingly named
abstract operation OrdinaryFunctionCreate(), which creates an "ordinary
object" (https://tc39.es/ecma262/#ordinary-object) in contrast to an
"exotic object" (https://tc39.es/ecma262/#exotic-object).

However, the term "Ordinary Function" is not used anywhere in the spec,
instead the created object is referred to as an "ECMAScript Function
Object" (https://tc39.es/ecma262/#sec-ecmascript-function-objects), so
let's call it that.

The "ordinary" vs. "exotic" distinction is important because there are
also "Built-in Function Objects", which can be either implemented as
ordinary ECMAScript function objects, or as exotic objects (our
NativeFunction).

More work needs to be done to move a lot of infrastructure to
ECMAScriptFunctionObject in order to make FunctionObject nothing more
than an interface for objects that implement [[Call]] and optionally
[[Construct]].
2021-09-25 17:51:30 +02:00
Mandar Kulkarni
d787775806 LibWeb: Skip decoding favicon.ico if downloaded data is empty
Some sites don't have favicon.ico, so we may get 404 response.
In such cases, ResourceLoader still calls success_callback.
For favicon loading, we are not checking response headers or payload
size.
This will ultimately fail in Gfx::ImageDecoder::try_create().

So avoid unnecessary work by returning early, if data is empty.
2021-09-24 19:29:04 +02:00
Andreas Kling
73fe6c541a LibGfx: Forward declare Gfx::FontMetrics as a struct 2021-09-24 19:03:46 +02:00
Andreas Kling
71f371f6b1 LibWeb: Ignore font-size: calc(...) for now
This doesn't work correctly in the new world where fonts are resolved
during the CSS cascade. Let's patch it out with a FIXME and get back to
it once everything has fallen into place.
2021-09-24 15:49:04 +02:00
Andreas Kling
f8dd3e14ba LibWeb: Rename CSS::StyleResolver => StyleComputer
Resolved style is a spec concept that refers to the weird mix of
computed style and used style reflected by getComputedStyle().

The purpose of this class is to produce the *computed* style for a given
element, so let's call it StyleComputer.
2021-09-24 15:12:15 +02:00
Andreas Kling
3dc6f0bc47 LibWeb: Absolutize internal lengths in all StyleValues
StyleValue now has a virtual visit_lengths() that allows us to update
all CSS lengths during the absolutization phase.
2021-09-24 15:12:15 +02:00
Andreas Kling
785ace4fc2 LibWeb: Remove on-demand font resolution
Fonts are now resolved as part of the CSS cascade.
2021-09-24 15:12:15 +02:00
Andreas Kling
1ca33598da LibWeb: Give DOM::Document some default style properties
Add StyleResolver::create_document_style() to help in creating an
"empty" style with nothing but default values.
2021-09-24 15:01:49 +02:00
Andreas Kling
c5b4928f4a LibWeb: Make ListItemMarkerBox inherit style from ListItemBox 2021-09-24 15:01:49 +02:00
Andreas Kling
ca28a118ae LibWeb: Add tightly-typed DOM node accessors for Layout::ListItemBox
ListItemBox is always constructed with a non-null DOM::Element, so we
can make dom_node() return a DOM::Element&.
2021-09-24 15:01:49 +02:00
Andreas Kling
5a7d3e3cc1 LibWeb: Let <br> elements have style
At the very least, we need to respect `<br style="display: none">`
2021-09-24 15:01:49 +02:00
Andreas Kling
c113c092ee LibWeb: Make HTML::EventLoop::process() a no-op if there are no tasks 2021-09-24 15:01:49 +02:00
Andreas Kling
23a08fd35a LibWeb: Start absolutizing lengths after performing the CSS cascade
Once we've performed the cascade on a set of values for an element,
we should have enough information to resolve/absolutize some lengths.

Basically, any CSS length that isn't "auto" or a percentage can be
turned into an absolute length (in pixels) as long as we have the
following information:

- The viewport rect
- The parent element's font
- The document element's font
- The element's own font

To ensure that we can absolutize lengths relative to the element's own
font, we now do a separate first pass where font-related properties are
defaulted (in the cascade spec sense of the word) and become usable.

There's a lot more work to do here, but this should open up a lot of
simplification in layout code, since it will no longer need to care
about relative lengths. Layout still needs to resolve percentages, since
we can't do that for some properties until the containing block
dimensions are known.
2021-09-24 15:01:49 +02:00
Andreas Kling
30979c1956 LibGfx: Remove debug spam about not having some font installed 2021-09-24 15:01:49 +02:00
Andreas Kling
d7586aff53 LibGfx: Add a simple Gfx::FontMetrics and Gfx::Font::metrics(code_point)
This is used to get a handy set of glyph metrics.
2021-09-24 15:01:49 +02:00
Andreas Kling
3d36e4d944 LibWeb: Rename "Computed" CSSStyleDeclaration => "Resolved"
The original name was based on the window.getComputedStyle() API.
However, "Computed" in "getComputedStyle" is actually a misnomer that
the platform is stuck with due to backwards compatibility.

What getComputedStyle() returns is actually a mix of computed and used
values. The spec calls it the "resolved" values. So let's call this
declaration subclass "ResolvedCSSStyleDeclaration" to match.
2021-09-24 15:01:49 +02:00
Sam Atkins
058d44dcae LibWeb: Replace last couple of StyleValue casts with as_foo() 2021-09-24 15:01:43 +02:00
Sam Atkins
a83b620fa6 LibWeb: Use new StyleValue API in StyleResolver
Less casts, more readable. :^)
2021-09-24 15:01:43 +02:00
Sam Atkins
b0324b7201 LibWeb: Use new StyleValue API in StyleProperties.cpp
This replaces a bunch of casts with `.as_foo()` calls, and adjusts calls
to the old `is_foo()` methods that now are better as `has_foo()`.

Also tidied up some whitespace to be more consistent.
2021-09-24 15:01:43 +02:00
Sam Atkins
48ef5c8e84 LibWeb: Use new StyleValue API in ComputedCSSStyleDeclaration
Why manually cast things when a method can do it for you safely?
2021-09-24 15:01:43 +02:00
Sam Atkins
4b554ba92a LibWeb: Clarify StyleValue API with new naming scheme
This does a few things, that are hard to separate. For a while now, it's
been confuzing what `StyleValue::is_foo()` actually means. It sometimes
was used to check the type, and sometimes to see if it could return a
certain value type. The new naming scheme is:

- `is_length()` - is it a LengthStyleValue?
- `as_length()` - casts it to LengthStyleValue
- `has_length()` - can it return a Length?
- `to_length()` - gets the internal value out (eg, Length)

This also means, no more `static_cast<LengthStyleValue const&>(*this)`
stuff when dealing with StyleValues. :^)

Hopefully this will be a bit clearer going forward. There are lots of
places using the original methods, so I'll be going through them to
hopefully catch any issues.
2021-09-24 15:01:43 +02:00
Sam Atkins
1ae0781ce1 LibWeb: Alphabetically sort StyleValues
The random order keeps confuzing me!
2021-09-24 15:01:43 +02:00
thankyouverycool
4d2f349710 LibGUI: Categorize font families by variant instead of weight
FontPickerWeightModel is no longer necessary as variants contain
weight as part of a complete typeface description. This fixes fonts
not inventorying correctly in picker when they contained more than
bold and regular typefaces. Weight mapping has been moved into
LibGfx/FontStyleMapping.h
2021-09-24 14:59:39 +02:00
thankyouverycool
84ce923850 LibGfx: Make BitmapFont::variant() report a complete typeface 2021-09-24 14:59:39 +02:00
thankyouverycool
39484fc02c LibGfx: Get weight from tables for TrueTypeFonts
First, try to find detailed weight metrics in the OS/2 table;
barring that, fall back to the font header table.
2021-09-24 14:59:39 +02:00
thankyouverycool
fde48f1a7a FontEditor: Allow editing new font header
And make use of mapping functions moved from
LibGUI/FontPickerWeightModel.h => LibGfx/FontStyleMapping.h
2021-09-24 14:59:39 +02:00
thankyouverycool
fff89ad769 LibGfx: Support italic BitmapFonts
BitmapFont header now contains a slope byte. Slope is used to
indicate slant style and is mapped in LibGfx/FontStyleMapping.h
2021-09-24 14:59:39 +02:00
Mustafa Quraish
07419b8931 diff: Only color output when stdout is a tty
If we're redirecting the output somewhere, we likely don't want to
have ANSI codes in the middle of our diff output.
2021-09-24 14:32:52 +02:00
Mustafa Quraish
6f423ed26e LibDiff: Coalesce adjacent changes into the same Hunk
Now we keep track of the "current" hunk, and only create a new one
if there's at least a single unmodified lines between changes.
2021-09-24 14:32:52 +02:00
Mustafa Quraish
35704ba272 LibDiff: Perform diffing-algorithm in reverse order
Previously the algorithm was being performed from the start of the
string to the end, which was a little more convenient when writing
the code, but made it more annoying to be able to properly talk
about the "start" of where the changes were happening, since we
can only re-construct the changes in reverse order of the initial
traversal.

Basically, doing the initial pass in reverse lets us reconstruct
the hunks in the correct order to begin with, and not have to worry
about reversing the hunks / lines within the hunks
2021-09-24 14:32:52 +02:00
Mustafa Quraish
4173f2ffad diff: Show start/end of line ranges in source/target files
This behaves very much like the regular diff command, showing the
start lines and ranges of additions/changes/deletions in both the
source and target files.
2021-09-24 14:32:52 +02:00
Linus Groh
1a7136b37a LibWeb: Return undefined from event handler setters, not an empty value 2021-09-24 13:19:13 +02:00
Linus Groh
32932f83be LibJS: Rename {Abstract,Typed => Loosely,Strictly}{Equals,Inequals}
This affects the AST's BinaryOp enum as well as the Bytecode's
ENUMERATE_BYTECODE_OPS and JS_ENUMERATE_COMMON_BINARY_OPS macros.
2021-09-24 09:13:57 +02:00
Linus Groh
facbe32fcd LibJS: Rename abstract_relation() to is_less_than()
This got turned into a proper AO with a new name recently.

See: https://github.com/tc39/ecma262/commit/587adc0
2021-09-24 09:13:57 +02:00
Linus Groh
580a7e0f7c LibJS: Rename abstract_eq() to is_loosely_equal()
This got turned into a proper AO with a new name recently.

See: https://github.com/tc39/ecma262/commit/c7d6d1c
2021-09-24 09:13:57 +02:00
Linus Groh
c7ff89891c LibJS: Rename strict_eq() to is_strictly_equal()
This got turned into a proper AO with a new name recently.

See: https://github.com/tc39/ecma262/commit/19d7ca4
2021-09-24 09:13:57 +02:00
Idan Horowitz
5f80d8245d LibJS: Close iterator on throw completion in Array.from
This regressed in #10190
2021-09-24 02:28:17 +03:00
Idan Horowitz
99bc429f3f LibJS: Add missing exception checks to {Array, TypedArray}.from() 2021-09-24 02:28:17 +03:00
Idan Horowitz
ee825d6d9e LibJS: Convert get_method to ThrowCompletionOr 2021-09-23 23:59:13 +03:00
Idan Horowitz
ab594e5f2f LibJS: Convert Value::invoke and VM::call to ThrowCompletionOr 2021-09-23 23:59:13 +03:00
Idan Horowitz
a90107b02a LibJS: Convert is_regexp to ThrowCompletionOr 2021-09-23 23:59:13 +03:00