Andreas Kling
33e3f0c71f
LibWeb: Expose barebones CSSStyleDeclaration to JavaScript
...
You can now access an element's inline style via Element.style.
The interface is not very capable yet though. :^)
2021-03-13 22:41:32 +01:00
Andreas Kling
16cde3f14a
LibWeb: Rename CSSParser => DeprecatedCSSParser
2021-03-09 17:35:57 +01:00
Andreas Kling
5d180d1f99
Everywhere: Rename ASSERT => VERIFY
...
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
2021-02-23 20:56:54 +01:00
Linus Groh
e064194061
LibWeb: Return InvalidCharacterError from Element::set_attribute() for empty attr
...
This is the first user of the new DOMException, using ExceptionOr. :^)
2021-02-20 00:09:11 +01:00
Andreas Kling
d597626ea1
LibWeb: Add a way to give DOM::Element a ShadowRoot
...
You can now attach a shadow root to your favorite Element. It doesn't
do anything yet, but you can.
2021-02-10 19:06:20 +01:00
Andreas Kling
5e91e61900
LibWeb: Remove WidgetBox layout node
...
The approach of attaching sub-widgets to the web view widget was only
ever going to work in single-process mode, and that's not what we're
about anymore, so let's just get rid of WidgetBox so we don't have the
dead-end architecture hanging over us.
The next step here is to re-implement <input type=text> using LibWeb
primitives.
2021-02-10 09:13:30 +01:00
Andreas Kling
9de1253f44
LibWeb: Remove a whole bunch of unnecessary #includes
2021-02-10 09:13:29 +01:00
Linus Groh
79bab28f5e
LibWeb: Implement Element.getElementsBy{Tag,Class}Name()
...
Just like the Document variants, but using the given Element as
for_each_in_subtree_of_type() root.
2021-02-08 17:59:04 +01:00
Linus Groh
2a38f008bf
LibWeb: Make getElementsByClassName() case-insensitive in quirks mode
...
From https://dom.spec.whatwg.org/#concept-getelementsbyclassname :
The comparisons for the classes must be done in an ASCII case-
insensitive manner if root’s node document’s mode is "quirks", and
in an identical to manner otherwise.
2021-02-08 17:59:04 +01:00
Andreas Kling
0eac44af49
LibWeb: Don't assert on <colgroup> & friends
...
Let's just construct a placeholder BlockBox layout node for now.
Fixes #5081 .
2021-02-07 11:47:33 +01:00
Andreas Kling
796c31a52b
LibWeb: Reorganize Element::create_layout_node() into a switch
...
This allows us to see which CSS::Display types are not yet handled.
2021-02-07 11:40:42 +01:00
Andreas Kling
e6712fcd82
LibWeb: Use any_of() for DOM::Element::has_class()
2021-02-07 11:35:26 +01:00
Andreas Kling
330c3fcb59
LibWeb: Use move semantics for QualifiedName more often
2021-02-07 11:20:15 +01:00
Andreas Kling
140463e833
LibWeb: Parse "display: flex" and create BlockBox layout nodes for them
...
I'm not 100% sure that BlockBox is the right layout node for flex
containers, but it's the most obviously fitting one we already have.
2021-01-18 20:20:00 +01:00
Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00