Andreas Kling
8929c7b474
LibWeb: Remove FFC hack where we assign flex item box dimensions twice
...
This was necessary in the past, because IFC would set the height of its
containing block after inline layout.
Now that IFC can properly communicate the automatic size to its parent
formatting context, this hack is no longer necessary.
2023-03-09 21:54:59 +01:00
Andreas Kling
4bfdc4db17
LibWeb: Make CSS rule cache smarter about pseudo elements
...
Instead of putting every rule that matches a pseudo element in the
same bucket, let them go in the best ID/class/tag name bucket instead.
Then, add a flag to MatchingRule that says whether it contains a
pseudo element in the rightmost compound selector.
When deciding which selectors to run for an element, we can now simply
filter in/out pseudo element selectors as appropriate depending on what
we're trying to match.
This fixes an issue where pages using Font Awesome had 1700+ rules in the
pseudo-element rule cache. (This meant all those rules had to run
against every element twice or more while instantiating pseudo elements.)
2023-03-09 21:54:59 +01:00
Andreas Kling
2a607e9ebc
LibWeb: Rename FFC::specified_axis_size() to inner_axis_size()
...
"Specified" means something else in CSS, so let's not use this
overloaded word here. These helpers return the inner main/cross size of
a given box, so let's say "inner" instead.
2023-03-09 21:54:59 +01:00
Andreas Kling
0315ba5e06
LibWeb: Use FlexItem& item
consistenly in FlexFormattingContext
...
There was a pointless mix of `FlexItem*` vs `FlexItem&` as well as
`flex_item` vs `item`. Let's pick one and be consistent.
2023-03-09 21:54:59 +01:00
Andreas Kling
9eb8025463
LibWeb: Always include shadow roots in DOM debug dumps
2023-03-09 21:54:59 +01:00
Dan Klishch
b170b46aa5
LibTest: Add option to run each benchmark several times
...
This allows to print statistical information (minimum, average, maximum
execution time) about benchmark execution.
2023-03-09 21:20:44 +01:00
Linus Groh
e76394d96c
AK: Remove infallible version of StringBuilder::to_byte_buffer
...
Also drop the try_ prefix from the fallible function, as it is no longer
needed to distinguish the two.
2023-03-09 15:51:00 +00:00
Linus Groh
ad5e8f2742
WebServer+LibGUI: Use fallible version of StringBuilder::to_byte_buffer
...
...and simply ignore the errors for now. This allows us to remove the
infallible function and avoid accumulating more callers of it.
2023-03-09 15:50:45 +00:00
Linus Groh
077f7d1577
LibGemini: Propagate OOM errors from GeminiRequest::to_raw_request()
2023-03-09 14:51:48 +00:00
Linus Groh
d0ecd81888
LibHTTP: Propagate OOM errors from HttpRequest::to_raw_request()
2023-03-09 14:51:20 +00:00
Linus Groh
f068ddb79f
LibIMAP: Propagate OOM errors from decode_quoted_printable()
2023-03-09 14:47:45 +00:00
Karol Baraniecki
fc4d37eea5
LibGL: Use fallible version of StringBuilder::to_byte_buffer
2023-03-09 12:59:57 +00:00
Karol Baraniecki
cd4804ed1c
LibWeb: Use fallible version of StringBuilder::to_byte_buffer
2023-03-09 12:59:57 +00:00
Karol Baraniecki
f8e94f2862
LibCore: Use fallible versions of StringBuilder::append in MimeData
2023-03-09 12:59:57 +00:00
Karol Baraniecki
68d3f348d9
LibCore: Use fallible version of StringBuilder::to_byte_buffer
...
... in MimeData.
This function isn't used anywhere, not sure if it's useful?
2023-03-09 12:59:57 +00:00
Lucas CHOLLET
8faed20603
LibGUI: Use the global setting to show dotfiles in FilePicker
...
`FilePicker` will now look at the global setting at startup. Note that
changing this parameter inside `FilePicker` won't affect the global
parameter.
2023-03-09 09:12:00 +00:00
Lucas CHOLLET
af8b715aac
LibGUI: Add "New Directory" to the contextual menu in FilePicker
2023-03-09 09:12:00 +00:00
Timothy Flynn
1393ed2000
AK+LibUnicode: Implement String::equals_ignoring_case without allocating
...
We currently fully casefold the left- and right-hand sides to compare
two strings with case-insensitivity. Now, we casefold one code point at
a time, storing the result in a view for comparison, until we exhaust
both strings.
2023-03-08 18:57:53 +00:00
Kenneth Myhra
be52e7171a
LibWeb: Add FormDataIterator implementation
...
This adds the FormDataIterator implementation so we can iterate over
FormData.{keys(),values(),entries()}.
2023-03-08 18:57:36 +00:00
Aliaksandr Kalenik
9d03b57c96
LibWeb: Add readiness()
getter in Document
...
This getter returns the same readiness state of document as
`ready_state()` getter that is already present returns but without
allocating string.
2023-03-08 13:08:04 -05:00
Sam Atkins
676d75603b
LibCMake+LibSyntax: Add a CMakeCache.txt syntax highlighter
2023-03-08 14:21:37 +00:00
Sam Atkins
bb07d678ac
LibCMake: Add a lexer for CMakeCache.txt
...
This is a totally different syntax than for regular CMake files, and
also is undocumented and subject to change, but it's also nice and
simple. :^)
2023-03-08 14:21:37 +00:00
Andreas Kling
72569bca1c
LibWeb: Implement the CSS rule cache optimization for UA style as well
...
We were already sorting the author style selectors into buckets.
Now we do it for the built-in UA style as well.
This means less work for the selector engine everywhere :^)
2023-03-08 13:19:15 +01:00
Andreas Kling
2042993997
LibWeb: Convert DOM::Element::m_classes to the new AK::FlyString
...
This makes selector matching significantly faster by not forcing us to
convert from FlyString to DeprecatedFlyString when matching class
selectors. :^)
2023-03-08 13:19:15 +01:00
Kenneth Myhra
b78ee64415
LibWeb: Do not discard String returned from url_encode() to avoid UAF
...
This caused UAF since the string returned from url_encode() was
immediately discarded.
Co-authored-by: Luke Wilde <lukew@serenityos.org>
2023-03-08 09:26:08 +00:00
Linus Groh
d4d49e00a2
LibWeb/Bindings: Remove now unused REPLACEABLE_PROPERTY_SETTER() macro
2023-03-07 23:33:34 +00:00
Linus Groh
351e5ca917
LibWeb/HTML: Port Window.queueMicrotask() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
129ab02470
LibWeb/HTML: Port Window.structuredClone() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
a31c561a5a
LibWeb/HTML: Port Window.sessionStorage to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
37e9302dd9
LibWeb/HTML: Port Window.localStorage to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
5cc6b1c4db
LibWeb/HTML: Port Window.fetch() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
a2fb3a1653
LibWeb/HTML: Port Window.cancelAnimationFrame() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
211e6c1fbc
LibWeb/HTML: Port Window.requestAnimationFrame() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
86589f09dc
LibWeb/HTML: Port Window.cancelIdleCallback() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
b410804f54
LibWeb/HTML: Port Window.requestIdleCallback() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
606b9ff6f3
LibWeb/HTML: Port Window.getSelection() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
56550b6ec0
LibWeb/HTML: Port Window.focus() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
b59505aba5
LibWeb/HTML: Port Window.getComputedStyle() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
8454eb874f
LibWeb/HTML: Port Window.devicePixelRatio to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
46e547d774
LibWeb/HTML: Port Window.outer{Width,Height} to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
80acf03278
LibWeb/HTML: Port Window.screen{X,Y} / Window.screen{Left,Top} to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
3d075e55f5
LibWeb/HTML: Port Window.scrollBy() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
2b6d9cca1a
LibWeb/HTML: Port Window.scroll() to IDL
...
...with various changes required due to ScrollBehavior / ScrollOptions
moving from Element.idl to Window.idl.
2023-03-07 23:33:34 +00:00
Linus Groh
40b4ee88de
LibWeb/HTML: Port Window.scroll{X,Y} / Window.page{X,Y}Offset to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
25f53a577d
LibWeb/HTML: Port Window.inner{Width,Height} to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
0c691087ca
LibWeb/HTML: Port Window.screen to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
2beb99b76e
LibWeb/HTML: Port Window.matchMedia() to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
198db2ebd9
LibWeb/HTML: Port Window.crypto to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
7de9179a6d
LibWeb/HTML: Port Window.performance to IDL
2023-03-07 23:33:34 +00:00
Linus Groh
95ce5735ce
LibWeb/HTML: Port Window.event to IDL
2023-03-07 23:33:34 +00:00