summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-08-02LibWeb: Implement CSS parsing convenience functionsSam Atkins
These mostly match the API in `DeprecatedCSSParser.h`. The exception is that `parse_selector()` returns a `SelectorList` instead of just one `Selector`. The only uses of that are in `ParentNode::query_selector[_all]()` which should be matching against a list, according to the spec. `parse_html_length()` is an odd case. It's used for `width="200"` cases in HTML, so is not really CSS related, but does produce a StyleValue. The values allowed in `width/height` in HTML vary per element, but they are a lot more restricted than in CSS, so it's slightly inappropriate to use the CSS parser for them, even though it's convenient. We also ignore a few functions: - `parse_line_width()` - `parse_line_style()` - `parse_color()` These are all only used in `StyleResolver`, when it is given a property value as a String. That won't happen once the old parser is removed.
2021-08-02LibWeb: Clarify naming and publicity of CSS Parser methodsSam Atkins
`parse_as_foo()` implies that the Parser's internal data is used, whereas `parse_a_foo()` implies that the passed-in data is used. Also, made all the `parse_a_foo()` methods private, as they are only required within the Parser, and this makes the API clearer to outsiders. The `parse_a(s)_foo()` naming is a little awkward, but it comes from section 5.3 of the spec, so seemed worth keeping: https://www.w3.org/TR/css-syntax-3/#parser-entry-points
2021-08-02LibWeb: Only dump parsed CSS stylesheet if logging is enabledSam Atkins
2021-08-02LibRegex: Make Matcher<>::match(Vector<>) take a reference to the vectorAli Mohammad Pur
It was previously copying the entire vector every time, which is not a nice thing to do. :^)
2021-08-02LibRegex: Use a bump-allocated linked list for fork save statesAli Mohammad Pur
This makes it avoid the excessively high malloc() traffic.
2021-08-02AK: Add a simple bump allocatorAli Mohammad Pur
2021-08-02LibRegex: Add some tests for Fork{Stay,Jump} performanceAli Mohammad Pur
Without the previous fixes, these will blow up the stack.
2021-08-02LibRegex: Make Fork{Jump,Stay} non-recursiveAli Mohammad Pur
This makes very fork-heavy expressions (like `(aa)*`) not run out of stack space when matching very long strings.
2021-08-02AK: Correct Tuple's constructor signaturesAli Mohammad Pur
Tuple previously required rvalue references, this commit makes it accept forwarding references instead (which was the intention all along).
2021-08-02LibGUI: Ensure that edit actions are disabled for password boxesGunnar Beutner
This ensures that the user can't copy/cut text from password boxes which would reveal the password. It also makes sure that the undo/redo actions stay disabled because it's difficult to reason about what these do exactly without being able to see the result.
2021-08-02LibGUI: Remove redundant codeGunnar Beutner
2021-08-02Meta: Improve WSL detection for the run.sh scriptGunnar Beutner
For users who use a custom kernel with WSL our previous method of detecting WSL doesn't work. This new check instead detects WSL by checking if the wslpath utility is available.
2021-08-02Mail: Use GUI::PasswordInputDialog to ask for server passwordsAndreas Kling
2021-08-02LibGUI: Add a simple GUI::PasswordInputDialogAndreas Kling
Asking the user for a password is a fairly common thing, so let's have a reusable GUI dialog for it! This first iteration only supports having pre-filled "server" and "username" fields. This can obviously be made more flexible as needs arise. :^)
2021-08-02LibGUI: Register GUI::PasswordBox to make it availble in GMLAndreas Kling
2021-08-02Mail: Tweak vertical spacing & margins in main UI layoutAndreas Kling
2021-08-02Browser: Tweak vertical spacing in per-tab UI layoutAndreas Kling
2021-08-02Meta: Add BUILD_SHARED_LIBS option for Lagom buildsAndrew Kaster
This standard CMake option controls whether add_library() calls will use STATIC or SHARED by default. The flag is set to on by default since that's what we want for normal CI jobs and local builds and the test262 runner, but disabled for oss-fuzz builds. This should finally fix the oss-fuzz build after it was broken in #9017 oss-fuzz un-breakage was verified by running the following commands in the oss-fuzz repo: python infra/helper.py build_image serenity python infra/helper.py build_fuzzers --sanitizer address --engine afl \ --architecture x86_64 serenity /path/to/local/checkout/Meta/Lagom python infra/helper.py check_build --sanitizer address --engine afl \ --architecture x86_64 serenity
2021-08-02LibAudio: Handle stream errors in FlacLoaderAndrew Kaster
The FlacLoader already has numerous checks for invalid data reads and for invalid stream states, but it never actually handles the stream errors on the stream object. By handling them properly we can actually run FuzzFlacLoader for longer than a few seconds before it hits the first assertion :^).
2021-08-02Kernel: Send RST/ACK if no socket is availablebrapru
Previously there was no way for Serenity to send a packet without an established socket connection, and there was no way to appropriately respond to a SYN packet on a non-listening port. This patch will respond to any non-established socket attempts with the appropraite RST/ACK, letting the client know to close the connection.
2021-08-02Kernel: Do not send delayed ack in response to RST/ACKbrapru
In accordance with RFC 793, if the receiver is in the SYN-SENT state it should respond to a RST by aborting the connection and immediately move to the CLOSED state. Previously the system would ACK all RST/ACKs, and the remote peer would just respond with more RST packets.
2021-08-02Base: Add a quote to fortunes.jsonLinus Groh
2021-08-02VirtualFileSystem: Don't let rename() overwrite non-empty directoryLuK1337
According to POSIX, rename shouldn't succeed if newpath is a non-empty directory.
2021-08-02LibCpp: Allow 'final' in a class declaration with inheritanceAli Mohammad Pur
2021-08-02LibCpp: Add support for east constAli Mohammad Pur
Now LibCpp can understand the eastest of consts too :^)
2021-08-02LibCpp: Allow 'override' as a function target qualifierAli Mohammad Pur
This is just ignored right now.
2021-08-02LibCpp: Add support for parsing function typesAli Mohammad Pur
This makes it work with types like `Function<T(U, V)>`.
2021-08-02LibCpp: Allow 'const' after a function's signatureAli Mohammad Pur
This is too lax for functions that aren't class members, but let's allow that anyway.
2021-08-02LibCpp: Add support for parsing reference typesAli Mohammad Pur
2021-08-02LibCpp: Allow virtual destructorsAli Mohammad Pur
2021-08-02LibCpp: Match and ignore struct/class inheritanceAli Mohammad Pur
2021-08-02LibCpp: Correctly parse lines that end in '\'Ali Mohammad Pur
Such lines should be considered to be joined into the next line. This makes multiline preprocessor stuff "work".
2021-08-02LibCpp: Parse enum members with explicit valuesAli Mohammad Pur
2021-08-02LibCpp: Parse "extern" declarationsAli Mohammad Pur
Note that this is not the `extern "C"` declarations, just extern decl qualifiers.
2021-08-02LibCpp: Accept scoped variable declarationsAli Mohammad Pur
For instance, `Type Scope::Class::variable = value;` is a valid declaration.
2021-08-02HackStudio: Enable building HackStudio on x86_64Gunnar Beutner
This implements bits and pieces to get the debugging functionality to build. No testing has been done to check whether it actually works because GCC doesn't currently work.
2021-08-02PixelPaint: Show image coordinates in the status barClément Sibille
2021-08-02LibGUI, WindowServer: Greatly simplify menubar logicsin-ack
Currently, any number of menubars can be plugged in and out of a window. This is unnecessary complexity, since we only need one menubar on a window. This commit removes most of the logic for dynamically attaching and detaching menubars and makes one menubar always available. The menubar is only considered existent if it has at least a single menu in it (in other words, an empty menubar will not be shown). This commit additionally fixes a bug wherein menus added after a menubar has been attached would not have their rects properly setup, and would therefore appear glitched out on the top left corner of the menubar.
2021-08-02Mail: Use Window::add_menu instead of Menubar::add_menusin-ack
Window::add_menu is the canonical way of adding menus to a window.
2021-08-02Userland: Make use of container version of any_ofLenny Maiorani
Problem: - New `any_of` implementation takes the entire container so the user does not need to pass explicit begin/end iterators. This is unused except is in tests. Solution: - Make use of the new and more user-friendly version where possible.
2021-08-02Ports: Bump pkgconf from version 1.7.3 to 1.8.0Kenneth Myhra
2021-08-02Meta: Explicitly specify the disk format in the QEMU optionsx-yl
Otherwise we're getting this warning: WARNING: Image format was not specified for '_disk_image' and probing guessed raw. Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted. Specify the 'raw' format explicitly to remove the restrictions.
2021-08-02Meta: Fix compatibility with QEMU 5.xGunnar Beutner
QEMU 5 doesn't support -machine pcspk-audiodev so we need to fall back to using -soundhw for that.
2021-08-02LibWeb: Remove unneccessary breaks from text-decoration-renderingTobias Christiansen
The returns in the switch-block don't need any breaks after them.
2021-08-02LibWeb: Don't draw zero-length line for text-decoration: blinkTobias Christiansen
This patch doesn't make any visible change but increases the correctness of the text-decoration: blink path. Previously the painter would be instructed to draw a line that doesn't have any length when encountering the blink property instead of simply doing nothing.
2021-08-02Kernel: Convert NetworkTask to east-const stylebrapru
2021-08-02Shell: Improve the parsing of history event designatorsTheFightingCatfish
2021-08-02AK: Add formatters for BigEndian and LittleEndiansin-ack
This allows printing out BigEndian and LittleEndian values without having to perform a static_cast first.
2021-08-01js: Implement pretty-printing of Temporal.ZonedDateTime objectsLinus Groh
2021-08-01LibJS: Implement Temporal.Now.zonedDateTimeISO()Linus Groh