summaryrefslogtreecommitdiff
path: root/Userland/Applications/Spreadsheet
AgeCommit message (Collapse)Author
2022-09-29Userland: Replace empty `GUI::Widget`s in GML with `GUI::Layout::Spacer`Sam Atkins
This fixes the "Cancel" button on HackStudio's "New Project" dialog being too small. It's also clearer what these actually are.
2022-09-29AK+Everywhere: Replace "protocol" with "scheme" url helpersnetworkException
URL had properly named replacements for protocol(), set_protocol() and create_with_file_protocol() already. This patch removes these function and updates all call sites to use the functions named according to the specification. See https://url.spec.whatwg.org/#concept-url-scheme
2022-09-27Spreadsheet: Add toolbar actions to change the cell styleMarco Santos
2022-09-09Spreadsheet+LibGUI: Set EmojiInputDialog as a CaptureInput modalthankyouverycool
This has two advantages: First the picker no longer changes the active window state of its parent. Visually this is an additional hint that the dialog is "fragile" and will close on loss of focus. Second, because it contains a search box, its own input won't be preempted by global application shortcuts when typing (pending #15129). This is a problem in apps like PixelPaint which use shortcuts without modifiers.
2022-09-08Spreadsheet: Add Insert Emoji actionelectrikmilk
This adds the Insert Emoji action to Spreadsheet.
2022-09-05LibUnicode+Userland: Migrate generated CLDR data to LibLocaleDataTimothy Flynn
Currently, LibUnicodeData contains the generated UCD and CLDR data. Move the UCD data to the main LibUnicode library, and rename LibUnicodeData to LibLocaleData. This is another prepatory change to migrate to LibLocale.
2022-08-30Applications+DevTools: Remove fixed sizes from Splittersthankyouverycool
And adjust some GML properties. Since a808cfa, splitters grow opportunistically. Setting them to fixed sizes now quite literally fixes them in place. Fixes immovable splitters missed in the aforementioned commit.
2022-08-28LibJS: Turn initialize_global_object() into a regular initialize()Linus Groh
There's nothing special about global object initialization anymore, this can just work the same way as for any other object now.
2022-08-27LibJS: Move intrinsics to the realmLinus Groh
Intrinsics, i.e. mostly constructor and prototype objects, but also things like empty and new object shape now live on a new heap-allocated JS::Intrinsics object, thus completing the long journey of taking all the magic away from the global object. This represents the Realm's [[Intrinsics]] slot in the spec and matches its existing [[GlobalObject]] / [[GlobalEnv]] slots in terms of architecture. In the majority of cases it should now be possibly to fully allocate a regular object without the global object existing, and in fact that's what we do now - the realm is allocated before the global object, and the intrinsics between both :^)
2022-08-26SpreadSheet: Pass parent window when constructing About actionthankyouverycool
Fixes About dialog not blocking the app's main window.
2022-08-25Applications: Use modeless windows in some appsthankyouverycool
Browser, Spreadsheet and Charactermap now open child windows modelessly.
2022-08-25LibGUI+WindowServer+Apps: Replace Accessory Windowsthankyouverycool
with the CaptureInput WindowMode. This mode will serve the same function as accessories: redirecting input while allowing parent windows to remain active.
2022-08-23LibJS: Remove {Bytecode::,}Interpreter::global_object()Linus Groh
The basic idea is that a global object cannot just come out of nowhere, it must be associated to a realm - so get it from there, if needed. This is to enforce the changes from all the previous commits by not handing out global objects unless you actually have an initialized realm (either stored somewhere, or the VM's current realm).
2022-08-23LibJS+LibWeb: Reduce use of GlobalObject as an intermediaryLinus Groh
- Prefer VM::current_realm() over GlobalObject::associated_realm() - Prefer VM::heap() over GlobalObject::heap() - Prefer Cell::vm() over Cell::global_object() - Prefer Wrapper::vm() over Wrapper::global_object() - Inline Realm::global_object() calls used to access intrinsics as they will later perform a direct lookup without going through the global object
2022-08-23LibJS: Pass Realm to define_native_{accessor,function}()Linus Groh
This is needed so that the allocated NativeFunction receives the correct realm, usually forwarded from the Object's initialize() function, rather than using the current realm.
2022-08-23LibJS: Pass Realm to GlobalObject::initialize_global_object()Linus Groh
Global object initialization is tightly coupled to realm creation, so simply pass it to the function instead of relying on the non-standard 'associated realm' concept, which I'd like to remove later. This works essentially the same way as regular Object::initialize() now. Additionally this allows us to forward the realm to GlobalObject's add_constructor() / initialize_constructor() helpers, so they set the correct realm on the allocated constructor function object.
2022-08-23LibJS: Remove GlobalObject parameter from native functionsLinus Groh
2022-08-23LibJS: Replace GlobalObject with VM in common AOs [Part 18/19]Linus Groh
2022-08-23LibJS: Replace GlobalObject with VM in Value AOs [Part 4/19]Linus Groh
This is where the fun begins. :^)
2022-08-23LibJS: Remove GlobalObject from VM::this_value()Linus Groh
This is a continuation of the previous six commits. The global object is only needed to return it if the execution context stack is empty, but that doesn't seem like a useful thing to allow in the first place - if you're not currently executing JS, and the execution context stack is empty, there is no this value to retrieve.
2022-08-23LibJS: Remove GlobalObject from VM::throw_completion()Linus Groh
This is a continuation of the previous five commits. A first big step into the direction of no longer having to pass a realm (or currently, a global object) trough layers upon layers of AOs! Unlike the create() APIs we can safely assume that this is only ever called when a running execution context and therefore current realm exists. If not, you can always manually allocate the Error and put it in a Completion :^) In the spec, throw exceptions implicitly use the current realm's intrinsics as well: https://tc39.es/ecma262/#sec-throw-an-exception
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in Heap::allocate<T>()Linus Groh
This is a continuation of the previous three commits. Now that create() receives the allocating realm, we can simply forward that to allocate(), which accounts for the majority of these changes. Additionally, we can get rid of the realm_from_global_object() in one place, with one more remaining in VM::throw_completion().
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in create() functionsLinus Groh
This is a continuation of the previous two commits. As allocating a JS cell already primarily involves a realm instead of a global object, and we'll need to pass one to the allocate() function itself eventually (it's bridged via the global object right now), the create() functions need to receive a realm as well. The plan is for this to be the highest-level function that actually receives a realm and passes it around, AOs on an even higher level will use the "current realm" concept via VM::current_realm() as that's what the spec assumes; passing around realms (or global objects, for that matter) on higher AO levels is pointless and unlike for allocating individual objects, which may happen outside of regular JS execution, we don't need control over the specific realm that is being used there.
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in initialize() functionsLinus Groh
This is a continuation of the previous commit. Calling initialize() is the first thing that's done after allocating a cell on the JS heap - and in the common case of allocating an object, that's where properties are assigned and intrinsics occasionally accessed. Since those are supposed to live on the realm eventually, this is another step into that direction.
2022-08-23LibJS+LibWeb: Replace GlobalObject with Realm in object constructorsLinus Groh
No functional changes - we can still very easily get to the global object via `Realm::global_object()`. This is in preparation of moving the intrinsics to the realm and no longer having to pass a global object when allocating any object. In a few (now, and many more in subsequent commits) places we get a realm using `GlobalObject::associated_realm()`, this is intended to be temporary. For example, create() functions will later receive the same treatment and are passed a realm instead of a global object.
2022-08-15LibJS: Use NaN boxing to decrease the memory size of Valuesdavidot
Using the fact that there are 2^52-2 NaN representations we can "NaN-box" all the Values possible. This means that Value no longer has an explicit "Type" but that information is now stored in the bits of a double. This is done by "tagging" the top two bytes of the double. For a full explanation see the large comment with asserts at the top of Value. We can also use the exact representation of the tags to make checking properties like nullish, or is_cell quicker. But the largest gains are in the fact that the size of a Value is now halved. The SunSpider and other benchmarks have been ran to confirm that there are no regressions in performance compared to the previous implementation. The tests never performed worse and in some cases performed better. But the biggest differences can be seen in memory usage when large arrays are allocated. A simple test which allocates a 1000 arrays of size 100000 has roughly half the memory usage. There is also space in the representations for future expansions such as tuples and records. To ensure that Values on the stack and registers are not lost during garbage collection we also have to add a check to the Heap to check for any of the cell tags and extracting the canonical form of the pointer if it matches.
2022-08-14Base: Launch WebContent at session start-upLucas CHOLLET
2022-08-05LibJS: Let Shape store a Realm instead of a GlobalObjectAndreas Kling
This is a cautious first step towards being able to create JS objects before a global object has been instantiated.
2022-07-12Everywhere: Replace single-char StringView op. arguments with charssin-ack
This prevents us from needing a sv suffix, and potentially reduces the need to run generic code for a single character (as contains, starts_with, ends_with etc. for a char will be just a length and equality check). No functional changes.
2022-07-12Everywhere: Add sv suffix to strings relying on StringView(char const*)sin-ack
Each of these strings would previously rely on StringView's char const* constructor overload, which would call __builtin_strlen on the string. Since we now have operator ""sv, we can replace these with much simpler versions. This opens the door to being able to remove StringView(char const*). No functional changes.
2022-07-12Everywhere: Explicitly specify the size in StringView constructorssin-ack
This commit moves the length calculations out to be directly on the StringView users. This is an important step towards the goal of removing StringView(char const*), as it moves the responsibility of calculating the size of the string to the user of the StringView (which will prevent naive uses causing OOB access).
2022-06-30Spreadsheet: Make conditional-formatting condition-list scrollableFrHun
2022-06-30Spreadsheet: Use new layout systemFrHun
2022-06-26Spreadsheet: Display a detailed view of a cell error on hoverAli Mohammad Pur
With this, Spreadsheet can now show an almost full stack trace for the error (which is infintely better than just the error message).
2022-06-26Spreadsheet: Allow importing sheets into an existing workbookAli Mohammad Pur
2022-06-26Spreadsheet: Throw if lookup value doesn't exist and no default is givenAli Mohammad Pur
And explicitly state which value wasn't found and where in the error.
2022-06-26Spreadsheet: Make it possible to refer to ranges in other sheetsAli Mohammad Pur
Now the range A0:C4 in a sheet named "foo" can be represented as: R`sheet("foo"):A0:C4` This makes it possible to do cross-sheet lookups and more.
2022-06-26Spreadsheet: Prevent OOB access to text editor bufferAli Mohammad Pur
For some reason LibGUI sends two events for each edit, and one of them contains an OOB cursor if a character was deleted. This works around that for now.
2022-06-10LibGUI: Add layout spacer support to GMLFrHun
This is a bit of a hack, but it is an easy way to finally get spacers into GML. This will translate well if spacers are later to become child objects of the continer widget.
2022-05-29Everywhere: Fix a bunch of typosLinus Groh
2022-05-26Userland: Depend some applications on WebContent if it's being usedKarol Kosek
Deduced this mostly by looking at unveil()s.
2022-05-24Spreadsheet: Make save functions take a Core::File instead of a filenameKarol Kosek
This allows us to use FileSystemAccessClient functions.
2022-05-24Spreadsheet: Open files using FileSystemAccessClient::try_open_file()Karol Kosek
2022-05-24Spreadsheet: Remove unused Workbook::load() functionKarol Kosek
2022-05-24Spreadsheet: Use TRY() on file load and saveKarol Kosek
2022-05-22Spreadsheet: Recognize sheets files by mime type, not by file extensionKarol Kosek
These conditions weren't executed since 933a717f3b and always showed a file import/export wizard.
2022-05-15LibWebView: Move OutOfProcessWebView to a new LibWebView libraryDexesTTP
Also moves WebContentClient and the references to the generated IPC descriptions, since they are all components of OutOfProcessWebView. This patch has no functional changes.
2022-05-13LibGUI+Userland: Make Dialog::ExecResult an enum classSam Atkins
2022-04-18Spreadsheet: Sort functions by name in the help windowEli Youngs
2022-04-18Userland: Always construct Application with try_create()Sam Atkins