Commit Graph

28313 Commits

Author SHA1 Message Date
Idan Horowitz
b888d14e42 LibWeb: Change the parent interface of MouseEvent to UIEvent
This was accidentally set to Event
2021-10-01 20:14:45 +02:00
Idan Horowitz
ac25c28c43 LibWeb: Add the missing UIEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
7b2c63fd87 LibWeb: Add support for unwrapping the WindowObject to WrapperGenerator 2021-10-01 20:14:45 +02:00
Idan Horowitz
f176514db8 LibWeb: Add the UIEvent::{view, detail} IDL attributes 2021-10-01 20:14:45 +02:00
Idan Horowitz
1c4404c46a LibWeb: Add the missing PageTransitionEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
4d71f22673 LibWeb: Add the missing ProgressEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
1e8ba0d9d3 LibWeb: Add the missing SubmitEvent IDL constructor
This commit also removes the SubmitEvent.cpp file, as all of the method
implementations were trivial and could be inlined into the header file.
2021-10-01 20:14:45 +02:00
Idan Horowitz
d44857d34d LibWeb: Add the missing MessageEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
9863de4609 LibWeb: Add the lastEventId IDL attribute to MessageEvent 2021-10-01 20:14:45 +02:00
Idan Horowitz
b53fc8ad3d LibWeb: Change the IDL type of MessageEvent::data to any 2021-10-01 20:14:45 +02:00
Idan Horowitz
ded8e84f32 LibWeb: Add the missing CloseEvent IDL constructor 2021-10-01 20:14:45 +02:00
Idan Horowitz
7f551d7f6a LibWeb: Use the LibWeb source directory as the IDL #import base path
This allows us to include IDL files from other base LibWeb directories
wihout using relative `../foo.idl` references.
2021-10-01 20:14:45 +02:00
Sam Atkins
bd648d082c LibWeb: Parse media queries! :^)
While not complete by any means, we are now compatible with the [level 3
spec](https://www.w3.org/TR/css3-mediaqueries/#syntax) and some parts of
[level 4.](https://www.w3.org/TR/mediaqueries-4#mq-syntax)

Compatibility with level 4+ requires:
- Implementing the range syntax: `(800px <= width <= 1200px)`
- Parsing `<general-enclosed>`, which represents syntax that is not yet
used but they may use in the future.
2021-10-01 20:03:03 +02:00
Sam Atkins
2ed0f880ee LibWeb: Add TokenStream::rewind_to_position()
Parsing media queries sometimes requires significant back-tracking, so
`reconsume_current_input_token()` was not good enough.
`rewind_to_position()` lets you reconsume an erbitrary number of tokens
to return to an earlier point in the stream, which you previously saved
from `TokenStream::position()`.
2021-10-01 20:03:03 +02:00
Sam Atkins
c7cd489689 LibWeb: Parse @media rules into CSSMediaRule objects
This is not yet actually useful, since we only have a stub for parsing
the query part, but now I have a nice way to test that things are
working. :^)
2021-10-01 20:03:03 +02:00
Sam Atkins
b4833bf2a3 Base: Add media-queries test page 2021-10-01 20:03:03 +02:00
Sam Atkins
9c5430b9ee LibWeb: Make consume_a_qualified_rule() understand block tokens
This now matches the spec, and fixes the situation where if it was given
a TokenStream of StyleComponentValueRules, it would drop any Blocks on
the floor instead of adding them to the result StyleRule.
2021-10-01 20:03:03 +02:00
Sam Atkins
f1af136925 LibWeb: Make MediaQueryList store MediaQueries instead of a String 2021-10-01 20:03:03 +02:00
Sam Atkins
5bbbdb81dc LibWeb: Sketch out media-query parsing
This does everything except actually parse the individual media queries.
2021-10-01 20:03:03 +02:00
Sam Atkins
3e74c194f9 LibWeb: Add CSSMediaRule
This is the class corresponding to a `@media` rule. It contains a list
of media queries and a list of child css rules.
2021-10-01 20:03:03 +02:00
Sam Atkins
8ac622f056 LibWeb: Add MediaList
This is a list of MediaQuery objects. Not to be confused with
`MediaQueryList`, which is concerned with firing events when a media
query's match-state changes.
2021-10-01 20:03:03 +02:00
Sam Atkins
0a4d9c6d31 LibWeb: Partially implement MediaQuery class :^)
The main thing that's missing is the actual matching, but this is enough
to get started.
2021-10-01 20:03:03 +02:00
Brian Gianforcaro
b90cc1148a Kernel: Switch RTL8168NetworkAdapter::possible_device_name to StringView
There is no need to allocate a `AK::String` for the device name, when
the list of devices is entirely static.
2021-10-01 17:22:17 +00:00
Brian Gianforcaro
2770433d30 Kernel: Convert network adapter names to Kernel::KString
Another step of incremental progress of removing `AK::String` from the
kernel, to harden against OOM.
2021-10-01 17:22:17 +00:00
Tobias Christiansen
33a9f908a6 LibWeb: Flexbox: Check for relative resolvability on the cross axis
If an element has a relative specified length on the cross axis, but in
the lineage there are no parents that have any fixed cross size, this
would have resulted in a 0 cross size.
We now catch that and check whether the relative length would result in
an actual definite length if resolved.
2021-10-01 13:52:41 +02:00
Ali Mohammad Pur
a3fe981daa RequestServer: Ignore preconnect requests for available connections
There's no need to schedule a useless job when the connection is already
there and established.
2021-10-01 13:52:26 +02:00
Liav A
4974727dbb Kernel: Move x86 IO instructions code into the x86 specific folder 2021-10-01 12:27:20 +02:00
Liav A
3e9dfd2e74 Kernel: Remove IO.h include from a bunch of places 2021-10-01 12:27:20 +02:00
Luke Wilde
c0a64f7317 LibWeb: Check for HTML integration points in the tree constructor
This particularly implements these two points:
- "If the adjusted current node is an HTML integration point and the
   token is a start tag"
- "If the adjusted current node is an HTML integration point and the
   token is a character token"

This also adds spec comments to the tree constructor.
2021-10-01 12:26:41 +02:00
Ali Mohammad Pur
36516a4c47 LibJS: Take a pointer in get_or_prune_cached_prototype_transition()
Prototypes can be set to null, and while the previous version also kinda
allowed null (by not reading through the null reference), it was making
UBSAN very sad.
2021-10-01 09:20:25 +03:30
Samuel Bowman
db98ed5ed0 Spreadsheet: Add a toolbar
This commit adds a basic toolbar with the following actions:
Add New Sheet, Open, Save, Cut, Copy, and Paste.
2021-10-01 08:34:59 +03:30
Samuel Bowman
e422bfbe88 Spreadsheet: Store actions in member variables on SpreadsheetWidget
Actions are now stored in member variables so they can be used
throughout SpreadsheetWidget.
2021-10-01 08:34:59 +03:30
Samuel Bowman
d8bac4dbda Spreadsheet: Move menu and action code to initialize_menubar()
Previously, all the code to add menus and actions was in main().
This was messy and didn't allow us to reference the actions from
SpreadsheetWidget, which is needed in order to add a toolbar.

This commit moves the menu and action adding code to method on
SpreadsheetWidget called initialize_menubar() which is based upon
applications such as TextEditor which have identically named methods
doing the same thing.

In additon, clipboard_action(), previouly a lambda in main(), has also
been made into a method on SpreadsheetWidget since it would otherwise
be destroyed when it goes out of scope. (This was previously avoided by
declaring the lambda in main() so it's always in scope.)
2021-10-01 08:34:59 +03:30
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
841a5fe81b Tests: Fix typos 2021-10-01 01:33:43 +01:00
Nico Weber
5e21759f3d AK: Fix typos 2021-10-01 01:33:43 +01:00
Nico Weber
97d27c312a Base: Fix typos 2021-10-01 01:18:52 +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
Nico Weber
9ec9886b04 Meta: Fix typos 2021-10-01 01:06:40 +01:00
Nico Weber
cd7ec294db Documentation: Fix grammar-o in ProcFSIndexing.md 2021-10-01 01:06:40 +01:00
Nico Weber
5a951d6258 Kernel: Fix a few typos 2021-10-01 00:51:49 +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
Timothy Flynn
becbb0ea97 LibUnicode: Upgrade to Unicode version 14.0.0 2021-09-30 17:37:57 +01:00
Timothy Flynn
c8dbcdb0bc LibUnicode: Do not compare generated file contents before writing
This is now covered by unicode_data.cmake after the superbuild changes.
2021-09-30 17:37:57 +01:00