Linus Groh
c1dfb2d883
LibWeb: Expect IDL namespace to end with semicolon
...
From the Web IDL spec: https://heycam.github.io/webidl/#prod-Namespace
Namespace ::
namespace identifier { NamespaceMembers } ;
2020-12-10 11:02:46 +01:00
Andreas Kling
5aeab9878e
LibWeb: Rename LayoutNode classes and move them into Layout namespace
...
Bring the names of various boxes closer to spec language. This should
hopefully make things easier to understand and hack on. :^)
Some notable changes:
- LayoutNode -> Layout::Node
- LayoutBox -> Layout::Box
- LayoutBlock -> Layout::BlockBox
- LayoutReplaced -> Layout::ReplacedBox
- LayoutDocument -> Layout::InitialContainingBlockBox
- LayoutText -> Layout::TextNode
- LayoutInline -> Layout::InlineNode
Note that this is not strictly a "box tree" as we also hang inline/text
nodes in the same tree, and they don't generate boxes. (Instead, they
contribute line box fragments to their containing block!)
2020-11-22 15:56:27 +01:00
Luke
4e8cb4558b
LibWeb: Add initial implementation of foreign content parsing
...
Plus sneak in a FIXME for the list of active formatting elements
and a test for Element.namespaceURI
2020-10-22 15:24:42 +02:00
Luke
e8a9e8aed5
LibWeb: Add namespace to Element
2020-10-22 15:24:42 +02:00
Luke
efaf03e986
LibWeb: Use modern namespaces and fix clang-format comments in tag names
2020-10-22 15:24:42 +02:00
Matthew Olsson
455ce0b9c3
LibWeb: Create LayoutNodes for each SVG element
...
This brings the SVG API closer to the rest of LibWeb
2020-10-10 23:28:41 +02:00
Matthew Olsson
f2055bb509
LibWeb: Add a basic SVGContext object, add to PaintContext
...
This will be used to transmit any svg-relevant data between svg nodes.
This is prep for moving a lot of the SVG logic into Layout nodes.
2020-10-10 23:28:41 +02:00
Luke
9dee140a9f
LibWeb: Add empty IDL bindings for current SVG elements
...
Nothing in them right now as the classes don't contain the IDL
methods.
2020-10-03 00:30:49 +02:00
Ben Wiederhake
08f9bc26a6
Meta+LibHTTP through LibWeb: Make clang-format-10 clean
2020-09-25 21:18:17 +02:00
Simon Danner
9648bf4ada
LibWeb: SVG: implement SmoothQuadraticBezierCurve
...
For this we need to track the control point of the previous command and
calculate a new control point based on it.
2020-09-08 13:57:18 +02:00
Simon Danner
772fcba814
LibWeb: SVG: draw commands can also be repeated after a comma
...
Consume comma or whitespace to make it possible to also parse commands
that use comma separation.
2020-09-08 13:57:18 +02:00
Simon Danner
6e61532e06
LibWeb: SVG: T commands only take two coordinates
...
The shortcut for Bezier curves only takes two coordinates.
2020-09-08 13:57:18 +02:00
Luke
65afb40fc5
LibWeb: Crash instead of spinning if parse_drawto fails to match
...
If parse_drawto fails to match anything, it will spin forever.
Instead, print out the character that failed to match and assert
false.
2020-08-20 16:31:13 +02:00
Andreas Kling
40f4ccc3ea
LibWeb: Initialize tag/attribute name globals in init-time constructors
2020-08-12 11:27:44 +02:00
Matthew Olsson
81187c4ead
LibWeb: Fix some SVG crashes/hangs
...
- parse_flag now only parses one digit instead of consuming an entirely
valid number
- match_number => match_coordinate
- match_coordinate now returns true if `ch()` is '.'
- parse_number no longer matches a +/-
- Don't crash when encountering one of the three unsupported path
commands. Instead, just skip them. No reason to crash the browser over a
silly SVG element :)
2020-08-02 19:16:40 +02:00
Matthew Olsson
335916d8db
LibGfx: Templatize Point, Size, and Rect
2020-07-27 01:06:26 +02:00
Andreas Kling
1f008c95b6
LibWeb: Move CSS classes into the Web::CSS namespace
2020-07-26 20:05:15 +02:00
Andreas Kling
11ff9d0f17
LibWeb: Move DOM classes into the Web::DOM namespace
...
LibWeb keeps growing and the Web namespace is filling up fast.
Let's put DOM stuff into Web::DOM, just like we already started doing
with SVG stuff in Web::SVG.
2020-07-26 20:05:15 +02:00
Andreas Kling
eabd43d31a
LibWeb: Make SVGElement and SVGGeometryElement constructors protected
2020-07-26 17:51:00 +02:00
Andreas Kling
1b1537c5a6
LibWeb: Simplify type traits for SVGGraphicsElement
2020-07-26 17:51:00 +02:00
Andreas Kling
71556e39a4
LibWeb: Switch to using AK::is and AK::downcast
2020-07-26 17:51:00 +02:00
Andreas Kling
a565121793
LibWeb: Move HTML object model stuff into LibWeb/HTML/
...
Take a hint from SVG and more all the HTML classes into HTML instead of
mixing them with the DOM classes.
2020-07-26 17:51:00 +02:00
Matthew Olsson
b1299f972c
LibWeb: Refactor SVG files into their own directory; follow spec layout
2020-07-26 14:53:43 +02:00