summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-04-30LibGUI: Don't fix ImageWidget's size when disabling auto_resize()thankyouverycool
2023-04-30LibGUI: Propagate construction errors in LinkLabelthankyouverycool
2023-04-30LibGUI+Userland: Port Labels to Stringthankyouverycool
2023-04-30LibGfx: Return StringView for SystemTheme Rolesthankyouverycool
This will simplify upcoming Label porting in ThemeEditor.
2023-04-30ICC: Add Profile::to_lab()Nico Weber
This can be used to convert a profile-dependent color to the L*a*b* color space. (I'd like to use this to implement the DeltaE (CIE 2000) algorithm, which is a metric for how similar two colors are perceived. (And I'd like to use that to evaluate color conversion roundtrip quality, once I've implemented full conversions.)
2023-04-30LibTest: Add a EXPECT_APPROXIMATE_WITH_ERROR macro with custom errorNico Weber
2023-04-30PixelPaint: Clip the gradient tool preview to the active layer rectTim Ledbetter
This makes it easier to see what the result will be when using two solid colors.
2023-04-29Chess: Don't attempt to update the board when clicking out of boundsTim Ledbetter
Previously, clicking outside the bounds of the board when the window was resized, could cause a crash.
2023-04-29LibC: Add Ipv6 address checking macros to netinet/in.hNicolas Josef Zunker
To be able to port c-ares the IN6_IS_ADDR_V4COMPAT and various macros of the form IN6_IS_ADDR_MC_XX_LOCAL were added as well as the IN_CLASS{A,B} macros
2023-04-29LibWeb: Split `Length::relative_length_to_px()` by typeSam Atkins
Length units are either relative to the font, or to the viewport, but never both. So we can save some work by not gathering font metrics for a viewport unit, and not retrieving the viewport for a font unit. Currently this is only helpful when the `to_px(Layout::Node)` method is called, but since that is 208 places according to CLion, (plus 33 indirect uses via `Length::resolved()`) it still seems worthwhile. :^)
2023-04-29LibWeb: Add even more viewport-based Length unitsSam Atkins
`*vi` and `*vb` vary on which direction they check depending on whether the writing mode is horizontal or vertical, so they will need some modification once we support that.
2023-04-29LibWeb: Add *lots* of viewport-based Length unitsSam Atkins
`sfoo` `lfoo` and `dfoo` are, for our purposes, identical to `foo`, because we don't have dynamic GUI elements that cover the page content.
2023-04-29LibWeb: Add `ic` and `ric` Length unitsSam Atkins
Using the rough heuristic instead of the actual spec measurement. It's allowed by the spec, but not ideal: > In the cases where it is impossible or impractical to determine the ideographic advance measure, it must be assumed to be 1em.
2023-04-29LibWeb: Add `cap` and `rcap` Length unitsSam Atkins
As noted, the ascent of the font is not the best heuristic for this, but it is one that's listed as OK to use by the spec: > In the cases where it is impossible or impractical to determine the cap-height, the fontโ€™s ascent must be used.
2023-04-29LibWeb: Add `rex` and `rch` Length unitsSam Atkins
These are the same as `ex` and `ch`, but using the root element's metrics. We now have this information available, so let's use it. :^)
2023-04-29LibWeb: Merge StyleComputer root-element font-metric calculation methodsSam Atkins
This saves us from doing a lot of the same work multiple times, when we want both the root font size and its line height.
2023-04-29LibWeb: Wrap font metrics into a structSam Atkins
Rather than passing an increasingly-unwieldy number of font parameters individually to every function that resolves lengths, let's wrap them up. This is frustratingly close to being `Gfx::FontPixelMetrics`, but bitmap fonts cause issues: We choose the closest font to what the CSS requests, but that might have a wildly different size than what the page expects, so we have to fudge the numbers. No behaviour changes.
2023-04-29LibWeb: Categorize relative length unitsSam Atkins
2023-04-29LibWeb: Add some font-related properties to the resolved styleSam Atkins
2023-04-29LibWeb: Remove outdated commentSam Atkins
I missed this when removing calc() from Length. Oops!
2023-04-29LibWeb: Sort and group CSS Length units as they are in the specSam Atkins
They previously weren't sorted at all. Alphabetical would be nice, but then things like `em` and `rem` would be separated. So, let's copy the spec's order. That way it's easier to keep track of which units we have or haven't implemented. (Since there are so many...)
2023-04-29LibWeb: Exclude borders from width available for table columnsAliaksandr Kalenik
Fix table box width calculation to minus horizonal borders from space available for columns.
2023-04-29Spreadsheet: Add blank sheet when import dialog is cancelledAbuneri
If you launch the Spreadsheet app by clicking on a CSV (or other supported formats) the import dialog is immediately launched. If you cancel out of the import the application ends up in an empty state where there are no sheets added. When you launch the app normally it defaults to having a blank sheet, so we should have the same behaviour in this scenario to prevent users from having to manually add the new/blank sheet before being able to use the app
2023-04-29Spreadsheet: Enable the ability to undo/redo changes in cell colorhuttongrabiel
Cells can be updated with new background/foreground colors and then this action can be undone/redone.
2023-04-29Spreadsheet: Add CellUndoMetadataCommand classhuttongrabiel
Enables the ability to undo changes in metadata without undoing chages in data. Previously there was only CellUndoData which cannot undo things such as changes in cell background color.
2023-04-29Spreadsheet: Add CellChange constructor for changes in type metadatahuttongrabiel
Allows the creation of CellChanges where the change is in the type metadata instead of in data.
2023-04-29PixelPaint: Add radial gradient supportTorstennator
This patch adds radial gradients to the gradients tool.
2023-04-29LibGfx: Add support to draw radial gradients with an rotation angleTorstennator
2023-04-29ICC: Add a missing " at the end of a commentNico Weber
2023-04-29ICC: Rename XYZ and XYZNumber fields to uppercaseNico Weber
Given that XYZ and xyz are distinct things, let's use the correct case for these member variables. No behavior change.
2023-04-29ICC: Add comment with a link to WellKnownProfiles.cppNico Weber
2023-04-29ICC: Add method to convert a color to the profile connection spaceNico Weber
Only implemented for matrix profiles so far. This API won't be fast enough to color manage images, but let's get something working before getting something fast.
2023-04-29ICC: Make number_of_components_in_color_space() externalNico Weber
...and make its return type unsigned.
2023-04-29ICC: Make struct XYZ store float instead of doubleNico Weber
Should be good enough.
2023-04-29Chess: Display appropriate dialog when engine move ends the gameTim Ledbetter
A dialog is now displayed when an engine move results in a checkmate or a draw. In the case of threefold repetition or the fifty move rule, the engine will always accept a draw. A human player is asked if they would like to accept a draw.
2023-04-29LibWeb: Implement "distribute height to rows" step in TFCAliaksandr Kalenik
This commit implements following missing steps in table layout: - Calculate final table height - Resolve percentage height of cells and rows using final table height - Distribute avilable height to table rows
2023-04-29LibWeb: Fix division by zero in table columns width distributionAliaksandr Kalenik
If total max columns width (grid_max) is zero then available width should be divided equally between columns. Previously there was division by zero: `column.max_width / grid_max`.
2023-04-28SystemServer: Remove unused code for generating /dev/hwrngLiav A
This device was removed in b596af363c30de5323641fab69ad50c712f526e2, so we can't really create anything related to it, therefore this piece of code should be removed too.
2023-04-28LibWeb: Compute inset for relative positioned inline-blockEmil Militzer
2023-04-28LibWeb: Implement "get all used history steps" for traversablesAliaksandr Kalenik
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-all-used-history-steps
2023-04-28LibWeb: Implement "get the target history entry" for navigablesAliaksandr Kalenik
2023-04-28LibWeb: Implement "get session history entries" for navigablesAliaksandr Kalenik
https://html.spec.whatwg.org/multipage/browsing-the-web.html#getting-session-history-entries
2023-04-28LibWeb: Change Navigable::traversable_navigable() to be constAliaksandr Kalenik
2023-04-28LibWeb: Add non-const session_history_entries getter in traversableAliaksandr Kalenik
2023-04-28LibWeb: Add NestedHistory in DocumentStateAliaksandr Kalenik
2023-04-28LibWeb: Resolve and paint SVG gradient fillsMacDue
This bit is mostly ad-hoc for now. This simply turns fill: url(#grad1) into document().get_element_by_id('grad1') then resolves the gradient. This seems to do the trick for most use cases, but this is not attempting to follow the spec yet to keep things simple.
2023-04-28LibWeb: Implement SVGLinearGradientElement (<linearGradient>)MacDue
This represents the SVG <linearGradient>. The actual gradient is converted to a Gfx::PaintStyle for use in SVG fills... There is a little guesswork in the implementation, but it seems to match Chrome/Firefox. Note: Still not hooked up to actual painting in this commit.
2023-04-28LibGfx: Implement PaintStyle for SVG linear gradientsMacDue
2023-04-28LibWeb: Implement SVGGradientElementMacDue
This is the base class for all SVG gradient types. This supports: - The `gradientUnits` attribute - The `gradientTransform` attribute - And following `xlink:hrefs` for inheriting <stops>/attributes
2023-04-28LibWeb: Allow specifying a URL for an SVG fillMacDue
This does not do anything yet, but will allow for gradients later!