Commit Graph

21213 Commits

Author SHA1 Message Date
Jelle Raaijmakers
474f9e9c69 LibGL: Implement GL_TEXTURE_ENV_COLOR
This sets a constant color in the texture's environment for the fixed
function pipeline.
2023-01-01 23:33:26 +01:00
networkException
9b50d74df2 LibGUI: Fix wrong copyright header email for recent OpacitySlider change
This patch fixes the wrong email domain being used for the copyright
header change in f828bf6479
2023-01-01 19:03:03 +01:00
martinfalisse
20313ae8a8 LibWeb: Use TextTop and TextBottom property for VerticalAlign
If text-top or text-bottom are given as values for the vertical-align
property, actually use them and calculate the respective position of
the element.

The actual calculations done (using the font_size, descent, etc.) are
not exactly how I imagined them when reading the spec, but the results
seem acceptable when compared to other browsers.
2023-01-01 18:38:01 +01:00
martinfalisse
d3b4a5fbdb LibWeb: Allow use of calculated property for line-height
Previously, calculated properties for line-heights were not being
calculated and were simply ignored.
2023-01-01 18:38:01 +01:00
Andreas Kling
7d863174b3 LibWeb: Use a JS::NonnullGCPtr for DOMTokenList::m_associated_element
Both Element and DOMTokenList are GC-allocated objects so they can just
mark each other instead of using the old strong/weak pattern we use in
ref-counting ownership models.
2023-01-01 17:51:51 +01:00
Sam Atkins
59d9d1d07a ThemeEditor: Make GUI initialization fallible
To do this, all GUI logic is moved into try_create() factory functions.
2023-01-01 09:55:05 -05:00
Sam Atkins
fa98034ff7 LibGUI+Userland: Make GML unregistered_child_handler fallible 2023-01-01 09:55:05 -05:00
Sam Atkins
2069a5a2a0 Snake: Make initialization from GML fallible
Replace the C_OBJECT factory functions with a custom try_create() which
loads the various bitmaps. Any failures there are now propagated.
2023-01-01 09:55:05 -05:00
Sam Atkins
b32f5dbcff LibCore+LibGUI: Add fallible versions of Widget::load_from_gml()
The existing `load_from_gml()` methods look the same as before from the
outside. Inside though, they now forward to `try_load_from_gml()` which
returns Error when things go wrong. It also now calls the `try_create()`
factory method for Objects instead of the `construct()` one.
2023-01-01 09:55:05 -05:00
Andreas Kling
e3b9f78eb9 MouseSettings: Tweak "Natural scrolling" checkbox size
The old size wasn't wide enough to accommodate a focus rect, and we
ended up clipping the right edge of it.
2023-01-01 13:48:29 +01:00
Victor Song
9724797da7 Utilities: Print arbitrary bytes in ls
Currently, `ls` crashes when printing certain byte sequences.
This is likely due to an out-of-bounds error when iterating
through the `StringView` representing the file name to be printed.
We switch to using an index-based for loop to a range-based
for loop. This fixes #16678.
2023-01-01 11:03:29 +00:00
Timothy Flynn
41e0e4cdd7 LibSQL: Add parsing and evaluation of BOOLEAN type literals
This allows you to enter TRUE or FALSE in a SQL statement for BOOLEAN
types. Note that this differs from SQLite, which requires entering 1 or
0 for BOOLEANs; having explicit keywords feels a bit more natural.
2023-01-01 10:16:55 +00:00
networkException
c8f9bfe026 LibGUI: Make color picker opacity sliders react to the chosen color 2023-01-01 09:38:07 +00:00
networkException
f828bf6479 LibGUI: Add base color to OpacitySlider
This patch adds a base color to OpacitySlider which will be used to
render the alpha gradient.
2023-01-01 09:38:07 +00:00
Luke Wilde
42b011b571 LibWeb: Mark the border-style properties as layout affecting
`border-style: none` and `border-style: hidden` remove the border
entirely during layout, causing boxes to shift around.
2022-12-31 23:22:02 +01:00
Luke Wilde
7bd6a5b868 LibWeb: Treat border-style: hidden the same as border-style: none
The only difference between these two values is that `hidden` has
different behaviour for border conflict resolution for border-collapsed
tables in table layout, which we don't have yet.

This gets rid of the main border around the repository information on
the GitHub repository page.
2022-12-31 23:22:02 +01:00
Ben Wiederhake
0aed7f1c8e LibCrypto: Don't crash in ASN1::parse_generalized_time on missing 'Z' 2022-12-31 23:21:17 +01:00
Ben Wiederhake
0ca41d2813 LibCrypto: Don't crash in ASN1::parse_utc_time on missing 'Z'
The underlying reason is an unconditional call to consume(), even if
there is no reason to expect that the string continues.

This crash was discovered by OSS-Fuzz:
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=42354
This bug exists since the code was first written in April 2021:
13abbc5ea8
2022-12-31 23:21:17 +01:00
Ben Wiederhake
e8ce0f0eba LibCore: Make DateTime more easily debuggable
In particular, implement operator== and AK::Formatter.
2022-12-31 23:21:17 +01:00
Andrew Kaster
21622880cd LibC: Include aarch64 regs.h for AK_ARCH_AARCH64
Looks like this got mangled in the i686 removal.
2022-12-31 23:21:06 +01:00
Nico Weber
47f29170b3 LibGfx+icc: Add profile connection space printing
This is a bit messy: The spec says that PCSXYZ and PCSLAB are the only
valid profile connection spaces -- except for DeviceLink profles, where
all data color spaces are valid.

So this uses the existing ColorSpace enum for profile connection spaces
instead of adding a dedicated enum, to not duplicate all the color space
parsing and printing code.  That matches what the spec does, too.
This saves about 100 lines of code, at the expense of less type
safety -- but further down the line we probably want to be able to
compare data color spaces and profile connection spaces, so the type
safety would likely get in the way then. (But if not, we can change
things around once we get to that point.)
2022-12-31 23:18:35 +01:00
Nico Weber
0b46e572b5 LibGfx+icc: Print profile flags
These flags are always 0 in practice in all profiles I've seen so far,
but hey, probably nice to dump them anyways.
2022-12-31 23:17:48 +01:00
Timothy Flynn
88d5fd4b73 LibWeb: Paint repeating background images over entire paint box
We were previously missing the bottom- and right-most pixels. This fixes
the errant red line showing on the Acid2 forehead.
2022-12-31 20:16:59 +01:00
Nico Weber
b1e977e18a LibGfx: Use VERIFY_NOT_REACHED() for impossible states in ICC code
The `parse_` functions reject invalid values, so we know the default is
unreachable.
2022-12-31 12:59:22 -05:00
Nico Weber
a8ee5dd9cd LibGfx: Make ICC name converters return StringView 2022-12-31 12:59:22 -05:00
Itamar
a802fb2023 LibWeb: Support MouseEvent.{pageX,pageY}
Unlike client{X,Y} which is relative to the current viewport, these
offsets are relative to the left edge of the document (i.e they take
scroll offset into account).
2022-12-31 16:17:48 +01:00
Itamar
f6862a4203 LibWeb: Use CSSPixelPoint in MouseEvent::create_from_platform_event() 2022-12-31 16:17:48 +01:00
Itamar
66ee08c3dc LibWeb: Fix calculation of MouseEvent::client_{x,y}
MouseEvent.client{X,Y} should be relative to the viewport.
2022-12-31 16:17:48 +01:00
Tom
3dccee6025 LibWeb: Fix table-row y-position
Fixes the y-position of rows when indicated through the display
attribute `table-row`. Previously there was no y-offset between rows and
so they would overlap.
2022-12-31 14:48:37 +01:00
Liav A
658f9eec6a Utilities: Introduce the ldd utility
This utility lets a user to figure out what are the dependency libraries
for an ELF dynamic object, whether it's a dynamically loaded executable
or dynamically loaded library.
2022-12-31 05:06:39 -07:00
Liav A
efec344803 LibELF: Export static resolve_library method of the DynamicLinker code
It will be used in the following commit to introduce a new utility to
use this method.
2022-12-31 05:06:39 -07:00
Cody Hein
ab8522aa17 PixelPaint: ColorPicker updates user colors while dragging
Now the user can hold primary and/or secondary mouse buttons
and move the mouse around while previewing the color on the
statusbar and fine tune their selection. The color will update
live so the color selected when mouse is released is the final
color used.
2022-12-31 04:49:19 -07:00
Cody Hein
29665668b6 PixelPaint: Allow ImageEditor event to append info to the statusbar
This provides an event on ImageEditor for other functions to
activate functions when appended_status_info is updated
2022-12-31 04:49:19 -07:00
Lucas CHOLLET
bf06f49417 LibCore: Use CircularBuffer in BufferedHelper
This patch takes care of a FIXME :^)

Co-Authored-By: Tim Schumacher <timschumi@gmx.de>
2022-12-31 04:44:17 -07:00
Rafał Babiarz
3454891d38 Browser: Add window to inspect history 2022-12-31 04:36:22 -07:00
Lucas CHOLLET
ebe925b7c0 userdel: Use Core::Account::sync() to interact with sensitive files 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
945d2079b4 LibCore: Add a deleted state for Account
As other setters, this only affect the in-memory copy, you need to call
`sync()` to apply changes.
2022-12-31 04:24:05 -07:00
Lucas CHOLLET
f000193ee5 LibCore: Deduplicate some code in Account::generate_shadow_file() 2022-12-31 04:24:05 -07:00
Lucas CHOLLET
3c76790d51 userdel: Use Core::File::remove() instead of spawning /bin/rm 2022-12-31 04:24:05 -07:00
implicitfield
d49fccf0d5 ThemeEditor: Support editing color schemes 2022-12-31 04:20:59 -07:00
implicitfield
1a68977457 Flood: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
800c292be8 Terminal+LibVT: Get the color scheme from the system theme 2022-12-31 04:20:59 -07:00
implicitfield
8eb402f8e5 LibGfx: Support color schemes 2022-12-31 04:20:59 -07:00
implicitfield
4aec8491d6 Everywhere: Move Base/res/terminal-colors to Base/res/color-schemes 2022-12-31 04:20:59 -07:00
Tim Schumacher
83f6d5b26a LibELF: Warn if resolving a library resulted in a relative path 2022-12-31 04:16:57 -07:00
Luke Wilde
1011067a60 LibWeb: Stub HTMLInputElement.setSelectionRange
Required by Twitter to move the input caret of the 2FA <input> element
to the start. However, we don't currently handle individual <input>
element selections.
2022-12-30 21:56:54 -05:00
Luke Wilde
6d188d72c0 LibWeb: Store cookies for every HTTP response
As per Fetch, we are supposed to store cookies from Set-Cookie as soon
as we receive response headers for any HTTP response, even in error
cases.

Required by Twitter to login, as it sets cookies via XHR.
2022-12-30 21:56:54 -05:00
Arda Cinar
c9d434247d LibMarkdown: Indent blockquotes inside the terminal renderer
This removes one FIXME :^)
2022-12-31 00:09:23 +01:00
Arda Cinar
5cc984d74c LibMarkdown: Render lines to terminal instead of a single string
With this patch, the blocks in a markdown document render a vector of
lines. These lines get concatenated in Document::render_to_terminal, so
this does not change any external APIs of LibMarkdown.

This change makes it possible to indent individual lines in the rendered
markdown. So, rendering blockquotes in a similar way to code blocks :^)
2022-12-31 00:09:23 +01:00
Aayush
7a4b912ece LibGUI: Fix invalid ModelIndices during shift-click multiselection
Previously, If the widget was unfocused, the selection start index
would be invalid. This would result in invalid selections when doing
shift+click on the widget (while it is unfocused).

Now, we reassign the selection start index to current index
before we initiate multiselection, if selection start index is invalid.

Should Fix SerenityOS#11999 and the same bug inside FileManager.
2022-12-31 00:08:35 +01:00