summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-04-04LibJS: Don't return the "last computed value" from Interpreter::run()Andreas Kling
Only return whatever a "return" statment told us to return. The last computed value is now available in Interpreter::last_value() instead, where the REPL can pick it up.
2020-04-04LibJS: Add String.prototype.indexOf()Andreas Kling
2020-04-04LibJS: Math.sqrt.length should be 1Andreas Kling
2020-04-04LibJS: Hack the lexer to allow numbers with decimalsAndreas Kling
This is very hackish and should definitely be improved. :^)
2020-04-04LibJS: Add NumberObject and make to_object() on number values create itAndreas Kling
2020-04-04LibJS: Add Math.sqrt()Andreas Kling
2020-04-04LibJS: Add basic Array constructorAndreas Kling
We only support Array() with 0 or 1 parameters so far.
2020-04-04LibJS: Log when we throw a JavaScript ErrorAndreas Kling
This makes debugging a lot easier since we actually learn that an Error got thrown.
2020-04-04LibWeb: Handle javascript: URLs inside LibWeb :^)Andreas Kling
This patch makes it possible to execute JavaScript by clicking on an anchor element with href="javascript:your_script_here()".
2020-04-04LibJS: Support VariableDeclaration with multiple declaratorsAndreas Kling
This patch adds support in the parser and interpreter for this: var a = 1, b = 2, c = a + b; VariableDeclaration is now a sequence of VariableDeclarators. :^)
2020-04-04LibJS: Add Declaration class to the ASTAndreas Kling
This is just here to make the AST class hierarchy more spec-like.
2020-04-04LibJS: Add support for do..while statementsAndreas Kling
2020-04-04LibJS: Rename WhileStatement::predicate() => body()Andreas Kling
This name matches other parsers.
2020-04-04LibJS: Add basic support for modulo (%) in binary expressionsAndreas Kling
2020-04-04LibJS: Allow "for" statement without curly braces around bodyAndreas Kling
2020-04-04LibWeb: Treat '<' characters as part of the text inside <script>Andreas Kling
When we encounter a '<' during HTML parsing, we now look ahead to see if there is a full </script> coming, otherwise we treat it as text. This makes it possible to use '<' in inline scripts. :^)
2020-04-04ProtocolServer+LibProtocol: Reject unhandled URLs instead of assertingAndreas Kling
StartDownload requests for unhandled protocols (or invalid URLs) will now refuse to load instead of asserting. A failure code is sent back to LibProtocol and Protocol::Client::start_download() returns nullptr. Fixes #1604.
2020-04-04Kernel: Strip SUID+SGID bits from file when written to or chownedAndreas Kling
Fixes #1624.
2020-04-04Userland: Fix null-pointer deref on unknown user/group in chown/chgrpAndreas Kling
We can't just blindly dereference the result of getpwnam()/getgrnam()! Fixes #1625.
2020-04-04Kernel: Enforce file system veil on file creationAndreas Kling
Fixes #1621.
2020-04-04LibJS: Add Function() and Function.prototypeLinus Groh
2020-04-04LibJS: Add length property to ScriptFunctionLinus Groh
2020-04-04LibJS: Set length property in Object::put_native_function()Linus Groh
2020-04-04LibWeb: Don't call an absent error callback in load_sync()Andreas Kling
Make ResourceLoader::load_sync() match load() in checking if the error_callback is null before actually calling it. Fixes #1623.
2020-04-04LibGUI: Add MenuBar::add_menu(name)Andreas Kling
This allows us to construct menus in a more natural way: auto& file_menu = menubar->add_menu("File"); file_menu.add_action(...); Instead of the old way: auto file_menu = GUI::Menu::construct(); file_menu->add_action(...); menubar->add_menu(file_menu);
2020-04-04LibJS: Add js_string(Interpreter&, String)Andreas Kling
2020-04-04LibCore: Fix UDPServer up to properly receive dataAnotherTest
Prior to this, UDPServer was using listen/accept, which does not make sense in the context of UDP.
2020-04-04Kernel: Do not reject broadcast UDP packets right awayAnotherTest
This patch relaxes how we think about UDP packets being "for us" a bit; the proper way to handle this would be to also check if the matched socket has SO_BROADCAST set, but we don't have that :)
2020-04-04Browser: Add Reload option to app menu with F5 shortcut keyBrendan Coles
2020-04-04LibGUI: Make GUI::TabWidget::add_tab<T>() return a T&Andreas Kling
Since the newly constructed sub-widget is owned by the TabWidget, we can simply return a T& here. :^)
2020-04-04LibGUI: Fix CppLexer assertion on incomplete #include statementsAndreas Kling
Thanks to @NotKyon for reporting this bug with a solid analysis. Fixes #1488.
2020-04-04LibJS: Correctly forward declare "Argument" as a structAndreas Kling
2020-04-04LibGUI: Move ColorPicker's helper classes fully into ColorPicker.cppAndreas Kling
Since these are not used by the outside world, no need to expose them.
2020-04-04Base: Add la-latin1 keyboard layout (#1597)M
2020-04-04LibGUI: Add color palette and custom color selection in the ColorPickerHüseyin ASLITÜRK
2020-04-04AK: Break on end of input in JsonParser::consume_quoted_stringTibor Nagy
Fixes #1599
2020-04-04js: Return 1 after exception in non-REPL modeLinus Groh
2020-04-04Userland/JS: Add the 'save("file")' repl commandDov Alperin
Calling save("file") in a repl saves all the typed lines so far into the specified file. It currently does not have great support for multilined functions since those get turned into one line.
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 ResourceLoader::load_sync()Andreas Kling
This function creates a nested event loop and runs a load() operation inside it, returning only once the load has either succeeded or failed. This will be used to implement blocking loads (ew!)
2020-04-03LibCore: Don't replay last handled event when leaving nested event loopAndreas Kling
The event that triggered the exit from an inner event loop would always get re-delivered in the outer event loop due to a silly off-by-one mistake when transferring pending events between loops.
2020-04-03LibWeb: Protect DOM node while preparing to send mouse eventsAndreas Kling
The Help application was hooking HtmlView::on_link_click, which would get invoked before DOM event dispatch. Since we were holding on to the clicked node with a Node*, the DOM node was gone after returning from the on_link_click callback. Fix this by keeping DOM nodes in RefPtrs in the event management code. Also move DOM event dispatch before widget hook invocation, to try and keep things sane on the LibWeb side of things. Fixes #1605.
2020-04-03Revert "Kernel: Change Ext2FS to be backed by a file instead of a block device"Andreas Kling
This reverts commit 6b59311d4bdc1447e085573f9bd2c42819e264dd. Reverting these changes since they broke things. Fixes #1608.
2020-04-03Revert "Kernel & Userland: Allow to mount image files formatted with Ext2FS"Andreas Kling
This reverts commit a60ea79a41845767ce40f225de20da7c99534ad1. Reverting these changes since they broke things. Fixes #1608.
2020-04-03Revert "SystemMonitor: Replace 'device' JSON field with 'source'"Andreas Kling
This reverts commit 592f218151493fefa2351252c8d4b51750687fea. Reverting these changes since they broke things. Fixes #1608.
2020-04-03LibGUI: Clear any hovered index when the cursor leaves an AbstractViewAndreas Kling
2020-04-03LibWeb: Add NavigatorObject to MakefileLinus Groh
2020-04-03LibWeb: Handle invalid URL in HtmlView::load()Linus Groh
2020-04-03LibJS: Add short circuit logical evaluationStephan Unverwerth
When evaluating logical binop expressions, the rhs must not be evaluated if the lhs leads to the whole expression not being truthy.
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. :^)