summaryrefslogtreecommitdiff
path: root/Base/home/anon/www
AgeCommit message (Collapse)Author
2020-06-17Base: Move all the HTML test content into /res/html/miscAndreas Kling
2020-06-13Base: Add some interlaced PNGs to the local copies of the pngsuite testsPaul Roukema
2020-06-12LibWeb: Handle negative values when collapsing vertical marginsAndreas Kling
In the presence of negative margins, we subtract the largest negative margin from max(0, largest positive margin).
2020-06-12LibWeb: Implement very basic margin collapsingAndreas Kling
We now collapse a block's top margin with the previous sibling's bottom margin so that the larger margin wins.
2020-06-12LibWeb: Some improvements to absolute positioningAndreas Kling
Absolutely positioned blocks now register themselves with their containing block (and note that the containing block of an absolutely positioned box is the nearest non-statically positioned block ancestor or the ICB as fallback.) Containing blocks then drive the layout of their tracked absolutely positioned descendants as a separate layout pass. This is very far from perfect but the general direction seems good.
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-02Base: Fix bad URL in welcome pageAndreas Kling
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-05-26LibWeb: Implement vendor specific CSS color style for System PaletteFalseHonesty
Add "-libweb-palette-foo-bar" CSS color properties to allow CSS to style itself using the currently selected System Theme.
2020-05-26LibWeb: Add document.querySelector()Linus Groh
2020-05-24LibWeb: Implement enough HTML parsing to handle a small simple DOM :^)Andreas Kling
We can now parse a little DOM like this: <!DOCTYPE html> <html> <head></head> <body> <div></div> </body> </html> This is pretty slow work, but the incremental progress is satisfying!
2020-05-23LibWeb: Make hit-testing work with display: inline-block;Andreas Kling
When hit testing encountered a block with inline children, we assumed that the inline children are nothing but text boxes. An inline-block box is actually a block child of a block with inline children, so we have to handle that scenario as well. :^) Fixes #2353.
2020-05-23LibWeb: Teach HTMLTokenizer how to tokenize attributesAndreas Kling
Properly tokenize single-quoted, double-quoted and unquoted attributes!
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-21Base: Add simple setInterval() testLinus Groh
2020-05-21Base: Add HTML character escape test documentHüseyin ASLITÜRK
Test page for Turkish and Swedish custom characters.
2020-05-18LibWeb: Allow reloading the current page with location.reload()Andreas Kling
2020-05-18LibWeb: Add location.protocol and location.hostAndreas Kling
2020-05-18LibWeb: Allow navigating to a new URL by setting window.location.hrefAndreas Kling
2020-05-18LibWeb: Add a simple window.location object with some getters :^)Andreas Kling
2020-05-14LibWeb: Support the :root pseudo classLinus Groh
2020-05-11LibWeb: Add basic support for CSS percentagesAndreas Kling
Many properties can now have percentage values that get resolved in layout. The reference value (what is this a percentage *of*?) differs per property, so I've added a helper where you provide a reference value as an added parameter to the existing length_or_fallback().
2020-05-10LibWeb: Add basic support for "border-style: {dotted,dashed}"Linus Groh
2020-05-06LibWeb: Add canvas.fillAnotherTest
This implements only one of the two forms of this function, ctx.fill(winding_rule). Also tweaks the quadratic curve demo to have a nice looking filled shape.
2020-05-05LibWeb: Add support for "display: inline-block"Andreas Kling
This display type is implemented using a LayoutBlock that is_inline(). Basically it behaves like a block internally, and its children are laid out in the normal block layout fashion. Externally however, it behaves like an atomic inline-level box. Layout of inline-block boxes happens in three stages: 1. The outer dimensions of the block are computed during the recursive normal layout pass. We skip positioning, but lay out children. 2. Later on, during line layout in the *containing block*, the inline block now contributes a linebox fragment. When linebox fragments are positioned, we learn the final position of the inline block. That's when we set the inline block's position. 3. We re-layout the inline block's children once again. This is done to make sure they end up in the right position. The layout tree doesn't use relative offsets, so after we position the inline block in (2), its children will not have its positions updated. Relayout moves all children of inline blocks to the right place. This is a rather naive approach but it does get the basic behavior into place so we can iterate on it. :^)
2020-05-05LibWeb: Add canvas.quadraticCurveTo()AnotherTest
Also adds a test, and removes debug spam :tm:
2020-05-02LibGfx: Decode paletted and grayscale images with 1/2/4 bit depthLepkoQQ
When dealing with png data that has less than 8 bits per pixel, round up to the next byte when allocating per row buffers and streamers. This fixes decoding odd sized PNGs with less than 8 bits per pixel. Also added a test page with some odd sized palleted PNGs.
2020-04-26LibWeb: Support loading data: URLs transparently via ResourceLoaderAndreas Kling
This is pretty darn cool! :^)
2020-04-26Base: Add test page for decoding different basic png formats.LepkoQQ
2020-04-23Base: Close head tag in canvas-path.html and give the document a titleEmanuele Torre
2020-04-16LibWeb: Add some basic path drawing functionality to the canvas elementAndreas Kling
This patch adds the following methods to CanvasRenderingContext2D: - beginPath() - moveTo(x, y) - lineTo(x, y) - closePath() - stroke() We also add the lineWidth property. :^)
2020-04-14Base: Add a little test web page for canvas drawImage() :^)Andreas Kling
2020-04-08LibWeb: Add canvas.strokeRect(), and fix scale & translateBrian Gianforcaro
Add an implementation of CanvasRenderingContext2DWrapper.strokeRect(). While implementing this I fixed fillRect() and the new strokeRect() to honor the .scale() and .translate() values that had previously been plumbed. Also enhance the canvas.html demo to utilize strokeRect(), scale(), and translate().
2020-04-06Base: Add trigonometry demo webpageLinus Groh
2020-04-03LibWeb: Implement <script src> support for synchronous scriptsAndreas Kling
Scripts loaded in this way will block the parser until they finish executing. This means that they see the DOM before the whole document has been fully parsed. This is all normal, of course. To make this work, I changed the way we notify DOM nodes about tree insertion. The inserted_into() callbacks are now incrementally invoked during parse, as each node is appended to its parent. To accomodate inline scripts and inline style sheets, we now also have a children_changed() callback which is invoked on any parent when it has children added/removed.
2020-04-03LibWeb: Add "navigator" object and expose navigator.userAgentAndreas Kling
A lot of web content looks for this property. We'll probably have to tweak this as we go, but at least now we have it. :^)
2020-03-31Base: Tweak the canvas demo page to stop using fractional RGB valuesAndreas Kling
This is a hack to workaround missing support for fractional values in "rgb(r,g,b)" color parsing.
2020-03-30LibWeb: Support more advanced selectors in document.querySelectorAll()Andreas Kling
I made some mistakes in the selector parsing code. It's now able to parse selectors composed of multiple complex selectors, instead of just one complex selector.
2020-03-30LibWeb: Add naive support for document.querySelectorAll()Andreas Kling
This currently returns a JS::Array of elements matching a selector. The more correct behavior would be to return a static NodeList, but as we don't have NodeLists right now, that'll be a task for the future.
2020-03-26Base: Replace <!DOCTYPE> with <!DOCTYPE html> in a few files (#1511)Elisée Maurer
<!DOCTYPE> by itself is not a valid document type declaration.
2020-03-25LibWeb: Implement getting and setting element.innerHTMLAndreas Kling
Getting the innerHTML property will recurse through the subtree inside the element and serialize it into a string as it goes. Setting it will parse the set value as an HTML fragment. It will then remove all current children of the element and replace them with all the children inside the parsed fragment. Setting element.innerHTML will currently force a complete rebuild of the document's layout tree. This is pretty neat! :^)
2020-03-23 LibWeb: CSS: Add "position: absolute" with top and leftmyphs
This momentarily handles the CSS property "position: absolute;" in combination with the properties "top" and "left", so that elements can be placed anywhere on the page independently from their parents. Statically positioned elements ignore absolute positioned elements when calculating their position as they don't take up space.
2020-03-22LibWeb: Add basic support for requestAnimationFrame()Andreas Kling
We now support rAF, driven by GUI::DisplayLink callbacks. It's a bit strange how we keep registering new callbacks over and over. That's something we can definitely optimize. This allows you to update animations/whatever without doing it more often than the browser can display.
2020-03-21Base: Add a demo web page for canvas+setInterval+randomnessAndreas Kling
Click somewhere in the black area and drag for colorful effect! :^)
2020-03-21Base: Tidy up the events.html test page a little bitAndreas Kling
2020-03-20LibWeb: Add CSS property 'border'myphs
This makes it possible to write shorter CSS. Instead of writing .foo { border-width: 3px; border-style: solid; border-color: blue; } it is now possible to write .foo { border: 3px solid blue; } while the order of values is irrelevant. Currently only the basic values are supported. More values should be added in the future. Three more value specific parse functions were added: parse_line_width, parse_color, and parse_line_style Additionally a few test cases were added to borders.html.
2020-03-19LibWeb: Add <canvas> element and start fleshing out CRC2DAndreas Kling
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-19LibJS: Prefer FunctionDeclaration if a statement begins with "function"Andreas Kling
2020-03-18LibWeb: Fire "mousedown" and "mousemove" events in the DOM :^)Andreas Kling
2020-03-18LibWeb: Start working on DOM event supportAndreas Kling
This patch adds the EventTarget class and makes Node inherit from it. You can register event listeners on an EventTarget, and when you call dispatch_event() on it, the event listeners will get invoked. An event listener is basically a wrapper around a JS::Function*. This is pretty far from how DOM events should eventually work, but it's a place to start and we'll build more on top of this. :^)