Timothy Flynn
eb0fb38cac
LibWeb: Support parsing some data: URLs in CSS
...
For now, data URLs are explicitly limited to expected MIME types. For
example, image-related styles accept image MIME types.
2021-10-29 22:06:49 +02:00
Timothy Flynn
2fadbe176e
LibWeb: Remove extraneous semi-colon
2021-10-29 22:06:49 +02:00
Idan Horowitz
040e29c7b9
LibJS: Convert ShadowRealmPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
658056233e
LibJS: Convert GeneratorObjectPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
7b5ccbc5ed
LibJS: Convert ProxyConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
92bd64cb56
LibJS: Convert the ProxyCreate AO to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
84681788c4
LibJS: Convert FinalizationRegistryPrototype funcs to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
909e13c5e6
LibJS: Convert WeakSetPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
56e14ba09f
LibJS: Convert WeakMapPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
f1e215ea3e
LibJS: Convert MapIteratorPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
dab0a92c19
LibJS: Convert MapPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
8ff152ec5c
LibJS: Convert MapConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
23ea1f1a3e
LibJS: Convert MathObject functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
b184e872e4
LibJS: Convert ReflectObject functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
4c3ea0bb91
LibJS: Convert StringIteratorPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
720bb21ee2
LibJS: Convert ArrayBufferPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
ffa58184d2
LibJS: Convert ArrayBufferConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
70cbd43718
LibJS: Convert DataViewPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
9d3348d8da
LibJS: Convert the SetViewValue AO to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
fca05f835f
LibJS: Convert the GetViewValue AO to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
7f3fa7d7e0
LibJS: Convert NumberPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
2c6955462e
LibJS: Convert NumberConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
08fb31087b
LibJS: Convert BooleanPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
2a0c51149d
LibJS: Convert FunctionPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
c0bb456fd2
LibJS: Convert the CreateDynamicFunction AO to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
47f762ab42
LibJS: Convert ErrorPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
c815519a65
LibJS: Convert WeakRefPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
719d1b48ac
LibJS: Convert ArrayIteratorPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
d1d4ee699b
LibJS: Convert ConsoleObject functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
e7a134a346
LibJS: Convert JSONObject functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
6b954b9e76
LibJS: Convert SetIteratorPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
d46d8c9016
LibJS: Convert SetPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
c2e0753d8a
LibJS: Convert SetConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
7c96ed8cf3
LibJS: Convert SymbolPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
294f244745
LibJS: Convert SymbolConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
87ff51fa67
LibJS: Convert BigIntPrototype functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Idan Horowitz
4128f95903
LibJS: Convert BigIntConstructor functions to ThrowCompletionOr
2021-10-29 21:29:24 +03:00
Ali Mohammad Pur
ac856cb965
LibRegex: Don't ignore empty alternatives in append_alternation()
...
Doing so would cause patterns like `(a|)` to not match the empty string.
2021-10-29 15:57:59 +02:00
Luke Wilde
6088011c4b
LibWeb: Add Element.webkitMatchesSelector
...
This is an alias of Element.matches for web compatibility.
https://dom.spec.whatwg.org/#dom-element-webkitmatchesselector
Used by particularly old versions of Sizzle, such as 1.10.2:
16b079b164/jquery.js (L1644)
This particular version is used by DuckDuckGo.
2021-10-28 21:43:36 +02:00
Andreas Kling
49916f494d
LibWeb: Don't try to layout list-item markers in BFC
...
Marker boxes are laid out by the corresponding ListItemBox. BFC should
just leave them alone. This fixes a jiggling issue on welcome.html :^)
2021-10-28 19:44:21 +02:00
Andreas Kling
723ea4bcd7
LibWeb: Add Layout::Box::border_box_as_relative_rect()
...
This helper returns the border box (content+padding+border) of a given
box. Margin not included.
2021-10-28 19:44:21 +02:00
Andreas Kling
37f0bd0a42
LibWeb: Small fix to height computation for block-with-inline-children
...
We now compute the used height of height:auto by measuring from the top
content edge (y=0) to the bottom of the bottommost line box within the
block container.
This fixes an issue where we'd fail to account for the topmost line box
being taller than any of its fragments (which can happen if the
line-height is greater than the height of all fragments on the line.)
2021-10-28 19:20:40 +02:00
Andreas Kling
76fa57713d
LibWeb: Use border edges when computing overflow for the ICB
2021-10-28 18:54:02 +02:00
Andreas Kling
d413d0557d
LibWeb: Remove unused CSS::Length::relative_length_to_px(Layout::Node)
2021-10-28 18:15:15 +02:00
Andreas Kling
7ec7729e1b
LibWeb: Don't force line box fragments height to be at least line-height
...
I don't remember why we did things this way, but it's clearly not right
to stretch fragments vertically. Instead, we should just align their
bottom to the appropriate line (as we already do.)
2021-10-28 18:01:04 +02:00
Andreas Kling
88c32836d8
LibWeb: Make non-absolute values for line-height fall back to font-size
...
When using bitmap fonts, the computed *font* that we're using may be
smaller than the font-size property asked for. We can still honor the
font-size value in layout calculations.
2021-10-28 17:34:37 +02:00
Andreas Kling
ec49c8fefd
LibWeb: Clip descendants of boxes with overflow:hidden
...
This is a very limited implementation of overflow:hidden, but since it's
easy to cover this common scenario, let's do it.
2021-10-28 17:09:51 +02:00
Andreas Kling
df3cd2fd56
LibWeb: Treat width:auto on tables as fit-content
...
Tables, unlike other block-level elements, should not stretch to fit
their containing block by default.
2021-10-28 16:06:08 +02:00
Sam Atkins
52a1be5eae
LibWeb: Allow whitespace when parsing "!important" in CSS
...
This accounts for cases like:
```css
.foo {
color: blue ! important ;
}
```
That's rare now that minifying is so popular, but does appear on some
websites.
I've added spec comments to `consume_a_declaration()` while I was at it.
2021-10-28 16:05:48 +02:00
Sam Atkins
6f1debaab0
LibWeb: Allow whitespace inside CSS attribute selectors
...
Noticed this while checking some MediaWiki-based sites. It's not
obvious, but the spec does allow this, by not mentioning it in this list
of places whitespace is forbidden:
https://www.w3.org/TR/selectors-4/#white-space
2021-10-28 16:05:48 +02:00