Andreas Kling
42f6bd5f83
LibWeb: Add spec comments to FFC layout algorithm step 2
2021-10-13 23:56:26 +02:00
Andreas Kling
1d0c4a07ff
LibWeb: Add spec comments to FFC layout algorithm step 5
2021-10-13 23:56:26 +02:00
Andreas Kling
82bb5ef8b7
LibWeb: Tidy up and add spec comments to FFC layout algorithm step 3
2021-10-13 23:56:26 +02:00
Andreas Kling
1e832dd91a
LibWeb: Add CSS::FlexBasisData::is_definite()
...
This will allow some more expressive code in FlexFormattingContext.
2021-10-13 23:56:26 +02:00
Andreas Kling
d37e5dc64c
LibWeb: Add FFC::flex_container() and use throughout
...
Since FFC is only ever run() on the flex container, we can assume (but
verify) that the run box is the flex container and use an accessor
throughout. The end result: less parameter passing.
2021-10-13 23:56:26 +02:00
Andreas Kling
1580c59f39
LibWeb: Make FFC line and item vectors members instead of locals
...
This gives all member functions access to these vectors without having
to pass them as arguments.
2021-10-13 23:56:26 +02:00
Andreas Kling
c793797e61
LibWeb: Make various function parameters const in FlexFormattingContext
...
This is mainly to validate that inputs are treated as inputs only and
don't get written to.
2021-10-13 23:56:26 +02:00
Andreas Kling
9359df4be9
LibWeb: Move FFC layout algorithm step 16 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
f401794d23
LibWeb: Move FFC layout algorithm step 15 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
6d433c99f4
LibWeb: Move FFC layout algorithm step 14 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
e590e17b8a
LibWeb: Move FFC layout algorithm step 12 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
176f1ad214
LibWeb: Move FFC layout algorithm step 11 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
8f027b4792
LibWeb: Move FFC layout algorithm step 8 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
3402584646
LibWeb: Move FFC layout algorithm step 7 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
0c0df78030
LibWeb: Move FFC layout algorithm step 6 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
0fd25fcbbc
LibWeb: Move FFC layout algorithm step 5 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
fa7bbc602d
LibWeb: Move FFC layout algorithm step 4 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
3375953918
LibWeb: Move FFC layout algorithm step 3 to a separate function
2021-10-13 23:56:26 +02:00
Andreas Kling
c19358e157
LibWeb: Move FFC layout algorithm step 2 into a separate function
...
Determining the available main and cross space is now done by a separate
function. The signature is a little bit hairy since this function
computes some things that are used by subsequent algorithm steps.
Factoring can definitely be improved further.
2021-10-13 23:56:26 +02:00
Andreas Kling
cd6b97ab9e
LibWeb: Turn FlexFormattingContext helper lambdas into member functions
...
Continuing on the quest towards making FlexFormattingContext readable.
2021-10-13 23:56:26 +02:00
Andreas Kling
674b6f5385
LibWeb: Call the FlexFormattingContext context box "flow_container"
...
This is what the spec calls it and makes the code much less ambiguous.
2021-10-13 23:56:26 +02:00
Andreas Kling
ca02d112a5
LibWeb: Split out FFC's "generate anonymous flex items" to a function
...
Let's begin splitting the FlexFormattingContext layout algorithm into
separate functions to make it more manageable.
2021-10-13 23:56:26 +02:00
Andreas Kling
ad50e328e0
LibWeb: Fix bogus 'none' values for resolved min-width and min-height
...
In CSS 'none' is not a valid value for min-width or min-height. The
fallback resolved value should be 'auto' for them.
2021-10-13 23:56:26 +02:00
Andreas Kling
439721f38c
LibWeb: CSS display:position does not imply definite size
...
Per css-sizing-3:
Additionally, the size of the containing block of an absolutely
positioned element is always definite with respect to that element.
As I understand this, it doesn't mean that all absolutely positioned
boxes have definite size, but that the containing block of an absolutely
positioned descendant has definite size from the perspective of the
descendant.
2021-10-13 23:56:26 +02:00
Undefine
5009202038
SystemMonitor: Save refresh frequency to a config file
2021-10-13 20:44:37 +03:00
Ben Wiederhake
203ee58aa2
arp: Preserve error if only the first ioctl fails
2021-10-13 16:11:30 +02:00
Ben Wiederhake
f7daf04f81
SystemServer: Avoid uninitialized memory
2021-10-13 16:11:30 +02:00
Rodrigo Tobar
8ac1e6e73b
LibC: Use the new pread syscall to implement pread
...
This new implementation of pread saves two lseek system calls and is
thread-safe thanks to it simply forwarding the call to the pread system
call.
2021-10-13 16:10:50 +02:00
Linus Groh
52976bfac6
LibJS: Convert to_object() to ThrowCompletionOr
2021-10-13 09:55:10 +01:00
Linus Groh
9eb065a1f6
LibJS: Convert to_primitive() to ThrowCompletionOr
2021-10-13 09:55:10 +01:00
Linus Groh
96ab116f0d
LibJS: Convert to_primitive_string() to ThrowCompletionOr
2021-10-13 09:55:10 +01:00
Linus Groh
da59c77fe3
LibJS: Convert to_utf16_string() to ThrowCompletionOr
2021-10-13 09:55:10 +01:00
Linus Groh
4d8912a92b
LibJS: Convert to_string() to ThrowCompletionOr
...
Also update get_function_name() to use ThrowCompletionOr, but this is
not a standard AO and should be refactored out of existence eventually.
2021-10-13 09:55:10 +01:00
Rodrigo Tobar
e3dffdacb8
strace: Add command line options to filter syscalls
...
By default strace outputs all system calls the monitored process
invokes, but it's sometimes useful to either exclude some calls, or to
include only some others.
This commit adds two new command line options to specify two
exclusion/inclusion command-delimited lists of system calls. These are
then used to decide if an intercepted system call should be displayed in
the output or not.
2021-10-12 10:56:50 -07:00
Rodrigo Tobar
6ff56a96bd
strace: Show sun_path on AF_UNIX socket addresses
2021-10-12 10:56:50 -07:00
Rodrigo Tobar
441a1ae35d
strace: Add support for get{u,eu,g,eg,p,pp}id syscalls
...
All these take no arguments so there's no formatting to be done.
2021-10-12 10:56:50 -07:00
Rodrigo Tobar
1409cc8395
strace: Add formatting for clock_gettime
2021-10-12 10:56:50 -07:00
Rodrigo Tobar
78de54f0f1
strace: Add initial ioctl formatting
...
This is useful in general, but adding it is what finally helped
uncovering #10438 .
2021-10-12 10:56:50 -07:00
Andreas Kling
edbd8b22e8
LibWeb: Mark elements for style update after their children change
2021-10-12 17:54:38 +02:00
Andreas Kling
1b6f0f857e
LibWeb: Re-mark nodes as needing style after moving between documents
...
Since style update is driven by Document, moving a node with dirty style
from one document to another means that we have to schedule a style
update in the new document.
2021-10-12 17:53:38 +02:00
Andreas Kling
82672da331
LibWeb: Style update must recurse into nodes with dirty children
...
It's not enough to only visit nodes which are themselves dirty, we have
to also visit those with dirty children.
2021-10-12 17:46:39 +02:00
Andreas Kling
959b18bde3
LibWeb: Remove a bunch of pointless "else" in EventHandler
2021-10-12 14:44:52 +02:00
Andreas Kling
d90be22a73
LibWeb: Use strong pointers and null checks in handle_keydown()
2021-10-12 14:44:00 +02:00
Andreas Kling
dcb409a112
LibWeb: Use strong pointers and null checks in handle_keyup()
2021-10-12 14:39:09 +02:00
Andreas Kling
865162b1c3
LibWeb: Stop the style/layout update timers after updating style/layout
...
If we had a scheduled update of either of these kind, make sure to
cancel it after performing an update. Otherwise we might do a redundant
second update with the same results.
This could happen if something schedules an async layout, and before it
can happen, something requires a sync layout, which we do right away.
2021-10-12 12:17:25 +02:00
Andreas Kling
76ac1b2496
LibWeb: Add missing upcalls in HTMLSelectElement
2021-10-12 12:17:25 +02:00
Andreas Kling
06e54ea916
LibWeb: Add missing upcalls in HTMLInputElement
...
We need to call the base class in overrides of inserted() and
removed_from(), or things like style invalidation will break.
2021-10-12 12:17:25 +02:00
Linus Groh
44e70d1bc0
LibJS+LibWeb: Let WrapperGenerator deal with legacy_null_to_empty_string
...
This concept is not present in ECMAScript, and it bothers me every time
I see it.
It's only used by WrapperGenerator, and even there only relevant in two
places, so let's fully remove it from LibJS and use a simple ternary
expression instead:
cpp_name = js_name.is_null() && legacy_null_to_empty_string
? String::empty()
: js_name.to_string(global_object);
2021-10-11 23:36:03 +01:00
Andreas Kling
b819719860
LibJS: Make sure queued promise jobs have an execution context when run
2021-10-11 22:21:46 +02:00
Tobias Christiansen
9aa720e83e
LibWeb: Flexbox: Assume container size before layouting children
...
Before layouting the children of a flex container we now either assume
the parent's size or the specified size of the container.
2021-10-11 20:16:53 +02:00