summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/CMakeLists.txt
AgeCommit message (Collapse)Author
2020-07-26LibWeb: Refactor SVG files into their own directory; follow spec layoutMatthew Olsson
2020-07-26LibWeb: Abstract common operations of graphical SVG elementsMatthew Olsson
2020-07-26LibWeb: Begin SVG element supportMatthew Olsson
This commit starts adding a basic SVG element. Currently, svg elements have support for the width and height properties, as well as the stroke, stroke-width, and fill properties. The only child element supported is the path element, as most other graphical elements are just shorthand for paths.
2020-07-21LibWeb: Implement quirks mode detectionLuke
This allows us to determine which mode to render the page in. Exposes "doctype" and "compatMode" on Document. Exposes "name", "publicId" and "systemId" on DocumentType.
2020-07-06LibWeb: Move WebContentView from Demos/WebView into LibWebAndreas Kling
2020-06-29LibWeb: Add LayoutRange::normalized()Andreas Kling
We use this to ensure that we're always working with a selection where the start() is before the end() in document order. That simplifies all the logic around this.
2020-06-27LibWeb: Make DOM timers cancellable and stop leaking themAndreas Kling
This patch adds a Web::Timer object that represents a single timer registration made with window.setTimeout() or window.setInterval(). All live timers are owned by the DOM Window object. The timers can be stopped via clearTimeout() or clearInterval(). Note that those API's are actually interchangeable, but we have to support both.
2020-06-26LibWeb+Browser: Remove old HTML parser :^)Andreas Kling
The new parser is now used everywhere and it's working pretty well!
2020-06-22LibWeb+Browser: Decode non-animated images out-of-process :^)Andreas Kling
We now use the ImageDecoder service in LibWeb for everything except GIF images (we'll have to deal with them later, ofc.) This has a little bit of overhead but we should be able to optimize it until it becomes negligible.
2020-06-22LibWeb: Generate CanvasRenderingContext2D bindings from IDL :^)Andreas Kling
We're still missing optional argument support, so this implementation doesn't support fill(), only fill(fill_rule). Still it's really nice to get rid of so much hand-written wrapper code.
2020-06-21LibWeb: Generate Event and MouseEvent bindings from IDL :^)Andreas Kling
We still have to hand-write a function to turn an Event& into a wrapper but this is still a hue improvement. Eventually we'll find a way to auto-generate that function as well.
2020-06-21LibWeb: Generate ImageData bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Generate HTMLCanvasElement bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Generate HTMLImageElement bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Add HTMLElement wrapperAndreas Kling
Expose the "title" attribute just to expose something. :^)
2020-06-21LibWeb: Generate EventTarget bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Generate Element bindings from IDL :^)Andreas Kling
Had to do a bunch more hacking on WrapperGenerator to support this. We now support attribute setters as well.
2020-06-21LibWeb: Start generating JS wrappers from (simplified) WebIDL :^)Andreas Kling
This patch introduces a hackish but functional IDL parser and uses it to generate the JS bindings for Node and Document. We'll see how far this simple parser takes us. The important thing right now is generating code, not being a perfect IDL parser. :^)
2020-06-18LibWeb: Move StackingContext from Layout/ to Painting/Andreas Kling
The stacking context tree doesn't affect layout at all, so let's move it into the Painting/ directory. I'm not sure yet if it's worth going for a fullly separate painting tree. So far I'm thinking a stacking context tree with pointers into the layout tree might be enough.
2020-06-15LibWeb: Respect CSS z-index property while paintingAndreas Kling
To support z-ordering when painting, the layout tree now has a parallel sparse tree of stacking contexts. The rules for which layout boxes establish a stacking context are a bit complex, but the intent is to encapsulate the decision making into establishes_stacking_context(). When we paint, we start from the ICB (LayoutDocument) who always has a StackingContext and then paint the tree of StackingContexts where each node has its children sorted by z-index. This is pretty crude, but gets the basic job done. Note that this does not yet support hit testing; hit testing is still done using a naive treewalk from the root.
2020-06-13LibWeb: Add basic <object> element supportAndreas Kling
This patch implements a simple <object> element with fallback content. If the URL from the data attribute fails to load (including 404), we render the DOM tree inside the <object> as fallback content. This works by generating a different layout tree for the <object> depending on the state and success of the data load. Since we cannot currently do incremental layout tree updates, we have to force a complete layout tree rebuild when the resource load finishes/fails.
2020-06-12LibWeb+Browser: Add a barebones LayoutTreeModel to the inspector windowAndreas Kling
This allows you to inspect the layout tree, along side the DOM tree. It will need more functionality to be truly useful, but it's a start.
2020-06-09LibWeb: Add LayoutTableRowGroup to implement display: table-row-groupAndreas Kling
2020-06-08LibWeb: Add Page abstraction between PageView and main FrameAndreas Kling
* A PageView is a view onto a Page object. * A Page always has a main Frame (root of Frame tree.) * Page has a PageClient. PageView is a PageClient. The goal here is to allow building another kind of view onto a Page while keeping the rest of LibWeb intact.
2020-06-07LibWeb: Add HTML::TagNames namespace for global tag name FlyStringsAndreas Kling
Instead of "iframe", we can now say HTML::TagNames::iframe and avoid a FlyString lookup.
2020-06-07LibWeb: Add (stub) HTMLTable{,Cell,Row}Element C++ classesAndreas Kling
We'll need a place to implement the various presentational attributes for table parts, and more stuff.
2020-06-07LibWeb: Start fleshing out support for relative CSS unitsAndreas Kling
This patch introduces support for more than just "absolute px" units in our Length class. It now also supports "em" and "rem", which are units relative to the font-size of the current layout node and the <html> element's layout node respectively.
2020-06-07LibWeb: Move Frame.{cpp,h} into a new Frame/ directoryAndreas Kling
2020-06-06LibWeb: Add a FrameLoader class and move PageView's loading logic thereAndreas Kling
Each Frame now has a FrameLoader which will be responsible for handling loading inside that frame.
2020-06-05LibWeb: Start adding support for the <iframe> element! :^)Andreas Kling
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-04LibWeb: Process style sheets in document orderAndreas Kling
Until now we would simply apply stylesheets in the order they finished loading. This patch adds a StyleSheetList object that hangs off of each Document and contains all the style sheets in document order. There's still a lot of work to do for a proper cascade, but at least this makes us consistently wrong every time. :^)
2020-06-02LibWeb: Share decoded images at the Resource level :^)Andreas Kling
This patch adds ImageResource as a subclass of Resource. This new class also keeps a Gfx::ImageDecoder so that we can share decoded bitmaps between all clients of an image resource inside LibWeb. With this, we now share both encoded and decoded data for images. :^) I had to change how the purgeable-volatile flag is updated to keep the volatile-images-outside-the-visible-viewport optimization working. HTMLImageElement now inherits from ImageResourceClient (a subclass of ResourceClient with additional image-specific stuff) and informs its ImageResource about whether it's inside the viewport or outside. This is pretty awesome! :^)
2020-06-01LibWeb: Start building a new Resource class to share more resourcesAndreas Kling
A Resource represents a resource that we're loading, have loaded or will soon load. Basically, it's a downloadable resource that can be shared by multiple clients. A typical usecase is multiple <img> elements with the same src. In a future patch, we will try to make sure that those <img> elements get the same Resource if possible. This will reduce network usage, memory usage, and CPU usage. :^) For now, this first patch simply introduces the mechanism. You get a Resource by calling ResourceLoader::load_resource(). To get notified about changes to a Resource's load status, you inherit from ResourceClient and implement the callbacks you're interested in. This patch turns HTMLImageElement into a ResourceClient.
2020-06-01LibWeb: Move ResourceLoader into a new Loader/ directoryAndreas Kling
2020-05-28LibWeb: Rename Web::HtmlView => Web::PageViewAndreas Kling
This widget doesn't just view HTML, it views a web page. :^)
2020-05-28LibWeb: Support named character references (e.g "&amp;")Andreas Kling
2020-05-27LibWeb: Implement the first half of the Adoption Agency AlgorithmAndreas Kling
The AAA is a somewhat daunting algorithm you have to run for certain tag when inserted inside the <body> element. The purpose of it is to resolve issues with mismatched tags. This patch implements the first half of the AAA. We also move the "list of active formatting elements" to its own class, since it kept accumulating little behaviors. "Marker" entries are now signified by null Element pointers in the list.
2020-05-26LibWeb: Add cached global attribute name FlyStringsAndreas Kling
Instead of creating extremely common FlyStrings like "id" and "class" on demand every time they are needed, we now have AttributeNames.h, which provides Web::HTML::AttributeNames::{id,class_} This avoids a bunch of string allocations during selector matching.
2020-05-24LibWeb: Factor out the "stack of open elements" into its own classAndreas Kling
This will allow us to write more expressive parsing code. :^)
2020-05-24LibWeb: Start building the tree building part of the new HTML parserAndreas Kling
This patch adds a new HTMLDocumentParser class. It keeps a tokenizer object internally and feeds itself with one token at a time from it. The names and idioms in this class are expressed as closely to the actual HTML parsing spec as possible, to make development as easy and bug free as possible. :^) This is going to become pretty large, but it's pretty cool!
2020-05-22LibWeb: Begin work on a spec-compliant HTML parserAndreas Kling
In order to actually view the web as it is, we're gonna need a proper HTML parser. So let's build one! This patch introduces the Web::HTMLTokenizer class, which currently operates on a StringView input stream where it fetches (ASCII only atm) codepoints and tokenizes acccording to the HTML spec tokenization algo. The tokenizer state machine looks a bit weird but is written in a way that tries to mimic the spec as closely as possible, in order to make development easier and bugs less likely. This initial version is far from finished, but it can parse a trivial document with a DOCTYPE and open/close tags. :^)
2020-05-18LibWeb: Add a simple window.location object with some getters :^)Andreas Kling
2020-05-17LibGemini: Implement rendering text/gemini documents to HTMLAnotherTest
This also sets Content-Type to whatever 'meta' contains on success, to allow the browser to pick up what the document contains.
2020-05-14Build: Switch to CMake :^)Sergey Bugaev
Closes https://github.com/SerenityOS/serenity/issues/2080