summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2023-05-26LibWeb: Fix width calculation for floating replaced elementsAndi Gallo
The path for floating, replaced elements must not fall through to the path taken for floating, non-replaced elements. The former works like inline replaced elements, while the latter uses a completely different algorithm which doesn't account for intrinsic ratio. Falling through overrides the correct value computed by the former. Fixes #19061.
2023-05-26LibWeb: Reset margin collapsing state only if box indeed add clearanceAliaksandr Kalenik
This fixes the issue when margin collapsing state was always reset if a box has clear property not equal to none even if it does not actually introduce clearance.
2023-05-26LibWeb: Avoid nullptr dereference when parsing grid sizesSam Atkins
2023-05-26LibJS/Bytecode: Make for..in iterate property names as stringAndreas Kling
Makes 107 new tests pass in test262. :^)
2023-05-26LibWeb: Consume sign in `SVG::parse_elliptical_arg_argument`Cameron Youell
This was crashing on google.com with the linux chrome user agent, interestingly it seems like this behavior may have been accidental as only two of the three `parse_number()` were changed in f7dbcb6
2023-05-26LibWeb: Get reference height from closest non-anonymous ancestorAndi Gallo
Ignore anonymous block boxes when resolving percentage weights that would refer to them, per the CSS 2 visual formatting model specification. This fixes the case when we create an anonymous block between an image which uses a percentage height relative to a parent which specifies a definite height. Fixes #19052.
2023-05-26LibJS: Disallow creating ArrayBuffers larger than 2^53 - 1Timothy Flynn
This is a normative change in the ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/25f9744
2023-05-26LibJS: Update spec numbers for the Well-Formed Unicode Strings proposalTimothy Flynn
This proposal has been merged into the main ECMA-262 spec. See: https://github.com/tc39/ecma262/commit/d95f42d
2023-05-26LibWeb: Return DOMException instead of crashing when setting attributesPrestonLTaylor
2023-05-26LibGfx: Fix glyph render to create implied points in start/end of pathAliaksandr Kalenik
Implied point = point created by two subsequent "off curve" points. Fixes following issues in function that builds glyph path from points: - If first point is "off curve" it was wrongly treated as "on curve" which caused wrong first point position in the path. - If both first and last points in the path are "off curve" implied point was not created between them which caused wrong path shape in the end of the path.
2023-05-25Browser: Download Widget file and directory text changessec05
fixes #18678 This is because the "From:" URL regularly overflows the line, leading to an unreadable mess. Make sure that the labels for the widget don't wrap as well, as the widget is fixed height and width.
2023-05-25LibWeb: Do the CORS cross-origin workaround to find MIME type for imagesAndreas Kling
This makes cross-origin image loads actually see the MIME type the server tells us. :^)
2023-05-25LibWeb: Make Fetch::Infrastructure::HeaderList::is_empty() publicAndreas Kling
2023-05-25LibWeb: Don't crash on unimplemented CSS display typeAndreas Kling
If some page throws "display: ruby-text" or some such at us, let's just complain and carry on.
2023-05-25LibWeb: Try failed font lookups again without weight and slopeAndreas Kling
If CSS requests a font that we have loaded, but we didn't associate it with a specific weight and/or slope, let's still use it if it matches the family name. This is a hack until we implement proper CSS font selection.
2023-05-25LibWeb: Add CustomIdentStyleValue, along with parsing for itSam Atkins
This corresponds to the `<custom-ident>` type in CSS grammar.
2023-05-25LibSQL: Free heap storage when deleting rowsJelle Raaijmakers
2023-05-25LibSQL: Implement freeing heap storageJelle Raaijmakers
This allows us to free entire chains of blocks in one go.
2023-05-25LibSQL: Find free blocks when opening a database fileJelle Raaijmakers
The free block list now gets populated on opening a database file. Ideally we persist this list inside the heap itself, but for now this prevents excessive heap growth.
2023-05-25LibSQL: Keep track of free heap blocks when trimming storageJelle Raaijmakers
When overwriting existing heap storage that requires fewer blocks, make sure to free all remaining blocks so they can be reused in the future.
2023-05-25LibSQL: Reuse heap blocks when overwriting storageJelle Raaijmakers
Previously, only the first block in a chain of blocks would be overwritten while all subsequent blocks would be appended to the heap. Now we make sure to reuse all existing blocks in the chain.
2023-05-25LibWeb: Handle invalid UTF-8 in Fetch's Body#text()0GreenClover0
2023-05-25LibWeb: Make input element placeholders look betterAndreas Kling
We now create a flex container inside the input element's UA shadow tree and add the placeholder and non-placeholder text as flex items (wrapped in elements whose style we can manipulate). This fixes the visual glitch where the placeholder would appear below the bounding box of the input element. It also allows us to align the text vertically inside the input element (like we're supposed to). In order to achieve this, I had to make two small architectural changes to layout tree building: - Elements can now report that they represent a given pseudo element. This allows us to instantiate the ::placeholder pseudo element as an actual DOM element inside the input element's UA shadow tree. - We no longer create a separate layout node for the shadow root itself. Instead, children of the shadow root are treated as if they were children of the DOM element itself for the purpose of layout tree building.
2023-05-25LibWeb: Make HTMLDivElement not "final"Andreas Kling
This is to prepare for making some custom internal divs inside the input element UA shadow tree.
2023-05-25LibWeb: Remove now-unused `parse_css_value(ComponentValue)` methodSam Atkins
:^)
2023-05-25LibWeb: Use new StyleValue parsing for transform-originSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for text-decorationSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for text-decoration-lineSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for overflowSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for list-styleSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for contentSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for font and font-familySam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for flex-flowSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for border and its sided versionsSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for flexSam Atkins
To make this work, we also add `none` as a valid identifier for `flex`. (This is correct, we just didn't need it before.)
2023-05-25LibWeb: Use new StyleValue parsing for background-sizeSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for background-repeatSam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for background-position[-x,-y]Sam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for `background`Sam Atkins
2023-05-25LibWeb: Use new StyleValue parsing for "simple" propertiesSam Atkins
That is, properties that don't have a bespoke parsing function.
2023-05-25LibWeb: Implement smarter CSS StyleValue parsingSam Atkins
We know what types and identifiers a property can accept, so we can use that information to only parse things that can be accepted. This solves some awkward ambiguity problems that we have now or will face in the future, including: - Is `0` a number or a length with no unit? - Is `3.5` a number or a ratio? - Is `bottom` an identifier, or a custom-ident? Two CSS Parser methods are introduced here: `parse_css_value_for_property()` attempts to parse a StyleValue that the property can accept, skipping any types that it doesn't want. `parse_css_value_for_properties()` does the same, but takes multiple PropertyIDs and additionally returns which one the parsed StyleValue is for. This is intended for parsing shorthands, so you can give it a list of longhands you haven't yet parsed. Subsequent commits will actually use these new methods.
2023-05-25LibWeb: Cache initial property values when parsing `background`Sam Atkins
Previously we were looking these up once per background layer. Let's not do that. :^)
2023-05-25LibWeb: Teach the CSS parser about extra color keywordsSam Atkins
All of these identifiers can be treated as a color, so let's make sure the parser understands that.
2023-05-25LibWeb: Make `property_id_from_string()` return OptionalSam Atkins
2023-05-25LibWeb: Make `value_id_from_string()` return OptionalSam Atkins
2023-05-25LibWeb: Fill in some missing property data and bodge extra typesSam Atkins
We don't yet have generic parsing support for `<filter-value-list>` or `<paint>`, so listing them here confuses the new StyleValue parsing code I'm working on. For now, let's skip `<filter-value-list>` since it's only used in one pkace which manually parses it, and list the parts of `<paint>` instead which are taken from here: https://www.w3.org/TR/SVG2/painting.html#SpecifyingPaint
2023-05-25LibWeb: Remove "Invalid" StyleValue typeSam Atkins
We never actually use this, we always initialize StyleValues with a proper type.
2023-05-24Everywhere: Use MonotonicTime instead of Durationkleines Filmröllchen
This is easily identifiable by anyone who uses Duration::now_monotonic, and any downstream users of that data.
2023-05-24Userland: Remove remaining users of Duration::now_realtime()kleines Filmröllchen
This is a clear sign that they want to use a UnixDateTime instead. This also adds support for placing durations and date times into SQL databases via their millisecond offset to UTC.
2023-05-24LibTimeZone+Userland: Change timezone functions to use UnixDateTimekleines Filmröllchen
This incurs a whole host of changes in, among others, JavaScript Intl and Date.