Commit graph

2156 commits

Author SHA1 Message Date
Andreas Kling
6817d0701e TextEditor: Initialize menubar before opening initial file
Otherwise we can't toggle the syntax highlighting actions based on the
opened file (since the actions have not been created yet.)
2021-02-27 11:10:37 +01:00
Andreas Kling
28720e9035 TextEditor: Rename open_sesame() => open_file() 2021-02-27 11:05:39 +01:00
Andreas Kling
b7c66233f6 LibVT: Make VT::Line use a Vector for storage
This is preparation for non-destructive terminal resizing which will
require more dynamic storage for lines.
2021-02-27 09:23:06 +01:00
speles
c58570ebaf LibGUI: Make empty TextRange invalid
Having TextRange which is empty doesn't make any sense. So it confuses
the functions that rely on having valid range, and causes them to do
no action.
Fixes #5341
2021-02-27 07:58:09 +01:00
Nick Vella
2b9098f540 WidgetGallery: add a simple Wizard demo :^)
The sample Wizard subclasses WizardDialog and demonstrates a front and
back cover, as well as extracting user input from a Wizard page to
display in the interface which spawned the Wizard.
2021-02-27 07:31:55 +01:00
Nick Vella
e241dba8d3 LibGUI: add a rudimentary framework for Wizards.
This patch provides the basic components needed for developers to create
consistent wizard interface experiences in their applications.
`WizardDialog` provides the dialog frame for the wizard, handling navigation
and presentation.
`AbstractWizardPage`s form the base class of Wizard pages, which are
pushed onto the `WizardDialog` page stack via `WizardDialog::push_page`.
`CoverWizardPage` and `WizardPage` are provided to ease the creation of
Wizard interfaces consistent with the Serenity visual language.
2021-02-27 07:31:55 +01:00
AnotherTest
610cec6e72 LibJS: Enable the BrowserExtended ECMA262 regexp flag by default
Fixes #5517.
2021-02-27 07:31:01 +01:00
AnotherTest
e0ac85288e LibRegex: Allow missing high bound in {x,y} quantifiers
Fixes #5518.
2021-02-27 07:31:01 +01:00
AnotherTest
91bf3dc7fe LibRegex: Match the escaped part of escaped syntax characters
Previously, `\^` would've matched `\`, not `^`.
2021-02-27 07:31:01 +01:00
AnotherTest
f05e518cbc LibRegex: Implement section B.1.4. of the ECMA262 spec
This allows the parser to deal with crazy patterns like the one
in #5517.
2021-02-27 07:31:01 +01:00
Luke
ce5fe2a6e8 LibGfx: Fix read buffer overflow in interlaced GIF decode
Unfortunately 10420dee7e didn't quite fix it,
as the buffer overflow was actually happening here:
af22204488/Userland/Libraries/LibGfx/GIFLoader.cpp (L402)

Found by oss-fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=30507
2021-02-27 07:30:39 +01:00
Itamar
85ea60b7f1 LibCpp: Don't fail when encountering #elif statements
However, we currently always treat the expression in #elif as true.
2021-02-26 21:14:41 +01:00
Itamar
e20cd1d8db LanguageServers/Cpp: Don't VERIFY that a file could be found
... when creating a new DocumentData
2021-02-26 21:14:41 +01:00
Linus Groh
e265054c12 Everywhere: Remove a bunch of redundant 'AK::' namespace prefixes
This is basically just for consistency, it's quite strange to see
multiple AK container types next to each other, some with and some
without the namespace prefix - we're 'using AK::Foo;' a lot and should
leverage that. :^)
2021-02-26 16:59:56 +01:00
speles
be9df404fd LibJS: Re-enable "reassignment to const" test
It passes now :^)
2021-02-26 16:59:37 +01:00
speles
f7d64e9fa8 LibJS: Set declared for-in and for-of variables as first time.
These declarations might be const, and now when we're handling it
properly, we have to set values to them correctly.
2021-02-26 16:59:37 +01:00
speles
913fd8de13 LibJS: Respect declaration kind for variables inside functions 2021-02-26 16:59:37 +01:00
Andreas Kling
79889ef052 LibELF: Consolidate main executable loading a bit
Merge the load_elf() and commit_elf() functions into a single
load_main_executable() function that takes care of both things.

Also split "stage 3" into two separate stages, keeping the lazy
relocations in stage 3, and adding a stage 4 for calling library
initialization functions.

We also make sure to map the main executable before dealing with
any of its dependencies, to ensure that non-PIE executables get
loaded at their desired address.
2021-02-26 14:49:55 +01:00
Andreas Kling
1318b9391d disk_benchmark: Modernize this code a little bit
Use the new formatting helpers and such.
2021-02-26 14:05:18 +01:00
thankyouverycool
042152b346 LibGUI: Set correct open action for LinkLabel context menu
Replaces the Open... common action for files with more appropriate
Show in File Manager, as the desktop context menu uses
2021-02-26 13:50:00 +01:00
thankyouverycool
885c17b583 HackStudio: Set correct icons, text and location in menus
Adds correct icon to New Project, moves Wrapping Mode to more
traditional View, and truncates overly verbose Project entries
2021-02-26 13:50:00 +01:00
thankyouverycool
1723eac40f TextEditor: Fix passing null parent to AboutDialog
Refactors menubar creation to avoid passing a null parent window
to AboutDialog during construction. Fixes #5177 in part
2021-02-26 13:50:00 +01:00
thankyouverycool
2481dbcc41 Terminal: Remove unnecessary ellipses and capitalize name in menu 2021-02-26 13:50:00 +01:00
thankyouverycool
132ca7e37b Spreadsheet: Merge File menu into 'Spreadsheet' app menu
This is the common convention among the other apps. Also remove
a superfluous separator
2021-02-26 13:50:00 +01:00
thankyouverycool
a2e935e7a2 HexEditor: Fix nullptr pass to AboutDialog and clean up menus
Refactors menubar creation to avoid a null parent window during
construction; moves search options to the more traditional edit
menu; creates and exclusive action group for bytes per row

Fixes #5177 in part
2021-02-26 13:50:00 +01:00
thankyouverycool
fb5cdc670f Browser: Add Go menu and move Bookmarks bar toggle to View 2021-02-26 13:50:00 +01:00
Jelle Raaijmakers
9473c694dc Spreadsheet: Fix cell identifier label
Commit 6a6f19a72 broke the cell position display in the top left of the
Spreadsheet window and the title of the cell type dialog, causing the
application to crash when interacting with cells beyond column FE.
2021-02-25 23:32:22 +01:00
thankyouverycool
0c4fbcae76 LibGUI: Paint all widgets as toolbars in ToolBarContainer
Fixes missing shadow and highlight threeds for Bookmark bar
2021-02-25 19:23:12 +01:00
Tom
6cdb657493 LibGUI: Improve IconView rubberband performance
Rather than invalidating the entire window, which is very expensive on
the transparent desktop widget, just invalidate the areas that actually
need updating.
2021-02-25 18:04:06 +01:00
Tom
cd0a1fa5b0 LibGUI: Avoid needlessly copying vectors of rects 2021-02-25 18:04:06 +01:00
Tom
3907bacfcd LibGUI: Process pending invalidations when handling paint events
It's possible that pending invalidation rectangles haven't been
flushed when processing a paint event. Handle them right away,
which avoids another round trip.
2021-02-25 18:04:06 +01:00
Tom
35170715bc LibGUI: Constrain widgets to invalidating themselves only 2021-02-25 18:04:06 +01:00
Andreas Kling
eb08a0edd5 LibC: Make it compile on 64-bit
It won't actually work on 64-bit yet, but let's do our future selves
a favor and make it compile.
2021-02-25 16:27:12 +01:00
Andreas Kling
8714f389f9 LibC: Add x86_64 implementation of setjmp() and longjmp() 2021-02-25 16:27:12 +01:00
Morc - Richard Gráčik
edf9d07d3f FileManager: change icon for Show in File Manager
A small detail to match with the new File Manager icon in context menu. :^)
2021-02-25 08:50:25 +01:00
thankyouverycool
4ebfdfdc05 Base: Update some icons for color, quality and consistency
And remove unused filetypes
2021-02-25 08:08:26 +01:00
thankyouverycool
42717b5b79 Base: Add new icons for fonts and File Manager 2021-02-25 08:08:26 +01:00
Andreas Kling
bb9cf083c4 LibC: Avoid double memory clearing in calloc()
calloc() was internally calling malloc_impl() which would scrub out
all the allocated memory with the scrub byte (0xdc). We would then
immediately zero-fill the memory.

This was obviously a waste of time, and our hash tables were doing
it all the time. :^)
2021-02-24 23:03:38 +01:00
Angus Gibson
0c44deeee2 LibGUI: Let cursor start a wrapped line
In line wrapping mode, the same column refers both to the end of a
visual line and the beginning of the subsequent visual line. This
meant that the cursor couldn't move to the beginning of a visual
line. Now, we only let the cursor go to the end of a physical line,
not the visual line.

Closes #4786
2021-02-24 22:30:08 +01:00
Angus Gibson
ae51dea524 LibGUI: Remove redundant cursor update 2021-02-24 22:30:08 +01:00
Brendan Coles
9bc3c3c962 Calculator: Add support for copy+paste using system clipboard 2021-02-24 22:01:37 +01:00
AnotherTest
ecc8e99a6b LibGUI: Account for the row and column headers when painting a TableView
Otherwise we'd be drawing all the rows, instead of the ones in view.
Fixes #5483.
2021-02-24 21:02:02 +01:00
AnotherTest
6a6f19a72f Spreadsheet: Store the column index in a Position instead of its name
This will make constructing (and destructing) Positions a lot cheaper
(as it no longer needs to ref() and unref() a String).
Resulted from #5483, but doesn't fix it.
2021-02-24 21:02:02 +01:00
Brendan Coles
0ffc06b795 Profiler: Add help documentation 2021-02-24 20:40:00 +01:00
Andreas Kling
7db8ccc0e4 LibC+DynamicLoader: Move "transactional memory" GCC stubs to LibC
Instead of having a special case in the dynamic loader where we ignore
TM-related GCC symbols, just stub them out in LibC like we already do
for various other things we don't support.
2021-02-24 14:54:26 +01:00
Brian Gianforcaro
069fd58381 LibELF: Convert more string literals to StringView literals.
Most of these won't have perf impact, but the optimization is
practically free, so no harm in fixing these up.
2021-02-24 14:45:34 +01:00
Brian Gianforcaro
141e6724d1 LibELF: Use StringView literal syntax to build section names. 2021-02-24 14:38:31 +01:00
AnotherTest
857cdee0d0 AK: Make dbgln_if() avoid evaluating the arguments when disabled
Naturally, this makes the `enabled` flag on dbgln() obsolete.
2021-02-24 13:07:28 +01:00
AnotherTest
71de5433f8 LibLine: Note that the search() call modifies the buffer
Fixes #5465.
2021-02-24 12:19:20 +01:00
AnotherTest
dd87b14f52 LibLine: Update the drawn cursor value when updating lazily 2021-02-24 12:19:20 +01:00