Commit graph

33927 commits

Author SHA1 Message Date
Luke Wilde
11eedc309a LibWeb: Implement ErrorEvent
This will be used by the new EventTarget to check if it needs to do
special error event handling. Currently it isn't used for anything
else.
2022-02-07 14:58:18 +01:00
Jorropo
dc42ca37bd LibJS: Fix JSON.stringify with stale surrogate codepoints
This fix this test262 test:
built-ins/JSON/stringify/value-string-escape-unicode.js
2022-02-07 13:53:36 +00:00
electrikmilk
5aa803f7f2 Base: Use GML file type icon 2022-02-07 14:39:29 +01:00
Andreas Kling
fbd58f9615 LibWeb: Dispatch a click event after mousedown+mouseup on same target 2022-02-07 13:28:59 +01:00
Andreas Kling
6c31f6c073 Base: Add a browser test page that dumps out all mouse events 2022-02-07 13:28:59 +01:00
Andreas Kling
438c5bce6c LibWeb: Add MouseEvent.x and MouseEvent.y
Per the CSSOM View spec, these are aliases for clientX and clientY.
2022-02-07 13:28:59 +01:00
Jamie Mansfield
8964f754f5 Kernel: Fix bug in TCP state handling in SynSent
When receiving SYN while in SynSent, we now reply with SYN|ACK in
addition to the SynSent->SynReceived transition.
2022-02-07 13:18:13 +01:00
Andreas Kling
cda56f8049 Kernel: Robustify and rename Inode bound socket API
Rename the bound socket accessor from socket() to bound_socket().
Also return RefPtr<LocalSocket> instead of a raw pointer, to make it
harder for callers to mess up.
2022-02-07 13:02:34 +01:00
electrikmilk
4bfed6a5ed Base+Browser: Add Browser Icons
Add or insert some missing browser icons.
2022-02-07 12:35:05 +01:00
Andreas Kling
1b9e98a17d LibGUI: Paint GUI::TextEditor's optional icon before applying text clip
We were chopping the top row of pixels off of the website favicons in
Browser's location editor. :^)
2022-02-07 12:25:25 +01:00
sin-ack
24fd8fb16f Kernel: Ensure socket is suitable for writing in sys$sendmsg
Previously we would return a bytes written value of 0 if the writing end
of the socket was full. Now we either exit with EAGAIN if the socket
description is non-blocking, or block until the description can be
written to.

This is mostly a copy of the conditions in sys$write but with the "total
nwritten" parts removed as sys$sendmsg does not have that.
2022-02-07 12:21:45 +01:00
James Puleo
2f646f4284 Meta: Add instructions on using Lagom in an external project 2022-02-07 11:04:07 +00:00
networkException
b28e861776 Browser: Better handle ports in user input to url conversion
Previously it was hard to enter a url with a port in browser:

"example.com:8080" -> Protocol not implemented: example.com

This patch makes an attempt at parsing the input as an url with http
first an validates if the url has a port.

"example.com:8080" -> "http://example.com:8080"
2022-02-07 10:52:55 +01:00
electrikmilk
e7b8498a4a Base: Add GML file type icon
Add 16x16 and 32x32 icons for GML files.
2022-02-07 09:25:22 +00:00
Timothy Flynn
b0e5609b88 LibJS: Use GetV to look up the toJSON property in SerializeJSONProperty
The current implementation of step 2a sort of manually implemented GetV
with a ToObject + Get combo. But in the call to Get, the receiver wasn't
the correct object. So when invoking toJSON, the receiver was an Object
type rather than a BigInt.

This also adds spec comments to SerializeJSONProperty.
2022-02-07 09:24:09 +00:00
electrikmilk
e6164fa439 Base: Finish Latin Extended-B for Katica
Adds 0200-024F to Katica Regular 10 to complete Latin Extended-B
section.
2022-02-07 03:23:39 +00:00
electrikmilk
3b67351d8e Base: Add Italic version of Katica 2022-02-07 03:18:07 +00:00
serenityosrocks
7371d16b03 Meta: Fix "Meta/serenity.sh run x86_64 Clang" on M1 Macs
QEMU crashes on M1 Macs when using `--accel hvf` option.

To solve this, detect the host's architecture and only add the
`--accel hvf` parameter if we are running on a "x86_64" machine.
This will allow "arm64" machines like M1 Macs to work correctly.
2022-02-07 02:25:32 +00:00
Andreas Kling
89cd00b540 LibWeb: Fix broken step 4.3 implementation in run_focus_update_steps()
Some over-eager copy-pasting led to incorrect code for the new chain.
2022-02-07 02:17:49 +01:00
Andreas Kling
a05c07fdcd LibWeb: Use NonnullRefPtrVector<DOM::Node> for focus chains
Let's just use reference-counting pointers for this, even if it seems
safe not to.
2022-02-07 02:17:45 +01:00
Andreas Kling
1ea2467a7a LibWeb: Improve step 3 of "focus chain" from the HTML spec
This function was unnecessarily nested, which created a scenario where
we could get stuck in an infinite loop without advancing the
current_object pointer up the browsing context container chain.
2022-02-07 01:55:06 +01:00
Andreas Kling
086eb1ad7b LibWeb: Fix inverted null check in run_focusing_steps()
Thanks to U9G for catching this! :^)
2022-02-07 01:29:01 +01:00
electrikmilk
ebfd296016 Documentation: Small fixes to transferring files documentation 2022-02-06 23:50:20 +00:00
Andreas Kling
627ad6c37c LibWeb: Add a proper FocusEvent interface for "focus" and "blur" events 2022-02-07 00:04:50 +01:00
Lady Gegga
386912c019 Base: Increase max width for Katica Bold 10 from 7 to 10 2022-02-06 22:37:54 +00:00
Linus Groh
6f20f49b21 Everywhere: Rename JS::PropertyKey variables from property_{name => key}
PropertyKey used to be called PropertyName, but got renamed. Let's
update all the variables of this type as well.
2022-02-06 22:02:45 +00:00
Andreas Kling
3e6aaa3520 LibWeb: Update focus target when handling mousedown events
If the mousedown event hits something with is_focusable()==true,
we now update the document's focused element *instead* of placing the
text cursor at the focusable element.

This allows you to begin editing input elements by clicking them.

This feels very hackish and we'll need to come up with something nicer.
2022-02-06 22:13:13 +01:00
Andreas Kling
2666cb7b01 LibWeb: Move is_focusable() virtual from Element to EventTarget 2022-02-06 22:13:13 +01:00
Andreas Kling
9391311760 LibWeb: Make HTMLInputElement move cursor into text node when focused
This mechanism feels rather awkward, but it's better than nothing.
2022-02-06 22:13:13 +01:00
Andreas Kling
65bd4477db LibWeb: Plumb OOPWV focus state across the IPC boundary
This makes focus outlines show up in OOPWV at last! :^)
2022-02-06 22:13:13 +01:00
Andreas Kling
a062e803c5 LibWeb: Implement (most of) HTMLElement.focus()
The main deviation from the spec is that we don't have a straightforward
representation of the spec's "focusable area" concept.

I've left a bunch of FIXME's around for our future selves. :^)
2022-02-06 22:13:13 +01:00
Andreas Kling
1165a94624 LibWeb: Implement BrowsingContext::currently_focused_area()
This is "currently focused area of a top level browsing context"
from the HTML spec.
2022-02-06 22:13:13 +01:00
Andreas Kling
83523cabda Kernel: Fix bugs in TCP state handling in FinWait1 & FinWait2
1. When receiving FIN while in FinWait1, we now reply with ACK
   in addition to the FinWait1->Closing transition.

2. When receiving FIN|ACK while in FinWait1, we now reply with
   ACK and transition from FinWait1->TimeWait.

3. When receiving FIN while in FinWait2, we now reply with ACK.
2022-02-06 22:13:13 +01:00
Andreas Kling
7247f0204d Kernel: Send only FIN when shutting down TCP socket from ESTABLISHED
We were previously sending FIN|ACK for some reason.
2022-02-06 22:13:13 +01:00
Sam Atkins
bf178e0196 LibWeb: Implement SVG S (SmoothCurve) commands
These were being parsed, but skipped when rendering. With this fix, the
SVG on discord's invite screen looks pretty nice! :^)
2022-02-06 22:13:07 +01:00
Sam Atkins
dc7e73a0b7 LibWeb: Don't dump all stylesheets with CSS_PARSER_DEBUG enabled
Browser has a handy debug menu option to dump all stylesheets, so we
don't need to spam the console with this. (All the spam massively slows
down page loads.)
2022-02-06 22:13:07 +01:00
Andrew Pietila
3758dffd16 Meta: Don't override SERENITY_QEMU_DISPLAY_DEVICE if it is already set 2022-02-06 18:29:25 +00:00
Hendiadyoin1
fbb798f98c AK: Move integral log2 and exp to IntegerMath.h 2022-02-06 17:52:33 +00:00
Hendiadyoin1
f6ddaef8bf Soundplayer: Use exp() instead of pow(E, n) 2022-02-06 17:52:33 +00:00
Hendiadyoin1
3e135f347f Userland: Use AK::pow<I> where applicable 2022-02-06 17:52:33 +00:00
Hendiadyoin1
9ba9691d19 AK: Use integral power for FixedPoint formatting
This removes an ifdef for the Kernel
2022-02-06 17:52:33 +00:00
Hendiadyoin1
581c23dc55 AK: Introduce IntegralMath.h starting with pow<I> 2022-02-06 17:52:33 +00:00
sin-ack
64f135d90f LibCore+Userland: Remove Core::TCPSocket :^)
This was deprecated in favor of Core::Stream::TCPSocket, and now has no
users.
2022-02-06 17:28:17 +00:00
Timothy Flynn
cb57475168 LibJS: Implement BigInt.asUintN 2022-02-06 15:49:54 +00:00
Timothy Flynn
460c2caaf7 LibJS: Implement BigInt.asIntN 2022-02-06 15:49:54 +00:00
Timothy Flynn
72b3ea49d6 LibJS: Enable Temporal tests that now pass
These pass now that negative zero is disallowed by SignedBigInteger.
2022-02-06 15:49:54 +00:00
Timothy Flynn
b0d6399f60 LibCrypto: Do not allow signed big integers to be negative zero
If a big integer were to become negative zero, set the sign to instead
be positive. This prevents odd scenarios where users of signed big ints
would falsely think the result of some big int arithmetic is negative.
2022-02-06 15:49:54 +00:00
Andreas Kling
4d785b9aa0 LibJS: Mark Completion constructors with ALWAYS_INLINE
These were showing up in profiles.
2022-02-06 16:30:57 +01:00
Andreas Kling
41fe02e012 LibWeb: Rename "frame" to "browsing_context" in various places
We renamed the Frame class to BrowsingContext a while back, but forgot
to update some variable names.
2022-02-06 16:22:58 +01:00
Andreas Kling
5dd4b3eaaa LibWeb: Put ResolvedCSSStyleDeclaration debug spam behind a macro
Blowing up the debug console with a fajillion FIXME's whenever you
navigate in the web inspector is no fun.
2022-02-06 16:22:58 +01:00