Commit graph

10073 commits

Author SHA1 Message Date
Simon Wanner 509362c103 LibWeb: Include all row-groups in column width calculations
This was noticeable for example on fonts.serenityos.net, where the
thead and tfoot would not get the same column widths as the tbody.
2022-04-03 23:12:13 +02:00
Simon Wanner d28f3e0735 LibWeb: Handle failed browsing context creation in HTMLObjectElement
If the document is not attached to a browsing context we can't create
a new nested browsing context.

This can happen when the resource load for the <object> finishes after
the user navigated away from the current document, for example by
reloading ACID 3 while it's running.
2022-04-03 23:12:13 +02:00
Simon Wanner 450c0df938 LibWeb: Make resolved styles handle calculated length-percentages
This could lead to a crash when inspecting for example the <body>
on holidaycss.js.org, because it has `width: calc(100% - 1em)`
2022-04-03 23:12:13 +02:00
Simon Wanner fe0f0b0acf LibWeb: Add a null-check for page() in ESO::is_scripting_enabled()
This could lead to a crash when spamming reload on a page with a
<script> element.
2022-04-03 23:12:13 +02:00
Enver Balalic 7381474835 LibWeb: Don't break text lines if white-space: nowrap
If white-space is nowrap then we don't want to break a text_node
into multiple line boxes. This fixes the width calculation in the
min-content case for white-space: nowrap elements. Before this
the min-width would be the width of the biggest line box.
2022-04-03 21:51:15 +02:00
Tim Schumacher 3237efc661 LibC: Implement __fseterr 2022-04-03 19:15:14 +02:00
Tim Schumacher 4f706d819a LibC: Implement __freadptrinc 2022-04-03 19:15:14 +02:00
Tim Schumacher 89ed0649f7 LibC: Implement __freadahead 2022-04-03 19:15:14 +02:00
Tim Schumacher 9b543ddb16 LibC: Implement __freadptr 2022-04-03 19:15:14 +02:00
Lenny Maiorani 9afc7d5379 LibCompress: Change DeflateSpecialCodeLengths to constexpr variables 2022-04-03 17:36:48 +01:00
Lenny Maiorani 35af46ee62 LibChess: Change UCI::Command::Type to enum class 2022-04-03 17:36:48 +01:00
Linus Groh 5b48912d35 LibJS: Remove a bunch of gratuitous JS namespace qualifiers 2022-04-03 15:19:33 +01:00
Valtteri Koskivuori f2c02077ba Userland: Remove a few gratuitous IPC namespace qualifiers
Spotted this while trying to search for specific IPC encode/decode
implementations. Now they are all the same, so searching is easier.
2022-04-03 15:18:20 +01:00
Valtteri Koskivuori 45a81f5a2c Browser+LibWeb+WebContent: Add ability to inspect local storage
The storage inspector now has a new tab for local storage. The next step
would be to persist local storage and receive real-time notifications
for changes to update the table view.
2022-04-03 13:13:10 +01:00
Valtteri Koskivuori f2b4c044db LibIPC: Add encoder and decoder for AK::OrderedHashMap
Seems like a useful thing to have.
2022-04-03 13:13:10 +01:00
Enver Balalic d8ec9a5501 LibWeb: Fix computing_width of a block when LayoutMode::MaxContent
We had an issue with computing a width of a block in MaxContent
mode because we would set the width of the containing block to
infinity which would make everything in the try_compute_width
block infinity as well.

This adds a special case for width = 'auto' when
width_of_containing_block is infinity and removes the width of
containing block from the equation entirely.
2022-04-03 12:58:08 +02:00
Rob Ryan c1b311835b LibWeb: Not dispatching page_did_click_link event breaks page refresh
The WebView url wouldn't update so reload in Tab would still use the
previous URL before any left click navigation.

I am unsure if there was any good reason not to dispatch the event when
there are no modifiers.
2022-04-03 12:41:48 +02:00
Rob Ryan 554709fec6 LibGUI: Extend mimic pressed across keyboard shortcuts for buttons
Primary motivation for this was to get a visual indication in the
browser for Ctrl-R refresh. This extends what ForLoveOfCats had done
for calculator button shortcuts across all buttons with shortcuts.

When an action is triggered without an activator each associated button
will be set as mimic pressed.
2022-04-03 12:21:50 +02:00
kleines Filmröllchen 452bbcaa84 LibCore: Turn size properties from an object into a size 2 array
Previously, size properties were a JSON object of the form { "width": x,
"height": y }. Now they are a JSON array [x, y]. Reasons for this
change:
- Much more concise.
- More intuitive, as existing multi-dimensional properties (like
  margins) already use this array format.
2022-04-03 12:21:05 +02:00
kleines Filmröllchen e6fe66594e LibGUI: Register LazyWidget 2022-04-03 12:21:05 +02:00
kleines Filmröllchen 7e34b88ed4 LibGUI: Fully support TabWidget in GML
TabWidgets couldn't be used in GML properly, as the GML creation
routines didn't actually call the necessary functions in the TabWidget
to get a new tab added. This commit fixes that by making the name of the
tab a normal property, the previously introduced "title", which can be
trivially set from GML. Therefore, try_add_widget() loses an argument
(while try_add_tab doesn't, because it newly constructs the widget).
This allows us to get rid of the silly "fixing my widget tree after the
fact" code in Help and will make it super easy to use TabWidget in
future GML. :^)
2022-04-03 12:21:05 +02:00
kleines Filmröllchen 0410414455 LibGUI: Add a title to all Widgets
This title is a generic user-facing name for the widget. For now, it's
only used by TabWidget for tab names.
2022-04-03 12:21:05 +02:00
Linus Groh 83e8dfae38 LibJS: Use AK::Time in system_utc_epoch_nanoseconds()
This also uses <time.h> APIs internally, but wraps them in a much nicer
interface.
2022-04-03 01:10:31 +01:00
Simon Wanner ea9857a423 LibWeb: Add the requestIdleCallback/cancelIdleCallback API 2022-04-02 23:52:25 +01:00
Simon Wanner 836d2ff259 LibWeb: Implement the infrastructure necessary for requestIdleCallback
This includes a bug fix for the event loop processing steps which has
not been merged yet: https://github.com/whatwg/html/pull/7768
2022-04-02 23:52:25 +01:00
Simon Wanner 73da139cd7 LibWeb: Expose IdleDeadline on the window object 2022-04-02 23:52:25 +01:00
Olivier De Cannière 1b7850f511 LibGUI: Add TabWidget::activate_last_tab() 2022-04-02 23:38:32 +02:00
Ben Maxwell 8fa0409ae1 LibGfx: Add list_installed_system_themes() to SystemTheme 2022-04-02 21:50:41 +02:00
Ben Maxwell 3fbefb82ac LibGUI+Applications: Move abstract ThemeEditor preview to LibGUI
This allows most of the theme preview code to be reused by similar
theme preview widgets.
2022-04-02 21:50:41 +02:00
Enver Balalic 747f347b75 LibWeb: Implement flex reverse layouts
This builds on the work done by implementing the flex order CSS
property and implements flex reverse layouts by just reversing
the order and the items within each order bucket.
2022-04-02 19:01:14 +02:00
GeekFiftyFive 737f5b26b7 AK+LibHTTP: Ensure plus signs are percent encoded in query string
Adds a new optional parameter 'reserved_chars' to
AK::URL::percent_encode. This new optional parameter allows the caller
to specify custom characters to be percent encoded. This is then used
to percent encode plus signs by HttpRequest::to_raw_request.
2022-04-02 18:43:15 +02:00
Enver Balalic 58398b1e12 LibWeb: Implement the flex order CSS property
Adds support for the flex order property and a test page for it
on the browser welcome page.
2022-04-02 18:40:32 +02:00
Hendiadyoin1 b7a8cfdde9 LibX86: Correctly name CVTTSS2SI_r32_xmm2m32
This was previously erroneously called CVTTPS2PI_r32_xmm2m32, while
the mnemonic was correctly CVTTSS2SI.
2022-04-02 18:37:38 +02:00
Hendiadyoin1 1432b6ab0a LibX86: Use the correct code for UNPCKLS
We were accidentally using 0x15, which was immediately overridden by
UNPCKHS
2022-04-02 18:37:38 +02:00
Hendiadyoin1 3cae69a6c2 LibX86: Correctly name the first xmm argument
We were accidentally calling it a mm-register
2022-04-02 18:37:38 +02:00
Hendiadyoin1 f951849fd5 LibX86: Don't print repz prefix for SSE instructions 2022-04-02 18:37:38 +02:00
Hendiadyoin1 d03a6cc6c6 LibGfx: Use AK's rsqrt and cast to floats earlier 2022-04-02 18:37:38 +02:00
Sam Atkins b07659d00c Meta+LibWeb: Port PropertyID.h/cpp generators to invoke_generator() 2022-04-02 09:18:07 -04:00
Sam Atkins fc81d6c9f3 Meta+LibWeb: Port ValueID.h/cpp generators to invoke_generator() 2022-04-02 09:18:07 -04:00
Sam Atkins cb406e79f4 Meta+LibWeb: Port MediaFeatureID.h/cpp generators to invoke_generator() 2022-04-02 09:18:07 -04:00
Idan Horowitz 59080f441e LibJS: Normalize NaN values in Sets and Maps
This ensures that different NaN types (e.g. 0/0, 0 * Infinity, etc) are
mapped to the same Set/Map entry.
2022-04-02 14:15:43 +01:00
Idan Horowitz 6f7cab91a7 LibWeb: Use the specification defined types in IntersectionObserverInit 2022-04-02 13:13:37 +03:00
Idan Horowitz 61fc3c31c6 LibWeb: Add the ResizeObserverBoxOptions IDL enum 2022-04-02 13:13:37 +03:00
Idan Horowitz f744c31a6f LibWeb: Use OnErrorEventHandler in WorkerGlobalScope IDL 2022-04-02 12:22:48 +04:30
Idan Horowitz d25bd2dbd8 LibWeb: Add the GlobalEventHandlers IDL mixin 2022-04-02 12:22:48 +04:30
Idan Horowitz 086969277e Everywhere: Run clang-format 2022-04-01 21:24:45 +01:00
Jelle Raaijmakers 7334636933 LibGfx: Return kerning values as a float instead of int
This allows for a more precise rounding of glyph positions.
2022-04-01 12:58:03 +02:00
Jelle Raaijmakers ee9a2e0715 LibGfx: Implement font kerning for Painter::draw_text_run 2022-04-01 12:58:03 +02:00
Enver Balalic 7be57c322e LibWeb: Flex fix minimum main size in min/max violations calculation
While calculating the minimum size for main min/max size violations
we were flooring the min size to 0 if the item doesn't have a min
main size. Instead of that determine the intrinsic min main size
of that element.

This fixes the flex: 80% 0 4/1/0 test case in the flex.html
test page.

This case was missed in a previous commit that added the
determine_min_main_size_of_child function
2022-03-31 21:09:41 +02:00
Itamar 9cd27d1e15 LanguageServers/Cpp: Add SemanticType::PreprocessorMacro
This adds a new semantic token type, PreprocessorMacro.

Calls to preprocessor macros will now be highlighted when semantic
highlighting is enabled in Hack Studio.
2022-03-31 19:10:15 +02:00