summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-05-28LibWeb: Add default UA style for some table-related elementsAndreas Kling
2020-05-28LibWeb: Plumb content encoding into the new HTML parserAndreas Kling
We still don't handle non-ASCII input correctly, but at least now we'll convert e.g ISO-8859-1 to UTF-8 before starting to tokenize. This patch also makes "view source" work with the new parser. :^)
2020-05-28LibWeb: Parse "input" tags during the "in body" insertion modeAndreas Kling
2020-05-28LibWeb: Parse "td" start tags during "in cell" insertion modeAndreas Kling
2020-05-28LibGUI: Don't show big Buggie in app about dialogsAndreas Kling
It was getting to crowded between two Buggies and the app icon.
2020-05-28LibWeb: Support named character references (e.g "&")Andreas Kling
2020-05-28LibC: Add a O_CLOEXEC mode element to fopen()AnotherTest
This commit also changes the mode parsing to allow specifying the modes in any order.
2020-05-28LibWeb: Implement more table support in the new HTML parserAndreas Kling
This is enough to parse the Google front page! (Note: I did have to hack the tokenizer while parsing Google, in order to avoid named character references screwing everything up. We'll fix that too soon enough!)
2020-05-28LibWeb: Flesh out "reset the insertion mode appropriately" algorithmAndreas Kling
2020-05-28LibWeb: Handle various self-closing tags during "in body" insertionAndreas Kling
We can now parse self-closing "<img>" tags correctly! :^)
2020-05-28LibWeb: Handle inline stylesheets a bit better in the new parserAndreas Kling
While we're still supporting both the old and the new parser, we have to deal with the way they load inline stylesheet (and scripts) a bit differently. The old parser loads all the text content up front, and then notifies the containing element. The new parser creates the containing element up front and appends text inside it afterwards. For now, we simply do an empty "children_changed" notification when first inserting a text node inside an element. This at least prevents the CSS parser from choking on a single-character stylesheet.
2020-05-28LibWeb: Parse documents without DOCTYPE gracefullyAndreas Kling
Seems like SOMEONE forgot to put a <!DOCTYPE html> on serenityos.org.. No matter, now we can handle it in the new parser! :^)
2020-05-28LibWeb: Add a "quirks mode" flag to DocumentAndreas Kling
This doesn't do anything yet, but it will sooner or later. :^)
2020-05-27LibWeb: Fire a DOMContentLoaded event when the new parser is finishedAndreas Kling
With this change, we can finally load and render welcome.html :^)
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-27LibWeb: Bring up basic external script execution in the new parserAndreas Kling
This only works in some narrow cases, but should be enough for our own welcome.html at least. :^)
2020-05-27LibWeb+Browser: Add ability to run Browser with the new HTML parserAndreas Kling
You can now pass "-n" to the browser to use the new HTML parser. It's not turned on by default since it's still very immature, but this is a huge step towards bringing it into maturity. :^)
2020-05-27LibGUI: Add up & down arrow hooks and input history to TextBoxFalseHonesty
This patch adds the ability to enable "input history" on a textbox, allowing to navigate between the history with the arrow keys. Also removes a custom TextBox subclass from HackStudio that added the exact same hooks, and moves it to use the now standard ones.
2020-05-27LibTextCodec: Improve Latin-1 decoder so it decodes everythingAndreas Kling
I can now see Swedish letters when opening Google in the browser. :^)
2020-05-27LibWeb: LayoutMode line_break_policy => LayoutMode layout_modeAndreas Kling
2020-05-27LibGUI: Defer line reflow during text insertionAndreas Kling
Add a deferral counter and defer reflowing the visual lines until the counter is at zero. Use this to defer reflow when inserting text. This fixes glacial slowdown while paste large amounts of text.
2020-05-27LibGUI: Make TextEditor::select_all() move the cursor to document headAndreas Kling
This feels a lot nicer than moving the cursor to the document end.
2020-05-27LibJS: Reformat ArrayPrototype.cppLinus Groh
2020-05-27LibWeb: Implement the "after attribute name" tokenizer stateAndreas Kling
One little step at a time towards parsing the monster blob of HTML we get from twitter.com :^)
2020-05-27LibWeb: Handle more benign parse errors in the "in body" insertion modeAndreas Kling
2020-05-27LibWeb: Implement the "self closing start tag" tokenizer stateAndreas Kling
2020-05-27LibWeb: Implement partial support for numeric character referencesAndreas Kling
2020-05-27LibJS: Simplify and normalize publicly-exposed Object functionsMatthew Olsson
Previously, the Object class had many different types of functions for each action. For example: get_by_index, get(PropertyName), get(FlyString). This is a bit verbose, so these methods have been shortened to simply use the PropertyName structure. The methods then internally call _by_index if necessary. Note that the _by_index have been made private to enforce this change. Secondly, a clear distinction has been made between "putting" and "defining" an object property. "Putting" should mean modifying a (potentially) already existing property. This is akin to doing "a.b = 'foo'". This implies two things about put operations: - They will search the prototype chain for setters and call them, if necessary. - If no property exists with a particular key, the put operation should create a new property with the default attributes (configurable, writable, and enumerable). In contrast, "defining" a property should completely overwrite any existing value without calling setters (if that property is configurable, of course). Thus, all of the many JS objects have had any "put" calls changed to "define_property" calls. Additionally, "put_native_function" and "put_native_property" have had their "put" replaced with "define". Finally, "put_own_property" has been made private, as all necessary functionality should be exposed with the put and define_property methods.
2020-05-27LibCrypto+LibTLS: Use AK/Random.hAndreas Kling
This makes it possible to build both of these on Linux.
2020-05-27LibGUI, About: Implement system-wide W2k-esque About dialogNick Vella
The new About dialog reads version information from /res/version.ini, which is generated at build time.
2020-05-27LibVT: Move most of key press handling logic into VT::TerminalSergey Bugaev
This will let us share it between the userspace (TerminalWidget) and the Kernel.
2020-05-27LibGUI: Change GUI::KeyEvent::key() type to KeyCodeSergey Bugaev
...instead of a plain int. Yay for some type safety.
2020-05-27LibWeb: Provide some properties to inspectors of ResourceLoaderAnotherTest
2020-05-27LibLine: Send over some properties when being inspectedAnotherTest
2020-05-27LibLine: Use Core::EventLoop for outer read loopAnotherTest
This commit changes LibLine's internal structure to work in an event loop, and as a result, also switches it to being a Core::Object.
2020-05-27LibTLS: Add more TLS 1.2 error descriptionsLuke
Adds more TLS 1.2 error descriptions according to the specification: https://tools.ietf.org/html/rfc5246#section-7.2.2 This changes the DecryptionFailed description, as the specification says that this alert should NEVER be sent by a compliant server.
2020-05-27LibWeb: Handle additional parser inputs in "initial" and "before html".TheDumpap
2020-05-27LibWeb: s_initialized should be static in the AttributeNames initialiserEmanuele Torre
2020-05-26LibTLS: Put lots of debug spam behind TLS_DEBUGAndreas Kling
2020-05-26LibCrypto: Put some debug spam behind CRYPTO_DEBUGAndreas Kling
2020-05-26LibWeb: Use FlyString in FontCache keysAndreas Kling
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-26LibWeb: Let Element cache its list of classesAndreas Kling
Instead of string splitting every time you call Element::has_class(), we now split the "class" attribute value when it changes, and cache the individual classes as FlyStrings in Element::m_classes. This makes has_class() significantly faster and moves the pain point of selector matching somewhere else.
2020-05-26LibWeb: Make the CSS parser a little more tolerant to invalid CSSAndreas Kling
Sometimes people put a '}' where it doesn't belong, or various other things go wrong. 99% of the time, it's our fault, but either way, this patch makes us not crash or infinite-loop in some common cases. The real solution here is to write a proper CSS lexer-parser according to the language spec, this is just a hack fix to make more sites load at all.
2020-05-26LibWeb: Add more HTML entitiesLinus Groh
®, ß and all the lowercase and uppercase umlaut characters.
2020-05-26LibWeb: Basic support for display:inline-block with width:autoAndreas Kling
We now implement the somewhat fuzzy shrink-to-fit algorithm when laying out inline-block elements with both block and inline children. Shrink-to-fit works by doing two speculative layouts of the entire subtree inside the current block, to compute two things: 1. Preferred minimum width: If we made a line break at every chance we had, how wide would the widest line be? 2. Preferred width: We break only when explicitly told to (e.g "<br>") How wide would the widest line be? We then shrink the width of the inline-block element to an appropriate value based on the above, taking the available width in the containing block into consideration (sans all the box model fluff.) To make the speculative layouts possible, plumb a LayoutMode enum throughout the layout system since it needs to be respected in various places. Note that this is quite hackish and I'm sure there are smarter ways to do a lot of this. But it does kinda work! :^)
2020-05-26LibWeb: Add HTML copyright escapeFalseHonesty
2020-05-26LibWeb: Fix step within reconstruct the active elementsKevin Meyer
In step 4 of the "renstruct the active formatting elements" algorithm it says: Rewind: If there are no entries before entry in the list of active formatting elements, then jump to the step labeled create. Prior to this patch, the implementation accorded to the spec only for the first loop iteration.
2020-05-26LibLine: Use LibC's getline() when the terminal claims no support for escape ↵AnotherTest
sequences We just look at $TERM and refuse to emit any escape sequences if it doesn't start with "xterm". This could be made much better, at detecting, and at not caling getline().
2020-05-26LibWeb: The line-height should not be multiplied by the glyph heightAndreas Kling
This was causing very tall lines on many websites. We can now see the section header thingy on google.com (although it's broken into lines where it should not be..) :^)