summaryrefslogtreecommitdiff
path: root/Libraries/LibWeb/CMakeLists.txt
AgeCommit message (Collapse)Author
2020-12-15LibWeb: Generate the CSS::ValueID enum and its helper functionsAndreas Kling
2020-12-14LibWeb: Add a simple StyleInvalidator classLinus Groh
This patch adds a simple, naive & inefficient class for document-wide style invalidation, e.g. after element attribute updates. During construction it collects a HashMap of a document's elements and their matching rules, during destruction it does the same and then compares the results; dirtying all elements that have a different number or order of matching rules afterwards. Much room for improvement, but it solves the problem of stale element styling after attribute updates for now :^) Fixes #4404.
2020-12-13LibWeb: Move DOM/TagNames.* => HTML/TagNames.*Andreas Kling
2020-12-09LibWeb: Expose DOM::Range to JavaScript.asynts
2020-12-09LibWeb: Make DOM::Range more suitable for JS.asynts
2020-12-09LibWeb: Move editing stuff into EditEventHandler.asynts
2020-12-08LibWeb: Build the DumpLayoutTree subdirectoryAndreas Kling
2020-12-04LibWeb: Move border painting from Layout::Box to a free functionAndreas Kling
This will allow us to share some code between inline and non-inline border painting.
2020-11-25LibWeb: Rename Layout::LayoutTreeBuilder => Layout::TreeBuilderAndreas Kling
2020-11-22LibWeb: Add the submit event to HTMLFormElementLuke
Also adds the ability to submit from JavaScript.
2020-11-22LibWeb: Add HTML::EventNames and UIEvents::EventNamesLuke
2020-11-22LibWeb: Make event dispatching spec-compliantLuke
Specification: https://dom.spec.whatwg.org/#concept-event-dispatch This also introduces shadow roots due to it being a requirement of the event dispatcher. However, it does not introduce the full shadow DOM, that can be left for future work. This changes some event dispatches which require certain attributes to be initialised to a value.
2020-11-22LibWeb: Rename LayoutNode classes and move them into Layout namespaceAndreas Kling
Bring the names of various boxes closer to spec language. This should hopefully make things easier to understand and hack on. :^) Some notable changes: - LayoutNode -> Layout::Node - LayoutBox -> Layout::Box - LayoutBlock -> Layout::BlockBox - LayoutReplaced -> Layout::ReplacedBox - LayoutDocument -> Layout::InitialContainingBlockBox - LayoutText -> Layout::TextNode - LayoutInline -> Layout::InlineNode Note that this is not strictly a "box tree" as we also hang inline/text nodes in the same tree, and they don't generate boxes. (Instead, they contribute line box fragments to their containing block!)
2020-11-22LibWeb: Reorganize layout system in terms of formatting contextsAndreas Kling
This is a first (huge) step towards modernizing the layout architecture and bringing it closer to spec language. Layout is now performed by a stack of formatting contexts, operating on the box tree (or layout tree, if you will.) There are currently three types of formatting context: - BlockFormattingContext (BFC) - InlineFormattingContext (IFC) - TableFormattingContext (TFC) Document::layout() creates the initial BlockFormattingContext (BFC) which lays out the initial containing block (ICB), and then we recurse through the tree, creating BFC, IFC or TFC as appropriate and handing over control at the context boundaries. The majority of this patch is just refactoring the old logic spread out in LayoutBlock and LayoutTableRowGroup, and turning into these context classes instead. A lot more cleanup will be needed. There are many architectural wins here, the main one being that layout is no longer performed by boxes themselves, which gives us much greater flexibility in the outer/inner layout of a given box.
2020-11-13LibWeb: Add initial implementation of document.implementationLuke
2020-11-12LibWeb: Add almost all obsolete but required IDL attributesLuke
As according to https://html.spec.whatwg.org/multipage/obsolete.html Section 16.3 "Requirements for implementations" Not all of these attributes are included due to requiring a bit more functionality.
2020-10-22LibWeb: Add namespace to ElementLuke
2020-10-10LibWeb: Create LayoutNodes for each SVG elementMatthew Olsson
This brings the SVG API closer to the rest of LibWeb
2020-10-03LibWeb: Add empty IDL bindings for current SVG elementsLuke
Nothing in them right now as the classes don't contain the IDL methods.
2020-09-29LibWeb: Implement performance.now()Andreas Kling
This patch introduces the HighResolutionTime namespace which is home to the Performance object (exposed via window.performance) performance.now() is currently the only function, and it returns the number of milliseconds since the window object was constructed. :^)
2020-09-24LibWeb: Add a separate UA style sheet for documents in quirks modeAndreas Kling
We need to make some additional tweaks to the default UA style when displaying documents in quirks mode.
2020-09-20LibWeb: Add Bindings::ScriptExecutionContextAndreas Kling
This will be inherited by documents and workers, to provide a common abstraction for script execution. (We don't have workers yet, but we might as well make this little space for them now to simplify things down the road.)
2020-09-12LibWeb: Implement <input type=submit> without using LibGUIAndreas Kling
Following in the footsteps of <input type=checkbox>, this patch adds LayoutButton which implements a basic push button using LibGfx styling primitives.
2020-09-11LibWeb: Add basic support for <input type=checkbox>Andreas Kling
This is implemented entirely inside LibWeb, there is no GUI::CheckBox widget instantiated, unlike other input types. All input types should be moved to this new style of implementation.
2020-09-06LibWeb: Move DOM event dispatch to its own classAndreas Kling
For now, the new DOM::EventDispatcher is very simple, it just iterates over the set of listeners on an EventTarget and invokes the callbacks as it goes. This simplifies EventTarget subclasses since they no longer have to implement the callback mechanism themselves.
2020-08-17LibWeb: Add more document tests, add comment, text and mixin testsLuke
Also adds a TypeScript definition file for the test runner object.
2020-08-17LibWeb: Add Comment and DocumentFragment bindings, move querySelector...Luke
...{All} to ParentNode. Exposes createDocumentFragment and createComment on Document. Stubs out the document.body setter. Also adds ParentNode back :^).
2020-08-17LibWeb: Add Node.textContentNico Weber
This requires moving remove_all_children() from ParentNode to Node, which makes ParentNode.cpp empty, so remove it. It also co-opts the existing Node::text_content() method and tweaks it slightly to fit the semantics of Node.textContent.
2020-08-17LibWeb: Rename WebContentView => OutOfProcessWebViewAndreas Kling
2020-08-17LibWeb: Rename PageView => InProcessWebViewAndreas Kling
2020-08-12LibWeb: Move HTML::AttributeNames file into HTML/ directoryAndreas Kling
2020-08-09LibWeb: Add HTML elements to factories, add missing tags and attributesLuke
This is mostly to get the grunt work of the way. This is split up into multiple commits to hopefully make it more manageable to review. Note that these are not full implementations, and the bindings mostly get the low hanging fruit. Also implements some attributes that I kept out because they had dashes in them. Therefore, this closes #2905.
2020-08-04Build: Support make's and ninja's restat optimizationNico Weber
After running a build command, make by default stat()s the command's output, and if it wasn't touched, then it cancels all build steps that were scheduled only because this command was expected to change the output. Ninja has the same feature, but it's opt-in behind the per-command "restat = 1" setting. However, CMake enables it by default for all custom commands. Use Meta/write-only-on-difference.sh to write the output to a temporary file, and then copy the temporary file only to the final location if the contents of the output have changed since last time. write-only-on-difference.sh automatically creates the output's parent directory, so stop doing that in CMake. Reduces the number of build steps that run after touching a file in LibCore from 522 to 312. Since we now no longer trigger the CMake special case "If COMMAND specifies an executable target name (created by the add_executable() command), it will automatically be replaced by the location of the executable created at build time", we now need to use qualified paths to the generators. Somewhat related to #2877.
2020-08-03LibWeb: Add CharacterData and Text IDL interfacesAndreas Kling
2020-08-02LibWeb: Add a basic DOM::Position classAndreas Kling
This will be used for editable content. :^)
2020-07-28LibWeb: Add UIEvent class (base of MouseEvent, and others)Andreas Kling
2020-07-28LibWeb: Move the Page/Frame/EventHandler classes into Page/Andreas Kling
2020-07-28LibWeb: Move the CSS parser into CSS/Parser/Andreas Kling
2020-07-28LibWeb: Move the HTML parser into HTML/Parser/Andreas Kling
2020-07-28LibWeb: Move MouseEvent into the UIEvents namespaceAndreas Kling
Named after the UIEvents specification that houses MouseEvent.
2020-07-27LibWeb: Add a whole bunch of HTML DOM bindingsLuke
Note that these aren't full implementations of the bindings. This mostly implements the low hanging fruit (namely, basic reflections) There are some attributes that should be USVString instead of DOMString. However, USVString is a slightly different definition of DOMString, so it should suffice for now.
2020-07-26LibWeb: Move HTML object model stuff into LibWeb/HTML/Andreas Kling
Take a hint from SVG and more all the HTML classes into HTML instead of mixing them with the DOM classes.
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!