Commit Graph

7 Commits

Author SHA1 Message Date
Andreas Kling
992697d99f LibWeb: Add HTML::TagNames namespace for global tag name FlyStrings
Instead of "iframe", we can now say HTML::TagNames::iframe and avoid
a FlyString lookup.
2020-06-07 23:27:03 +02:00
Andreas Kling
10851d87a2 LibWeb: Add (stub) HTMLTable{,Cell,Row}Element C++ classes
We'll need a place to implement the various presentational attributes
for table parts, and more stuff.
2020-06-07 23:10:45 +02:00
Andreas Kling
422bbe98a5 LibWeb: Start adding support for the <iframe> element! :^)
This patch introduces a bunch of things:

- Subframes (Web::Frame::create_subframe())
- HTMLIFrameElement (loads and owns the hosted Web::Frame)
- LayoutFrame (layout and rendering of the hosted frame)

There's still a huge number of things missing, like scrolling, overflow
handling, event handling, scripting, etc. But we can make a little
iframe in a document and it actually renders another document there.
I think that's pretty cool! :^)
2020-06-05 23:36:02 +02:00
Andreas Kling
7309642ca8 LibWeb: Use FlyString for Element tag names
This makes selector matching a lot more efficient, and also reduces the
number of strings on the heap.
2020-03-22 19:12:10 +01:00
Andreas Kling
a37c29e353 LibWeb: Add <canvas> element and start fleshing out CRC2D
This patch adds HTMLCanvasElement along with a LayoutCanvas object.
The DOM and layout parts are very similar to <img> elements.

The <canvas> element holds a Gfx::Bitmap which is sized according to
the "width" and "height" attributes on the element.

Calling .getContext("2d") on a <canvas> element gives you a context
object that draws into the underlying Gfx::Bitmap of the <canvas>.
The context weakly points to the <canvas> which allows it to outlive
the canvas element if needed.

This is really quite cool. :^)
2020-03-19 19:07:56 +01:00
Andreas Kling
9c9d3f0904 LibWeb: Parse <script> elements and run any JavaScript found inside
This patch begins integrating LibJS into LibWeb. Document holds the
JS::Interpreter for now, and it is created on demand when you first
call Document::interpreter().

We also add a simple "alert()" function to the global object.
2020-03-14 13:25:38 +01:00
Andreas Kling
830a57c6b2 LibWeb: Rename directory LibHTML => LibWeb
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
2020-03-07 10:32:51 +01:00