summaryrefslogtreecommitdiff
path: root/Userland/Libraries
AgeCommit message (Collapse)Author
2023-02-20LibWeb: Replace `RefPtr` with `ValueComparingRefPtr` in StyleValueMacDue
Like the name suggests this pointer type compares its pointees by value rather than just by the pointer. This is needed for the defaulted struct Properties equality operator. This commit also contains a few changes to StyleValue such as replacing the operator==()s with a .equals() again. This is done to avoid the new reversed operator==()s ambiguity in C++20.
2023-02-19LibGfx: Implement serialization of Lut16TagData and Lut8TagDataNico Weber
2023-02-19LibGfx: Make Lut16TagData and Lut8TagData ctors verify table sizesNico Weber
The from_bytes() methods error out on invalid table sizes, but let's make sure other potential future callers get it right too.
2023-02-19LibGfx: Fix 7-bit ASCII checks in textDescriptionType and textTypeNico Weber
This used to check the empty, moved-from parameter instead of the member variable (οΌβ€Έαƒš)
2023-02-19LibGfx: Implement serialization of NamedColor2TagDataNico Weber
2023-02-19LibGfx: Make NamedColor2TagData verify inputs are 32-byte 7-bit ASCIINico Weber
NamedColor2TagData::from_bytes() errors out if that isn't the case, but let's make sure other potential future callers get it right too.
2023-02-19LibGfx: Mark a few ICC:NamedColor2TagData methods as constNico Weber
2023-02-19LibGfx: Move NamedColorHeader to BinaryFormat.hNico Weber
2023-02-19LibGfx: Use ICC::Profile::try_for_each_tag in encode_tag_datas()Nico Weber
2023-02-19LibGfx: Add fallible ICC::Profile::try_for_each_tagNico Weber
Similar to 13b18a1 or d0f3f3d.
2023-02-19LibGfx: Remove an ICC writing FIXME, and a commentNico Weber
2023-02-19LibGfx: Bring variables names closer to specLucas CHOLLET
Rename "reset_marker" to "restart_marker" as described by the spec. It also concerns disambiguate the situation as the DRI was also called a reset marker.
2023-02-19LibGfx: Add a spec reference for JPEG constants definitionsLucas CHOLLET
2023-02-19LibGfx: Add a spec link for the JPEG decoderLucas CHOLLET
2023-02-19LibGfx: Remove some magic variables in `JPEGLoader`Lucas CHOLLET
2023-02-19LibGfx: Rename `is_valid_marker()` to `is_supported_marker()`Lucas CHOLLET
2023-02-19LibGfx: Use static_cast in ICC writing codeNico Weber
It's what project leadership wants.
2023-02-19LibGfx: Write multiLocalizedUnicodeType with multiple strings correctlyNico Weber
Found by reencoding Tests/LibGfx/test-inputs/icc-v2.png, the 'dscm' tag.
2023-02-19LibGfx: Add a FIXME to ICC encode_tag_data()Nico Weber
2023-02-19LibGfx: Partially implement serialization of TextDescriptionTagDataNico Weber
It only implements serialization of the 7-bit ASCII string, not yet serialization of the UCS-2 and Macintosh ScriptCode strings. With this, matrix-based v2 profiles can be reencoded :^)
2023-02-19LibGfx: Make TextDescriptionTagData verify input is 7-bit ASCIINico Weber
TextDescriptionTagData::from_bytes() errors out if that isn't the case, but let's make sure other potential future callers get it right too.
2023-02-19LibGfx: Re-alphabetize TagData classesNico Weber
This moves TextDescriptionTagData below SignatureTagData. It just moves code around and doesn't change anything.
2023-02-19LibGfx: Add spec comment to ICC encode_tag_table()Nico Weber
2023-02-19WebDriver: Add computedlabel endpointJonah
2023-02-19LibGfx: Fix a slight mistake in AA ellipse error calculationMacDue
The initial signs were wrong for the deltas of f(x), the ellipse equation. This seemed to be fine for larger circles/ellipses but broke things at a small scale, this was previously fixed with a horrible "error = error / 4" hack. With this change, all ellipses look a little better :^) This also fixed a signed integer overflow Andreas found with UBSAN, which happened for circles with a 1px radius.
2023-02-19LibTextCodec+Everywhere: Port Decoders to new StringsSam Atkins
2023-02-19LibTextCodec: Return Optional<Decoder&> from `bom_sniff_to_decoder()`Sam Atkins
2023-02-19LibTextCodec+Everywhere: Return Optional<Decoder&> from `decoder_for()`Sam Atkins
2023-02-19LibWebView: Display Accessible Name and DescriptionJonah
The accessibility tab now displays elements' names and descriptions along with the role.
2023-02-19LibWeb: Serialize Accessible Name and Description for Accessibility TreeJonah
These will get displayed in the DOM inspector.
2023-02-19LibWeb: Implement Accessible Name and Description CalculationJonah
This is an initial implementation of the accname standard. There is still some of the algorithm left unimplemented that we will need to implement in the future. However, as is, this implementation is sufficient for basic pages.
2023-02-19LibWeb: Add ARIA::allows_name_from_contentJonah
This is required to implement accessible name and description calculation.
2023-02-19LibDeviceTree: Add a slow, allocation-free property fetch APIAndrew Kaster
Using the walk_device_tree helper, we can walk the device tree from the beginning looking for a specific property node. It's still missing the ability to get property lists, string lists, and property-specific data.
2023-02-19LibDeviceTree: Add walk_device_tree and use it to dump structured dataAndrew Kaster
We can use this simple parser and its callbacks to implement more complex parsing in later commits.
2023-02-19LibDeviceTree: Refactor dump() to return ErrorOr, and use ReadonlyBytesAndrew Kaster
ReadonlyBytes is much nicer to use than a u8 const* + size_t.
2023-02-19LibDeviceTree: Print the StringsBlock size properly when bounds checkingAndrew Kaster
2023-02-19Kernel+Userland: Add constants subdirectory at /sys/kernel directoryLiav A
This subdirectory is meant to hold all constant data related to the kernel. This means that this data is never meant to updated and is relevant from system boot to system shutdown. Move the inodes of "load_base", "cmdline" and "system_mode" to that directory. All nodes under this new subdirectory are generated during boot, and therefore don't require calling kmalloc each time we need to read them. Locking is also not necessary, because these nodes and their data are completely static once being generated.
2023-02-19LibWeb: Relax unnecessarily narrow cast in Node::containing_block()Andreas Kling
2023-02-19LibGfx: Rename all `JPG_*` macros to `JPEG_*` in JPEGLoaderLucas CHOLLET
2023-02-19LibGfx: Dedupe identical tag data objects when writing ICC dataNico Weber
With this, common v4 profiles, such as embedded into jpgs by iPhones (when configured to write jpegs) or Pixel phones, are identical to the input when reexported :^)
2023-02-19LibGfx: Implement serialization of ViewingConditionsTagDataNico Weber
2023-02-19LibGfx: Move ICC ViewingConditionsHeader to BinaryFormat.hNico Weber
2023-02-19LibGfx: Correctly handle JPEG image with restart markersLucas CHOLLET
Restart markers are supposed to be applied every restart interval. However, in these loops macroblocks are counted taking the luma sampling factor into consideration. Meaning that we need to correct this factor when testing if we should reset the DC. Also, the decoder was discarding the first byte of every scan with a set restart interval, as `0 % n == 0` is always true.
2023-02-19LibGUI: Allow clipboard items to have no associated dataTim Ledbetter
2023-02-19LibGUI: Allow double-clicking PathBreadcrumbbar buttons to edit pathSam Atkins
When viewing a deeply nested path, there may be very little of the PathBreadcrumbbar itself visible to double-click on. This solves that by allowing double-clicks on its segment buttons to behave the same. (With the caveat that it first selects the double-clicked segment.) In order to make this work, `on_double_click` now takes the modifiers instead of the MouseEvent. In this case we don't use it so that's fine, but maybe we should make all mouse callbacks consistently take the MouseEvent& as a parameter.
2023-02-19LibGUI: Add Button double-click callbackSam Atkins
2023-02-19LibGUI: Add PathBreadcrumbbarSam Atkins
This Widget wraps both a Breadcrumbbar and a TextBox for editing the path manually, based heavily on the existing code in FileManager. Breadcrumbbar itself requires outside code to micro-manage what it does. This class provides a simpler interface for it: Users don't have to worry about segments, they just give/receive a string for the current path.
2023-02-19LibGUI+FileManager: Move `has_{parent,child}_segment` logic into BCBSam Atkins
2023-02-19LibWeb: Port StyleComputer to new StringsSam Atkins
2023-02-19LibWeb: Port FontCache to new StringsSam Atkins