summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb
AgeCommit message (Collapse)Author
2020-05-06LibWeb: Add hook when a link is middle clickedFalseHonesty
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: Expose the ProtocolClient inside ResourceLoader as an APIAndreas Kling
This allows others to reuse the existing connection to ProtocolServer instead of creating a separate one.
2020-05-05LibWeb: Add hook when context menu is requested by right-clicking linkAndreas Kling
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: Turn some HTML entities into nicer text in the parserAndreas Kling
2020-05-05LibWeb: Don't emit a simple selector if nothing was consumedAndreas Kling
2020-05-05LibWeb: Fall back to LayoutInline for any unrecognized CSS displayAndreas Kling
Let's at least try to keep going and see what we can render.
2020-05-05LibWeb: Make the URL encoding function a little less copy-happyAndreas Kling
2020-05-05LibWeb: Recognise :focus pseudo-classLinus Groh
It's still only a dummy as LibWeb doesn't have focused elements yet, but at least now we don't treat "selector:focus" as just "selector". This fixes an issue on google.com which was mostly grey - coming from some menu item focus styles :^)
2020-05-05LibWeb: Add basic URL encoder for individual values and param listsShadowfacts
2020-05-05LibWeb: When creating form action URL, only include value for the submitShadowfacts
that was used to submit the form
2020-05-05LibWeb: Improve <form> submit method handlingShadowfacts
The spec defines the only valid methods to be get, post, and dialog. Post and dialog are currently unhandled and do nothing, any other value (or no value specified) is defined by the spec to use the get method.
2020-05-05LibWeb: Add canvas.quadraticCurveTo()AnotherTest
Also adds a test, and removes debug spam :tm:
2020-05-04LibWeb: Respect the <input size> attribute a bit more :^)Andreas Kling
We now use the size attribute to determine the width of a text input.
2020-05-04LibWeb: Plumb the full HtmlView viewport rect down into the engineAndreas Kling
Previously we would use the "content rect" as the viewport rect, which could sometimes be smaller than the actual viewport rect as the content size was based on the box geometry of the root layout node. This fixes an issue on google.com where we would not render the main logo image since it was "outside" the viewport. The root layout size is currently very wrong on google.com but that's a separate issue. :^)
2020-05-04LibWeb: Don't assert when trying to rebuild a single-node layout treeAndreas Kling
This merely postpones dealing with partial layout tree rebuilds for a while longer.
2020-05-04LibWeb: Don't generate a layout node for <input type="hidden">Andreas Kling
2020-05-04LibWeb: Add basic support for redirectsLinus Groh
2020-05-03LibTextCodec: Start fleshing out a simple text codec libraryAndreas Kling
We're starting with a very basic decoding API and only ISO-8859-1 and UTF-8 decoding (and UTF-8 decoding is really a no-op since String is expected to be UTF-8.)
2020-05-03LibWeb: Handle iso-8859-1 web content a little bit betterAndreas Kling
We now look at the HTTP response headers for a Content-Type header and try to parse it if present to find the text encoding. If the text encoding is iso-8859-1, we turn all non-ASCII characters into question marks. This makes Swedish Google load on my machine! :^)
2020-05-03ProtocolServer: Pass HTTP response headers to the clientAndreas Kling
We now store the response headers in a download object on the protocol server side and pass it to the client when finishing up a download. Response headers are passed as an IPC::Dictionary. :^)
2020-05-02LibJS: Add "name" property to functionsLinus Groh
2020-05-02LibCore+LibHTTP: Move out the HTTP handler and add HTTPSAnotherTest
2020-04-29LibJS: Pass JS::Function around by reference moreAndreas Kling
2020-04-29LibWeb: Make EventListener::function() return a referenceAndreas Kling
2020-04-28LibJS: Implement correct attributes for (almost) all propertiesmattco98
Added the ability to include a u8 attributes parameter with all of the various put methods in the Object class. They can be omitted, in which case it defaults to "Writable | Enumerable | Configurable", just like before this commit. All of the attribute values for each property were gathered from SpiderMonkey in the Firefox console. Some properties (e.g. all of the canvas element properties) have undefined property descriptors... not quite sure what that means. Those were left as the default specified above.
2020-04-26LibWeb: Support loading data: URLs transparently via ResourceLoaderAndreas Kling
This is pretty darn cool! :^)
2020-04-26LibWeb: Run clang-format on ResourceLoader.cppAndreas Kling
2020-04-25LibWeb: Handle .gifs as images and use ImageDecoder to decode themPeter Nelson
2020-04-24LibWeb: Try fetching a favicon when loading a non-file URL in HtmlViewAndreas Kling
If valid and decodable, the favicon will be provided to clients via the on_favicon_change hook. :^)
2020-04-24Browser+LibWeb: Open link in new tab on Ctrl+Click :^)Andreas Kling
2020-04-24LibWeb: Pass link target to HtmlView's on_link_click callbackLinus Groh
2020-04-23LibWeb: Add XMLHttpRequest.readyState and constantsLinus Groh
2020-04-23LibWeb: Use proper length values for CanvasRenderingContext2D functionsEmanuele Torre
2020-04-22LibWeb: support confirm() with no argumentsNick Tiberi
2020-04-22LibWeb: Invalidate the canvas element after put_image_data()Andreas Kling
This makes sure we repaint it right away so we can see the changes.
2020-04-21LibWeb: Add ImageData objects and implement 2D context putImageData()Andreas Kling
An ImageData is a wrapper around a Bitmap wrapper around a JS::Uint8ClampedArray.
2020-04-21LibWeb: Hack requestAnimationFrame() to provide a (very fake) timestampAndreas Kling
2020-04-19LibJS: Add MarkedValueList and use it for argument passingAndreas Kling
A MarkedValueList is basically a Vector<JS::Value> that registers with the Heap and makes sure that the stored values don't get GC'd. Before this change, we were unsafely keeping Vector<JS::Value> in some places, which is out-of-reach for the live reference finding logic since Vector puts its elements on the heap by default. We now pass all the JavaScript tests even when running with "js -g", which does a GC on every heap allocation.
2020-04-18LibWeb: Parse <br/> into a self-closed br elementAndreas Kling
We were parsing "<br/>" as an open tag with the name "br/". This fixes that specific scenario. We also rename is_self_closing_tag() to is_void_element() to better fit the specs.
2020-04-18LibJS: Move builtin prototypes to the global objectAndreas Kling
This moves us towards being able to run JavaScript in different global objects without allocating a separate GC heap.
2020-04-18LibJS+LibWeb: Pass prototype to Object constructorAndreas Kling
Everyone who constructs an Object must now pass a prototype object when applicable. There's still a fair amount of code that passes something fetched from the Interpreter, but this brings us closer to being able to detach prototypes from Interpreter eventually.
2020-04-18LibJS: Make Array constructor take its prototypeAndreas Kling
Let's start moving towards native JS objects taking their prototype as a constructor argument. This will eventually allow us to move prototypes off of Interpreter and into GlobalObject.
2020-04-17LibWeb: Implement JS confirm()Nick Tiberi
2020-04-16LibWeb: Implement CanvasRenderingContext2D::stroke_rect() with linesAndreas Kling
Stroking rects by drawing individual lines gives us line width support without having to extend the Painter::draw_rect() code. :^)
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-16LibWeb: Scroll back to the top when a new page is loadedJack Byrne
2020-04-16LibWeb: Support alert() with no argumentsLinus Groh
No idea why someone would use that though.
2020-04-15LibWeb: Use Checked<T> when creating <canvas> bitmap buffersAndreas Kling