Commit Graph

33216 Commits

Author SHA1 Message Date
Nico Weber
fd7de68d07 LibHTTP+AK: Rename CNETWORKJOB_DEBUG to NETWORKJOB_DEBUG 2022-01-23 00:45:22 +00:00
Nico Weber
a17b2248f2 LibHTTP+AK: Rename CHTTPJOB_DEBUG to HTTPJOB_DEBUG 2022-01-23 00:45:22 +00:00
Liav A
b0790260f8 Base: Add a note on the possibility of failure with the beep utility 2022-01-23 00:40:54 +00:00
Liav A
24efc74318 LibCore: Print the actual errno if sysbeep failed 2022-01-23 00:40:54 +00:00
Liav A
69f054616d Kernel: Add CommandLine option to disable or enable the PC speaker
By default, we disable the PC speaker as it's quite annoying when using
the text mode console.
2022-01-23 00:40:54 +00:00
Liav A
8dbbef9b5c Kernel: Implement beep functionality in virtual consoles 2022-01-23 00:40:54 +00:00
Liav A
4da7b543c6 SystemServer: Create /dev/devctl and create devices based on its events
We first create the /dev/devctl based on the information from the SysFS.
Then, we create block devices and character devices based on the events
we read from that device.
2022-01-23 00:38:02 +00:00
Liav A
eaad77b286 SystemServer: Rename devfs => devtmpfs
We used to have a static devfs, but now it's called devtmpfs which is
completely dynamic.
2022-01-23 00:38:02 +00:00
Liav A
b1ca39411b Kernel/Devices: Introduce the Device Control Device
This device will assist userspace to manage hotplug events.
A userspace application reads a DeviceEvent entry until the return value
is zero which indicates no events that are queued and waiting for
processing.
Trying to read with a buffer smaller than sizeof(DeviceEvent) results in
EOVERFLOW.
For now, there's no ioctl mechanism for this device but in the future an
acknowledgement mechanism can be implemented via ioctl(2) interface.
2022-01-23 00:38:02 +00:00
Andreas Kling
b60e19fd34 LibWeb: Make LineBuilder assign height to empty line boxes
This ensures that <br> produces empty line boxes with the line-height
property as their height.
2022-01-23 01:36:13 +01:00
Liav A
093a598c87 Kernel/Graphics: Send correct parameters to text console clear method
Apparently there was a wrong calculation result when we sent parameters
from TextModeConsole::clear_vga_row method - and we should stick to the
x, y mechanism of the clear method instead of doing the same calculation
which made it to happen twice actually.
2022-01-23 00:33:45 +00:00
thankyouverycool
918dfa51a2 WindowServer: Paint menu checkboxes as such instead of as frames
Fixes disabled checkboxes appearing enabled in menus.
2022-01-23 00:30:00 +00:00
Rummskartoffel
c93dfe8097 TextEditor: Fix crash on startup when file specified cannot be opened
Due to a bug introduced in f674102, TE would attempt to access the value
of an ErrorOr that didn't hold one, hitting an assertion.
2022-01-23 00:27:41 +00:00
Andreas Kling
f5c5efa067 LibWeb: Allow CSS floating objects to flow across multiple lines
If we run out of horizontal space when placing floating objects,
we now perform a "break" and continue with a new line of floats
below the bottommost margin edge of the current line.

This is definitely not 100% to-spec yet, but a huge improvement
on ACID1 already. :^)
2022-01-23 01:22:41 +01:00
Andreas Kling
0ea438e45b LibWeb: Put BFC floating object state into a struct
This patch adds a BFC::FloatSideData struct so we can contain left and
right floating object layout state in a struct. This is preparation for
adding more per-side state.
2022-01-23 01:22:41 +01:00
Andreas Kling
70a56d21dc LibWeb: Don't do horizontal inline line layout twice for last line
After pruning empty last line boxes, we now avoid re-running the
horizontal fragment positioning step, since that would be wasted work.
2022-01-23 01:22:41 +01:00
Andreas Kling
b1fd801436 LibWeb: Pass correct state to TextNode::compute_text_for_rendering()
This is poorly factored. TextNode needs to know whether the most
recently inserted fragment on the current line was empty or ended in
whitespace. This is used when deciding what to do with leading
whitespace in text nodes.

Let's keep this working for now, but we should eventually sort this out
and make text chunk iteration not depend on this information.
2022-01-23 01:22:41 +01:00
Andreas Kling
36e2799131 LibWeb: Make InlineLevelIterator::m_container a Layout::BlockContainer&
This is always a block container (the IFC's containing block.)
2022-01-23 01:22:41 +01:00
Andreas Kling
9f39ad8929 LibWeb: Ignore some collapsible whitespace when building lines
When collapsing whitespace, we can skip over all-whitespace chunks at
the start of each line, and immediately following fragments that
themselves end in whitespace.
2022-01-23 01:22:41 +01:00
Andreas Kling
766d816db3 LibWeb: Remove old Layout::Node::split_into_lines() API
Now that we build lines incrementally, we no longer need the atomic line
splitting API.

The new InlineLevelIterator and LineBuilder setup does have some
regressions from the old behavior, but we can deal with them as we go.
2022-01-23 01:22:41 +01:00
Andreas Kling
ba49dc82e0 LibWeb: Align inline-level boxes to the baseline of the line box
Vertical inline alignment is still very unsophisticated, but let's at
least put everything within each line on the same baseline.
2022-01-23 01:22:41 +01:00
Andreas Kling
2b631cde45 LibWeb: Avoid creating an empty first line box in block containers 2022-01-23 01:22:41 +01:00
Andreas Kling
251b2f49a2 LibWeb: Make LineBuilder respect LayoutMode::OnlyRequiredLineBreaks
In this layout mode, we should only break when forced (e.g by an
explicit <br> tag.) This is used when determining intrinsic sizes.)
2022-01-23 01:22:41 +01:00
Andreas Kling
78f2ddfc14 LibWeb: Make InlineLevelIterator ignore list item marker boxes
Marker boxes are managed explicitly by the corresponding list item box.
2022-01-23 01:22:41 +01:00
Andreas Kling
d3adc94ce8 LibWeb: Dimension inline-block boxes before deciding about line breaks
We won't know if we need to break before the inline-block box until
after we've dimensioned it.
2022-01-23 01:22:41 +01:00
Andreas Kling
67b3f769fb LibWeb: Teach InlineLevelIterator to skip across inline-block elements
We don't want to descend into inline-block containers when iterating
inline-level items, since that would make the inline-level children of
the inline-block bubble up to the containing block of the inline-block.
2022-01-23 01:22:41 +01:00
Andreas Kling
ce8043c6c2 LibWeb: Use LineBuilder in IFC to layout line boxes incrementally
This resolves a long-standing architectural problem in LibWeb that made
it unable to place CSS floating objects correctly due to not having
final vertical position information when computing the amount of
available horizontal space for each line.
2022-01-23 01:22:41 +01:00
Andreas Kling
00bde9ca51 LibWeb: Add Layout::LineBuilder class for incremental line box layout
This class will be used to place items on lines incrementally instead of
the current two-phase approach.
2022-01-23 01:22:41 +01:00
Andreas Kling
ae301d2b02 LibWeb: Remove duplicate type checks in SelectorEngine
After confirming the rule types, we can use static_cast instead of
verify_cast to avoid some extra work.
2022-01-23 01:22:41 +01:00
Andreas Kling
77650fe886 LibWeb: Remove duplicate checks in for_each_effective_style_rule()
After confirming the rule types, we can use static_cast instead of
verify_cast to avoid some extra work.
2022-01-23 01:22:41 +01:00
Andreas Kling
39b2046c42 LibWeb: Move available_space_for_line() into InlineFormattingContext 2022-01-23 01:22:41 +01:00
Andreas Kling
1f603c54ff LibWeb: Add inline-level iterator that enumerates items for line layout
This patch adds a new mechanism that allows InlineFormattingContext to
build line boxes incrementally instead of all-in-one go.

Incremental build will eventually allow much better support for CSS
floating objects.
2022-01-23 01:22:41 +01:00
Andreas Kling
9358f108c4 LibWeb: Add TreeNode<T>::next_in_pre_order(T* stay_within) variant
This is a scoped variant of the pre-order traversal helper that aborts
when attempting to leave the `stay_within` node.
2022-01-23 01:22:41 +01:00
Linus Groh
1ce6c49f5e LibJS: Make CreateTemporalDuration infallible in PlainYearMonthPrototype
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/05793a8
2022-01-23 00:22:10 +00:00
Linus Groh
e16821f460 LibJS: Avoid ambiguity in TimeZone production
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/87a6b0d
2022-01-23 00:22:10 +00:00
Linus Groh
0e3def1d0b LibJS: Don't parse/re-format offset in parse_temporal_time_zone_string()
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/6abe146
2022-01-23 00:22:10 +00:00
Linus Groh
31283b5e64 LibJS: Pass valid offset string directly to CreateTemporalTimeZone
This is an editorial change in the Temporal spec.

See:
- https://github.com/tc39/proposal-temporal/commit/75490b9
- https://github.com/tc39/proposal-temporal/commit/8b70e4b
2022-01-23 00:22:10 +00:00
Linus Groh
6d744eb4a7 LibJS: Use consistent name for offset strings
This is an editorial change in the Temporal spec.

See: https://github.com/tc39/proposal-temporal/commit/17f8cdb
2022-01-23 00:22:10 +00:00
Liav A
eb9c8f3895 Kernel/PCI: Add basic support for the VMD PCI bridge device 2022-01-23 01:12:55 +01:00
Jelle Raaijmakers
df73e8b46b Kernel: Allow program headers to align on multiples of PAGE_SIZE
These checks in `sys$execve` could trip up the system whenever you try
to execute an `.so` file. For example, double-clicking `libwasm.so` in
Terminal crashes the kernel.

This changes the program header alignment checks to reflect the same
checks in LibELF, and passes the requested alignment on to
`::try_allocate_range()`.
2022-01-23 00:11:56 +02:00
dayarthvader
67b7bbe1f6 ping: Handle optional field in the IPv4 header 2022-01-22 22:11:21 +00:00
Lady Gegga
194cad0fc1 Base: Update all Yak-emojis to high-res images 2022-01-22 22:05:48 +00:00
Lady Gegga
53be3b41a7 Base: Add 10CD19 & 10CD1A emojis to PUA codepoints
10CD19 (yaksticker), 10CD1A (yakkie)
2022-01-22 22:05:48 +00:00
Idan Horowitz
024ee0a99a CI: Fail Lagom linters step as soon as any linter fails
This prevents linters from covering the failure of previous linters by
overwriting the error code that Azure reads at the end of the step.
2022-01-22 21:40:09 +02:00
Idan Horowitz
bb340f1272 markdown-check: Ignore absolute icon paths
We have no good way to handle these yet, and there's no point in
forcing everyone to skip their pre-commit checks.
2022-01-22 21:40:09 +02:00
Federico Guerinoni
e37af0b073 umount: Port to LibMain 2022-01-22 13:31:52 +02:00
Federico Guerinoni
2291ef6c3c LibCore: Add syscall wrapper for umount() 2022-01-22 13:31:52 +02:00
Thitat Auareesuksakul
96d2c3a827 Keymaps: Add Thai keymap 2022-01-22 10:38:53 +01:00
Emanuele Torre
191566fc97 LibJS: Avoid potential signed integer overflow in CyclicModule.cpp
`auto count = 0;` will declare `count` as a `signed int`.

We don't want that since `count` is used to count the occurence of an
element in an `AK::Vector` that can have up to `SIZE_MAX` elements;
`SIZE_MAX` can overflow a `signed int` more than 4 billion times.
2022-01-22 10:38:41 +01:00
Lenny Maiorani
065525aba0 LibSoftGPU: Configure stats overlay period
Problem:
- The statistics overlay period is hardcoded to 500 ms. This time is
  very short and can result in the values being very "jumpy".

Solution:
- Increasing this value can result in more steady values which is
  useful when trying to evaluate the performance impact of a change. A
  new config value is offered in `Config.h` to let the developer
  change to any value desired.
2022-01-22 08:57:31 +03:30