summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2022-02-08LibJS: Convert Instruction::execute in bytecode to ThrowCompletionOrdavidot
This allows us to use TRY in these functions :^).
2022-02-08LibJS: Convert ArrayBuffer construction to ThrowCompletionOrdavidot
This also allows us to create TypedArrays with an existing buffer thus clearing up an additional FIXME in TextEncoder.
2022-02-08LibJS: Convert ScopeNode declaration functions to ThrowCompletionOrdavidot
This removes a number of vm.exception() checks which are now caught directly by TRY. Make use of these checks in {Global, Eval}DeclarationInstantiation and while we're here add spec comments.
2022-02-07LibJS: Add missing include to ShadowRealm.hAndreas Kling
2022-02-07LibWeb: Parse `display: inline-flex`Sam Atkins
This was already handled in the CSS machinery, we just never parsed it.
2022-02-07LibWeb: Add `pointer-events: all`Sam Atkins
This is basically the same as `auto` in the spec, so let's just treat them as identical for now. Gets rid of some Discord CSS parser spam. :^)
2022-02-07LibWeb: Allow percentages for border-radius :^)Sam Atkins
During the LengthPercentage split, I converted the individual-corner `border-foo-bar-radius` properties to LengthPercentage but forgot `border-radius` itself! Oops. Discord's CSS was doing `border-radius: 50%` a lot, so this cuts down on CSS parser spam.
2022-02-07RequestServer: Reenable socket notifications unconditionallyAli Mohammad Pur
There's a possible window where the notifications are disabled, and any request coming at that time will never get any data if it relies on socket notifications.
2022-02-07LibJS: Add missing include to ExecutionContext.hAndreas Kling
2022-02-07LibJS: Add missing include to Handle.hAndreas Kling
2022-02-07LibJS: Unbreak build with JS_MODULE_DEBUGAndreas Kling
Thanks to David for noticing this! :^)
2022-02-07LibJS: Reduce header dependency graph in Realm.hAndreas Kling
2022-02-07LibJS: Add [[HostDefined]] internal slot to Script objectsAndreas Kling
In C++, this is a raw pointer to a Script::HostDefined.
2022-02-07LibJS: Add [[HostDefined]] internal slot to Realm objectsAndreas Kling
In C++, this is an OwnPtr<Realm::HostDefined>.
2022-02-07LibJS: Make ScriptOrModule use WeakPtr instead of raw pointersAndreas Kling
2022-02-07Meta+Userland: Run the GML formatter on CI and pre-commitkleines Filmröllchen
Now that the GML formatter is both perserving comments and also mostly agrees to the existing GML style, it can be used to auto-format all the GML files in the system. This commit does not only contain the scripts for running the formatting on CI and the pre-commit hook, but also initially formats all the existing GML files so that the hook is successfull.
2022-02-07Playground: Remove the GML formatting warningkleines Filmröllchen
As we no longer remove comments when formatting GML, this gets rid of the warning presented to the user when there are comments in the GML.
2022-02-07LibGUI: Move GML parsing and formatting to new ASTkleines Filmröllchen
This commit introduces a couple of connected changes that are hard to untangle, unfortunately: - Parse GML into the AST instead of JSON - Change the load_from_json API on Widget to load_from_gml_ast - Remove this same API from Core::Object as it isn't used outside of LibGUI and was a workaround for the object registration detection; by verifying the objects we're getting and casting we can remove this constraint. - Format GML by calling the formating APIs on the AST itself; remove GMLFormatter.cpp as it's not needed anymore. After this change, GML formatting already respects comments :^)
2022-02-07LibGUI: Add a custom GML ASTkleines Filmröllchen
This Abstract Syntax Tree is specifically designed to represent GML and also includes comments. It will be used in the next commit to replace JSON in the GML system.
2022-02-07Userland: Undefine FOR_EACH_TOKEN_TYPE everywherekleines Filmröllchen
This was causing some macro redefinition errors after the headers ended up in the same file through some includes. The simple fix is to undefine the macro after use.
2022-02-07LibGUI: Remove GML prefix in favor of proper namespacekleines Filmröllchen
Prefixes are very much a C thing which we don't need in C++. This commit moves all GML-related classes in LibGUI into the GUI::GML namespace, a change somewhat overdue.
2022-02-07LibGfx: Return proper ColorRole for GutterBordersthankyouverycool
2022-02-07LibGUI: Simplify DisplayOnly painting for TextEditorthankyouverycool
2022-02-07LibGUI: Fix typo in TextEditor::paint_eventthankyouverycool
2022-02-07LibGUI+TextEditor: Highlight the entire current linethankyouverycool
And fix Line Highlighting's duplicate alt-menu shortcut. Previously only text on the cursor's line was highlighted. This makes discerning cursor focus on empty lines easier.
2022-02-07LibGUI: Adjust TextEditor's clipping rect for textthankyouverycool
And simplify its construction. The first visual line was being over-clipped vertically by an amount equal to the frame's thickness. Selections and icons in TextBoxes and the first line of Editors now display correctly.
2022-02-07LibGUI: Register gutter and ruler GML properties for TextEditorthankyouverycool
2022-02-07LibJS: Add spec comments to the NativeError constructorLinus Groh
2022-02-07LibJS: Add spec comments to the Error constructorLinus Groh
2022-02-07LibJS: Add spec comments to Error.prototype.toString()Linus Groh
2022-02-07LibJS: Let Error prototypes inherit from PrototypeObjectLinus Groh
2022-02-07LibJS: Implement non standard error.stack attributeHendiadyoin1
All other browser already support this feature. There is a Stage 1 proposal to standardize this, but it does not seem to be active.
2022-02-07LibWeb: Rename "result" => "evaluation_status" in ClassicScript::run()Andreas Kling
This matches the variable name used in the spec.
2022-02-07LibWeb: Remove outdated FIXME from ClassicScript::run()Andreas Kling
Interpreter::run() *does* now return a Completion. :^)
2022-02-07LibWeb: Implement ErrorEventLuke Wilde
This will be used by the new EventTarget to check if it needs to do special error event handling. Currently it isn't used for anything else.
2022-02-07LibJS: Fix JSON.stringify with stale surrogate codepointsJorropo
This fix this test262 test: built-ins/JSON/stringify/value-string-escape-unicode.js
2022-02-07LibWeb: Dispatch a click event after mousedown+mouseup on same targetAndreas Kling
2022-02-07LibWeb: Add MouseEvent.x and MouseEvent.yAndreas Kling
Per the CSSOM View spec, these are aliases for clientX and clientY.
2022-02-07Base+Browser: Add Browser Iconselectrikmilk
Add or insert some missing browser icons.
2022-02-07LibGUI: Paint GUI::TextEditor's optional icon before applying text clipAndreas Kling
We were chopping the top row of pixels off of the website favicons in Browser's location editor. :^)
2022-02-07Browser: Better handle ports in user input to url conversionnetworkException
Previously it was hard to enter a url with a port in browser: "example.com:8080" -> Protocol not implemented: example.com This patch makes an attempt at parsing the input as an url with http first an validates if the url has a port. "example.com:8080" -> "http://example.com:8080"
2022-02-07Base: Add GML file type iconelectrikmilk
Add 16x16 and 32x32 icons for GML files.
2022-02-07LibJS: Use GetV to look up the toJSON property in SerializeJSONPropertyTimothy Flynn
The current implementation of step 2a sort of manually implemented GetV with a ToObject + Get combo. But in the call to Get, the receiver wasn't the correct object. So when invoking toJSON, the receiver was an Object type rather than a BigInt. This also adds spec comments to SerializeJSONProperty.
2022-02-07LibWeb: Fix broken step 4.3 implementation in run_focus_update_steps()Andreas Kling
Some over-eager copy-pasting led to incorrect code for the new chain.
2022-02-07LibWeb: Use NonnullRefPtrVector<DOM::Node> for focus chainsAndreas Kling
Let's just use reference-counting pointers for this, even if it seems safe not to.
2022-02-07LibWeb: Improve step 3 of "focus chain" from the HTML specAndreas Kling
This function was unnecessarily nested, which created a scenario where we could get stuck in an infinite loop without advancing the current_object pointer up the browsing context container chain.
2022-02-07LibWeb: Fix inverted null check in run_focusing_steps()Andreas Kling
Thanks to U9G for catching this! :^)
2022-02-07LibWeb: Add a proper FocusEvent interface for "focus" and "blur" eventsAndreas Kling
2022-02-06Everywhere: Rename JS::PropertyKey variables from property_{name => key}Linus Groh
PropertyKey used to be called PropertyName, but got renamed. Let's update all the variables of this type as well.
2022-02-06LibWeb: Update focus target when handling mousedown eventsAndreas Kling
If the mousedown event hits something with is_focusable()==true, we now update the document's focused element *instead* of placing the text cursor at the focusable element. This allows you to begin editing input elements by clicking them. This feels very hackish and we'll need to come up with something nicer.