summaryrefslogtreecommitdiff
path: root/Userland
AgeCommit message (Collapse)Author
2021-02-24LibLine: Note that the search() call modifies the bufferAnotherTest
Fixes #5465.
2021-02-24LibLine: Update the drawn cursor value when updating lazilyAnotherTest
2021-02-24LibLine: Properly update the main editor when clearing the search editorAnotherTest
This broke after the lazy update change :P
2021-02-24Profiler: Make sure rendered timestamps don't overflowSahan Fernando
If you drag-select a slice of the profile off of the side of the Profiler window, the profiler will try to render a negative start time, which will overflow. This commit fixes that bug by clamping timestamps to the start/end of the profile before rendering.
2021-02-24LibJS: Use const references to avoid some copies in the parserLinus Groh
2021-02-24Build: Build Userland with -O2, Kernel with -OsAndreas Kling
For some reason I don't yet understand, building the kernel with -O2 produces a way-too-large kernel on some people's systems. Since there are some really nice performance benefits from -O2 in userspace, let's do a compromise and build Userland with -O2 but put Kernel back into the -Os box for now.
2021-02-24LibJS: Let RegExpPrototype inherit from Object directlyLinus Groh
https://tc39.es/ecma262/#sec-properties-of-the-regexp-prototype-object The RegExp prototype object: - is an ordinary object. - is not a RegExp instance and does not have a [[RegExpMatcher]] internal slot or any of the other internal slots of RegExp instance objects. In other words: no need to have RegExpPrototype inherit from RegExpObject (we weren't even calling its initialize()).
2021-02-24LibJS: Make ArrayPrototype an Array objectLinus Groh
https://tc39.es/ecma262/#sec-properties-of-the-array-prototype-object The Array prototype object: [...] is an Array exotic object and has the internal methods specified for such objects. NOTE: The Array prototype object is specified to be an Array exotic object to ensure compatibility with ECMAScript code that was created prior to the ECMAScript 2015 specification.
2021-02-23Everywhere: Remove unused RELEASE_ASSERT macroAndreas Kling
2021-02-23Everywhere: Rename ASSERT => VERIFYAndreas Kling
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED) Since all of these checks are done in release builds as well, let's rename them to VERIFY to prevent confusion, as everyone is used to assertions being compiled out in release. We can introduce a new ASSERT macro that is specifically for debug checks, but I'm doing this wholesale conversion first since we've accumulated thousands of these already, and it's not immediately obvious which ones are suitable for ASSERT.
2021-02-23LibELF: Inline DynamicObject::hash_section()Andreas Kling
This was high up in profiles and gets almost entirely optimized out when inlined, so let's do that.
2021-02-23LibELF: Don't build barely-used section lookup table in ELF::ImageAndreas Kling
The name-to-section lookup table was only used in a handful of places, and none of them were calling it nearly enough to justify building a cache for it in the first place. So let's get rid of it and reduce startup time by a little bit. :^)
2021-02-23LibDebug: Fix build with -O2Andreas Kling
It turns out that LibDebug was the only thing that couldn't be built with -O2. We were neglecting to deal with some stream read errors.
2021-02-23LibELF: Avoid doing strlen() on everything while iterating GNU hashAndreas Kling
It's a lot faster to iterate the GNU hash tables if we don't have to compute the length of every symbol name before rejecting it anyway while comparing the first character. :^)
2021-02-23LibELF: Rename lookup_elf_symbol() => lookup_sysv_symbol()Andreas Kling
We have two kinds of lookup, SYSV and GNU hash. Both are ELF lookups.
2021-02-23LibELF: Avoid calling strlen() in DynamicObject::hash_section()Andreas Kling
The long-term fix here is to make StringView recognize compile-time string literals and do the right thing automatically.
2021-02-23LibELF: Don't recompute the same ELF hashes over and overAndreas Kling
When performing a global symbol lookup, we were recomputing the symbol hashes once for every dynamic object searched. The hash function was at the very top of a profile (15%) of program startup. With this change, the hash function is no longer visible among the top stacks in the profile. :^)
2021-02-23LibELF: Remove an ungodly amount of DYNAMIC_LOAD_DEBUG loggingAndreas Kling
This logging mode was unusable anyway since it spams way too much. The dynamic loader is in a pretty good place now anyway, so I think it's okay for us to drop some of the bring-up debug logging. :^) Also, we have to be careful with dbgln_if(FOO_DEBUG, "{}", foo()) where foo() is something expensive, since it might get evaluated even if !FOO_DEBUG.
2021-02-23LibELF: Move ELF hash functions to their own file (and make constexpr)Andreas Kling
2021-02-23Browser: Implement view source for out of process modeBrandon Scott
Implemented view source functionality for out of process mode and moved view source dialog creation into seperate static method.
2021-02-23LibWeb: Added get source functionality and hook eventBrandon Scott
2021-02-23WebContent: Added IPC calls for getting sourceBrandon Scott
2021-02-23HexEditor: Add menu icons for search menu itemsBrendan Coles
2021-02-23AK+Kernel+Userland: Enable some more compiletime format string checksAnotherTest
This enables format string checks for three more functions: - String::formatted() - Builder::appendff() - KBufferBuilder::appendff()
2021-02-23LibWeb: Fix a tiny appendff() format issueAnotherTest
This would've just left the colour on for a few characters, nothing _too_ bad.
2021-02-23AK+Userland: Extend the compiletime format string check to other functionsAnotherTest
Thanks to @trflynn89 for the neat implicit consteval ctor trick! This allows us to basically slap `CheckedFormatString` on any formatting function, and have its format argument checked at compiletime. Note that there is a validator bug where it doesn't parse inner replaced fields like `{:~>{}}` correctly (what should be 'left align with next argument as size' is parsed as `{:~>{` following a literal closing brace), so the compiletime checks are disabled on these temporarily by forcing them to be StringViews. This commit also removes the now unused `AK::StringLiteral` type (which was introduced for use with NTTP strings).
2021-02-23HackStudio: Fix a misuse of dbgln() intended as dbgln_if()AnotherTest
This currently works accidentally, just because there's an overload for `dbgln<bool>(...)` - it just bypasses the compiletime checks.
2021-02-23UserspaceEmulator: Fix an outln() format bugAnotherTest
2021-02-23Inspector: Add help documentationBrendan Coles
2021-02-22LibWeb: Only scroll BlockBox on wheel event if overflow==scrollAndreas Kling
We implement this by adding a BlockBox::is_scrollable() helper, and then ignoring wheel events for non-scrollable boxes. Thanks to FireFox317 for pointing this out! :^)
2021-02-22HackStudio: Fix opened files appearing empty (#5480)Ivan Hansgaard Hansen
When files where placed in outside of the project root, they would appear empty because the label in the tree would differ from the actual file path relative to the root. Fixes #5471.
2021-02-22LibWeb: Allow scrolling overflowed content with the mouse wheel :^)Andreas Kling
This is rather crude, but you can now use the mouse wheel to scroll up and down in block-level boxes with clipped overflowing content. There's no limit to how far you can scroll in either direction, since we don't yet track how much overflow there is. But it's a start. :^)
2021-02-22LibWeb: Plumb wheel events from widget layer to EventHandlerAndreas Kling
2021-02-22LibWeb: Clip overflowing inline children when overflow != "visible"Andreas Kling
We now apply a paint-time clip to the padding rect of a BlockBox before painting its inline-level children. This covers some of the behavior we want from "overflow: hidden" etc but is far from a complete solution.
2021-02-22LibGfx: Make Painter::draw_physical_pixel() clip with scaling in mindAndreas Kling
2021-02-22LibWeb: Respect explicitly specified CSS "height" on block elementsAndreas Kling
Don't size blocks to fit their contents if they have an explicit (non-auto) height specified.
2021-02-22LibWeb: Add bordered_rect() and padded_rect() helpers in Layout::BoxAndreas Kling
2021-02-22LibWeb: Add parsing and application of CSS "overflow" propertyAndreas Kling
We don't actually do anything with the values yet, but now they are available for layout nodes once we are ready to implement them.
2021-02-22DisplaySettings: Tweak UI, call it "1x/2x scale" instead of "100%/200%"Andreas Kling
2021-02-22LibWeb: Support assigning to document.body when it is nullAndreas Kling
2021-02-22LibGfx: Don't color outside the lines in Painter::draw_physical_pixel()Andreas Kling
Fixes #5422.
2021-02-22LibWeb: Defer the handling of WebContent process crashesAndreas Kling
Handling crashes synchronously is finicky since we're modifying the m_client_state struct while in a callback lambda owned by it. Let's avoid all the footguns here by simply using deferred_invoke() and handling the crash on next event loop iteration instead.
2021-02-22LibGUI: Ignore glyph dimensions when painting a titleless GroupBoxthankyouverycool
2021-02-22TextEditor+LibGUI: Add case matching and wrap around optionalitythankyouverycool
Adds simple ASCII case matching and wrap around toggles to TextEditor's find/replace widget and reorganizes its layout
2021-02-22WindowServer: Don't close context menus when hovering over menu barTom
2021-02-22WindowServer: Reset menu position when opened by the menu barTom
Also, only mark the menu bar item as opened if a menu was actually opened through the menu bar. These changes allow a menu to be used both in the menu bar as well as a context menu. Fixes #5469
2021-02-21LibWeb: Add Document.createRange()Andreas Kling
Also tidy up DOM::Range a little bit while we're here, and unify the way we create them to use a delegating constructors.
2021-02-21SpaceAnalyzer: Added context menu for nodesSviatoslav Peleshko
Currently supports 3 actions: Open, Copy Path, and Delete.
2021-02-21LibGUI: Show context menu when right-clicking a LinkLabelMițca Dumitru
Fixes #4794
2021-02-21CatDog: Fix wake-sleep "loop" when cursor is over right-top of headTom
Because re-evaluation of the hovered window may trigger sending a MouseMove event to a window we should only wake it if the mouse position actually has changed.