summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-08-24LibGUI: Pressing Return in an editable TableView should begin editingAndreas Kling
This matches what happens when you double-click on a cell.
2020-08-24LibGUI: Return focus to view when stopping editingAndreas Kling
If the editing widget (as provided by the editing delegate) was focused when editing stops, have the view take back focus.
2020-08-24LibGUI: Always update() after changing AbstractView sort column/orderAndreas Kling
Otherwise we may end up with a stale appearance until something else causes it to repaint.
2020-08-24LibGUI: Allow moving the TableView selection horizontally with keyboardAndreas Kling
2020-08-24LibGUI: Add AbstractTableView::scroll_into_view(ModelIndex, bool, bool)Andreas Kling
This API lets you specify whether to scroll horizontally, vertically, or both.
2020-08-24Spreadsheet: Add back the menubarAnotherTest
2020-08-24Spreadsheet: Fix crash when a row number is selectedAnotherTest
2020-08-24Spreadsheet: Avoid crashing when a cell is created mid-updateAnotherTest
To reproduce: - make sure A0, A1, A2 do not exist (i.e. have not been selected or written to) - select A0 - type in =A1+A2 - see crash
2020-08-24Spreadsheet: Add a syntax highlighter to the cell editorAnotherTest
2020-08-24LibC: Remove unused data member in the qsort() implementationAndreas Kling
2020-08-24SystemMonitor: Tweak processor feature display a little bitAndreas Kling
Flatten the CPU features array instead of showing it as raw JSON data.
2020-08-24LibWeb: Move OutOfProcessWebView into the Web namespaceAnotherTest
2020-08-24LibGUI: Calculate the text rect correctly in AbstractTableViewAnotherTest
This fixes the misalignments when a header is not left-aligned.
2020-08-24Spreadsheet: Reformat the runtime file to comply with js standardsAnotherTest
2020-08-24Meta: Move prettier config files to the root of the repositoryAnotherTest
2020-08-24Spreadsheet: Document runtime functions and add a help windowAnotherTest
...that can automatically generate documentation pages from the objects.
2020-08-24Spreadsheet: Add a topbar with a text editorAnotherTest
2020-08-24Spreadsheet: Start making a spreadsheet applicationAnotherTest
2020-08-24AK: Add URL::create_with_data() to create data URLsAnotherTest
2020-08-24LibGUI: Make AbstractTableView and TableView more customisableAnotherTest
This patchset adds a few getters/setters to AbstractTableView to make its looks more customisable: - Header width & text alignment - Default column width - Ability to disable selected row highlighting
2020-08-24LibJS: Make Date.getUTCSeconds() call through to LibCNico Weber
The tzset documentation says that TZ allows a per-second local timezone, so don't be needlessly clever here. No observable behavior difference at this point, but if we ever implement tzset, this will have a small effect.
2020-08-24LibJS: Make Date's tuple constructor correctly handle out-of-range argumentsNico Weber
Milliseconds need extra handling, but everything else just works now that mktime() handles this case.
2020-08-24LibCore: Make DateTime::create() and set_time() handle out-of-range valuesNico Weber
Set member variables after calling mktime(), which canonicalizes out-of-range values. With this, DateTime::create(2020, 13, ...) will return a DateTime on Jan 2021 (assuming the other parameters are in range).
2020-08-24LibCore: Less code duplication in DateTimeNico Weber
DateTime::create() an just call DateTime::set_time(). No behavior change.
2020-08-24LibC: Make mktime() / gmtime() more POSIX-compliantNico Weber
mktime() is supposed to fill in tm_wday and tm_yday, and it it's supposed to canonicalize out-of-range values (that is, "Jan 31" is turned into "Feb 1"). Instead of making the straightfoward tm_to_time() implementation more complicated, just make it call time_to_tm() once the timestamp is computed to break it back down ot (canonical) tm entries.
2020-08-24LibJS+LibC: Add tests for Date tuple ctor overflow and make ↵Nico Weber
mktime()/timegm() handle month overflow
2020-08-24Meta+Userland: Run the TLS test tooAnotherTest
While this _does_ add a point of failure, it'll be a pretty bad day when google goes down. And this is unlikely to put a (positive) dent in their incoming requests, so let's just roll with it until we have our own TLS server.
2020-08-24Userland: Add missing HMAC-SHA1 testsAnotherTest
2020-08-24LibTLS: Fix some debug loggingAnotherTest
2020-08-24LibTLS: Do not process_message() the finished message twiceAnotherTest
With two different sequence numbers to boot! Fixes #3273
2020-08-24Tests: Prefer strlcpy over strncpyBen Wiederhake
Because it looks nicer.
2020-08-24Userland: Prefer strlcpy over strcpy in pingBen Wiederhake
This is supposed to serve as a reminder if and when someone decides to make the 'msg' field configurable.
2020-08-24Userland: Prefer strlcpy over strncpy in ifconfig, fixes off-by-oneBen Wiederhake
A malicious caller of ifconfig could have caused the ifr_name field to lack NUL-termination. I don't think this was an actual problem, though, as the Kernel always forces NUL-termination by overwriting ifr_name's last byte with NUL. However, it feels better to do it properly.
2020-08-24DHCPClient: Prefer strlcpy over strncpy, fixes off-by-oneBen Wiederhake
A malicious caller of set_params could have caused the ifr_name field to lack NUL-termination. I don't think this was an actual problem, though, as the Kernel always forces NUL-termination by overwriting ifr_name's last byte with NUL. However, it feels better to do it properly. No behaviour change (probably).
2020-08-24LibCore: Prefer strlcpy over strncpy, fix overflowBen Wiederhake
A malicious caller can create a SocketAddress for a local unix socket with an over-long name that does not fit into struct sock_addr_un. - Socket::connet: This caused the 'sun_path' field to overflow, probably overwriting the return pointer of the call frame, and thus crashing the process (in the best case). - SocketAddress::to_sockaddr_un: This triggered a RELEASE_ASSERT, and thus crashing the process. Both have been fixed to return a nice error code instead of crashing.
2020-08-24LibC: Prefer strlcpy over strcpy/strncpyBen Wiederhake
All of these are cosmetic (I believe). Furthermore, they serve as reminders to always check the length of the destination buffers.
2020-08-24LibC: Prefer strlcpy over strcpy in getgrent(), fix overflowBen Wiederhake
An overlong group name in /etc/groups would have caused getgrent() to overflow the global __grdb_entry. Curiously, overflow *within* __grdb_entry seems to have no detrimental effects. However, it was possible for a malicious sysadmin(?!) to craft an /etc/group that overflows outside of the page allocated for __grdb_entry thus crash the calling process. This affected at least SystemServer and su. Now, the group name will be simply truncated. For display purposes, this is fine. In case there is an exceptionally long group, it will not be properly recognized. Also, a malicious /etc/groups might cause the caller of getgrent() to become confused, but that is unavoidable.
2020-08-24LibC: Fix strftime() for max_size=0Ben Wiederhake
Before, strftime unintentionally interpreted 0 as 'unlimited'. The specification of strftime says no such thing. Now, it properly returns 0 in that case (because the NUL byte doesn't fit).
2020-08-24LibC: Implement strlcpyBen Wiederhake
2020-08-24LibC: Stub and test strlcpyBen Wiederhake
2020-08-24Kernel: Remove strcpy()Ben Wiederhake
These are not called in the kernel or by libstdc++ anyway. Remove the tempting function, and prevent future overflows.
2020-08-24LibC: Prevent slowness and overrun in strdup/strndupBen Wiederhake
strdup: Because the length is already known at the time of copying, there is no need to use strcpy (which has to check every single byte, and thus tends to be slower than memcpy). strndup: If 'str' is not NUL-terminated, strndup used to run off into the adjacent memory region. This can be fixed by using the proper strlen variant: strnlen.
2020-08-24AK: Document that String{,Impl} contains NUL-terminatorBen Wiederhake
2020-08-24Tests: Remove unused includeBen Wiederhake
2020-08-24AK: Remove redundant declaration in String.cppBen Wiederhake
It already includes AK/Memory.h, which includes Kernel/StdLib.h, which. declares strstr().
2020-08-24LibGUI: Fix an unsightly pixel glitch in bottom-side tabsAndreas Kling
2020-08-23SystemMonitor: Use bottom-side tabs for the per-process info tabsAndreas Kling
Let's try this out and see how it feels! :^)
2020-08-23LibGUI+LibGfx: Implement upside-down appearance for bottom-side tabsAndreas Kling
GUI::TabWidget has long has a TabPosition::Bottom option, but we still rendered the tab buttons the same as TabPosition::Top. This patch implements a custom look for bottom-side tabs. I've done my best to match the look of the top-side ones, but there might be some improvements we can make here. :^)
2020-08-23Base: Add ThemeEditor.afLinus Groh
2020-08-23LibJS: Implement Date.getUTC*Nico Weber
Test files created with: $ for f in Libraries/LibJS/Tests/builtins/Date/Date.prototype.get*js; do cp $f $(echo $f | sed -e 's/get/getUTC/') ; done $ rm Libraries/LibJS/Tests/builtins/Date/Date.prototype.getUTCTime.js $ git add Libraries/LibJS/Tests/builtins/Date/Date.prototype.getUTC*.js $ ls Libraries/LibJS/Tests/builtins/Date/Date.prototype.getUTC*.js | \ xargs sed -i -e 's/get/getUTC/g'