summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-02-05LibWeb: Mark SelectorEngine matches-related functions as inlineIdan Horowitz
The prologues and epilogues of these functions were pretty hot in a profile of Browser, so this should help a bit.
2022-02-05LibWeb: Cache the result of Selector::specificity()Idan Horowitz
This function was showing up as taking 30% of all runtime during a profile of Browser. This change effectively eliminates it completely.
2022-02-05AK: Make Vector::data() ALWAYS_INLINEIdan Horowitz
This was showing up in profiles of Browser, and it really shouldn't be.
2022-02-05LibRegex: Do not return an Optional from Regex::Matcher::executeTimothy Flynn
The code path that could return an optional no longer exists as of commit: a962ee020a6310b2d7c7479aa058c15484127418
2022-02-05LibRegex: Do not continue searching input when the sticky bit is setTimothy Flynn
This partially reverts commit a962ee020a6310b2d7c7479aa058c15484127418. When the sticky bit is set, the global bit should basically be ignored except by external callers who want their own special behavior. For example, RegExp.prototype [ @@match ] will use the global flag to accumulate consecutive matches. But on the first failure, the regex loop should break.
2022-02-05Shell: Use strncmp() instead of string.compare() for name completionsAli Mohammad Pur
The "at most n bytes" behaviour of strncmp is required for this logic to work, this was overlooked in 5b64abe when converting Strings to StringViews, which lead to broken autocomplete.
2022-02-05LibJS: Remove the VERIFY_NOT_REACHED in link_and_eval_moduledavidot
Since the spec does not fully define the entry points of modules what this means is kind of unclear. But it does work in most cases and can be useful. We do print out a warning just to clarify why there could be strange things.
2022-02-05LibJS: Visit internal values in PromiseValueListdavidot
2022-02-05LibJS: Keep handles on internal function while creating a classdavidot
It seems the stack search does not find all functions because they are kept in variants and other structs. This meant some function could be cleaned up while we were evaluating a class meaning it would fail/crash when attempting to run the functions.
2022-02-05LibJS: Keep handles on promise functions while resolving a moduledavidot
2022-02-05LibJS: Remove the JS_TRACK_ZOMBIE_CELLS optiondavidot
This feature had bitrotted somewhat and would trigger errors because PrimitiveStrings were "destroyed" but because of this mode they were not removed from the string cache. Even fixing that case running test-js with the options still failed in more places.
2022-02-05LibSQL: Implement DESCRIBE TABLE testsMahmoud Mandour
2022-02-05LibSQL: Implement a DESCRIBE TABLE statementMahmoud Mandour
This statement (for now) outputs the name and types of the different attributes in a table. It's not standard SQL but all DBMSs that I know of implement a sort of statement for such functionality. Since the output of DESCRIBE TABLE is just a relation, an internal schema, `master` was created and a table definition for DESCRIBE into it. The table definition and the master schema are not accessible by the user.
2022-02-05LibSQL: Avoid signed arithmetic in `IntegerImpl::compare`Mahmoud Mandour
2022-02-05LibJS+LibRegex: Don't repeat regex match in regexp_exec()Ali Mohammad Pur
LibRegex already implements this loop in a more performant way, so all LibJS has to do here is to return things in the right shape, and not loop over the input string. Previously this was a quadratic operation on string length, which lead to crazy execution times on failing regexps - now it's nice and fast :^) Note that a Regex test has to be updated to remove the stateful flag as it repeats matching on multiple strings.
2022-02-05LibRegex+LibJS: Avoid searching for more than one match in JS RegExpsAli Mohammad Pur
All of JS's regular expression APIs only want a single match, so avoid trying to produce more (which will be discarded anyway).
2022-02-04Kernel: Disable BootFramebufferConsole when drivers create a new oneTom
When GraphicsManagement initializes the drivers we can disable the bootloader framebuffer console. Right now we don't yet fully destroy the no longer needed console as it may be in use by another CPU.
2022-02-04Kernel: Set up an initial boot framebuffer consoleTom
Instead of seeing a black screen until GraphicsManagement was fully initialized, this allows us to see the console output much earlier. So, if the bootloader provided us with a framebuffer, set up a console as early as possible.
2022-02-04Kernel: Separate GenericFramebufferConsole implementationTom
The GenericFramebufferConsoleImpl class implements the logic without taking into account any other details such as synchronization. The GenericFramebufferConsole class then is a simple wrapper around GenericFramebufferConsoleImpl that takes care of synchronization. This allows us to re-use this implementation with e.g. different synchronization schemes.
2022-02-04Keymap Applet: Spawn KeyboardSettings when clickingMaciej
2022-02-04LibJS: Rename variables to 'calendarLike' in a couple of placesLinus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/9af2d35
2022-02-04LibJS: Remove '-000000' check from ParseTemporalYearMonthStringLinus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/3be4b5d
2022-02-04LibJS: Update fallibility of ParseISODateTime in spec commentsLinus Groh
This is an editorial change in the Temporal spec. See: https://github.com/tc39/proposal-temporal/commit/bc79069
2022-02-04LibCoredump: Add stack frame entry even if there is no object infoMaciej
We know the object name and are able to include it. Function name and source position are still unknown and will just be displayed as "??? ()"
2022-02-04LibCoredump: Fix use-after-free in Backtrace::object_info_for_region()Maciej
The first line was creating a StringView object with region name. Then, if the path didn't start with '/', it had assigned a String made from a temporary LexicalPath join result. This fixes the bug that only main executable's frames were displayed.
2022-02-04PixelPaint: Use Escape to clear rectangular selectionsJagger De Leo
Now while dragging a new rectangular selection you can cancel it by hitting Escape. Existing selections are cleared by Escape as well if the RectangularSelectTool is active.
2022-02-04PixelPaint: Remove conflicting action hotkeyJagger De Leo
The new CommandPalette feature conflicts with PixelPaint's Clear Selection action keyboard shortcut (Ctrl + Shift + A). Fixes: #12222
2022-02-04LibJS: Explicitly handle invalid Date objects in UTC time settersTimothy Flynn
This is a normative change in the ECMA-262 spec: https://github.com/tc39/ecma262/commit/ca53334 Note that this also fixes a few errors where we errantly converted the stored time value to local time.
2022-02-04LibJS: Explicitly handle invalid Date objects in local time settersTimothy Flynn
This is a normative change in the ECMA-262 spec: https://github.com/tc39/ecma262/commit/ca53334
2022-02-04LibWeb: Implement CalculatedStyleValue::to_string()Sam Atkins
2022-02-04LibWeb: Distinguish between Integer and Number calc() valuesSam Atkins
2022-02-04LibWeb: Allow calc() in opacitySam Atkins
This is mostly a test to make sure that resolving calc() to a number or percentage works correctly. I don't love how this ended up.
2022-02-04LibWeb+Base: Enable calc() for font-weight property :^)Sam Atkins
Modified the test-page because FontDatabase looks for exact font-weight matches, so requesting weight 800 in a font that only has 700, causes it to return the default font instead. So, we ask for 700 here. The actual fix is to improve our font-matching but I am trying not to get distracted today. :^)
2022-02-04LibWeb: Add resolving calc() to a number/integer/percentageSam Atkins
None of these require any outside metrics, which is nice! I believe the Values-4 spec would have us simplify them down into a single value at parse time, but that's a yak for another day.
2022-02-04LibWeb: Type-check calc() in in property_accepts_value()Sam Atkins
This means only CalculatedStyleValues that would return the desired type will be accepted.
2022-02-04LibWeb: Allow percentage tokens again when parsing calc()Sam Atkins
I unintentionally broke this in my LengthPercentage PR, but it was not convenient to fix until now.
2022-02-04LibWeb: Allow LengthPercentage to hold a calculated valueSam Atkins
Most of the time, we cannot resolve a `calc()` expression until we go to use it. Since any `<length-percentage>` can legally be a `calc ()`, let's store it in `LengthPercentage` rather than make every single user care about this distinction.
2022-02-04LibWeb: Refactor calc() resolution logic using CalculationResultSam Atkins
The previous static functions are now methods of their respective CalcFoo structs, but the logic has not changed, only that they work with CalculationResults instead of converting everything to floats.
2022-02-04LibWeb: Implement CalculationResult type for calc() resultsSam Atkins
calc() sub-expressions can return a variety of different types, which then can be combined using the basic arithmetic operators. This class should make that easier to deal with, instead of having to handle all the possible combinations at each call site. :^) We take the Layout::Node as a pointer not a reference, since later we'll need to call these functions when resolving to `<number>` or `<integer>` which don't use those, and we don't want to force users to pass them in unnecessarily.
2022-02-04LibWeb: Resolve type of calc() expressions at parse-timeSam Atkins
See https://www.w3.org/TR/css-values-3/#calc-type-checking If the sub-expressions' types are incompatible, we discard the calc() as invalid. Had to do some minor rearranging/renaming of the Calc structs to make the `resolve_foo_type()` templates work too.
2022-02-04LibWeb: Combine the two sets of calc() operator enumsSam Atkins
2022-02-04LibWeb: Replace Length::set_calculated_style() with ::make_calculated()Sam Atkins
There's no need to modify the Length's calculated-value after creating it, so let's make it immutable. :^)
2022-02-04LibWeb: Move calc()-resolution code from Length to CalculatedStyleValueSam Atkins
The code is unchanged, just moved.
2022-02-04Meta: Add install-native-partition CMake target installing to a real FSBrian Gianforcaro
While playing around with getting serenity to run on my main desktop machine I wanted a way of easily updating my physical serenity partition. To use it you just need to: - Create and format your local partition to ext4 - Set `SERENITY_TARGET_INSTALL_PARTITION` to the partition /dev path. - Run the `install-native-partition` build target. Example: $ export SERENITY_TARGET_INSTALL_PARTITION=/dev/nvme1n1p3 $ cd serenity/Build/x86_64 $ ninja install-native-partition
2022-02-04Shell: Add total time to builtin_time Timing ReportTom Martin
2022-02-04Base: Add Combining Diacritical Marks to font Csilla Regular 10Lady Gegga
0300-036F https://www.unicode.org/charts/PDF/U0300.pdf
2022-02-04LibWeb: Make debug logging of resource load errors red instead of greenAndreas Kling
Red is a bit more suspicious than green, after all. :^)
2022-02-04Meta: Add Kenneth Myhra to the contributors list :^)Andreas Kling
2022-02-03AK: Convert the try_make<T> factory function to use ErrorOrIdan Horowitz
This allows more ergonomic memory allocation failure related error checking using the TRY macro.
2022-02-03AK: Hide the infallible make<T> factory function from the KernelIdan Horowitz
This function has no users, nor should it ever be used in the kernel, as all allocation failures in the Kernel should be explicitly checked.