summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-09-20LibWeb: Add Bindings::ScriptExecutionContextAndreas Kling
This will be inherited by documents and workers, to provide a common abstraction for script execution. (We don't have workers yet, but we might as well make this little space for them now to simplify things down the road.)
2020-09-20LibJS: Remove some unnecessary indirection in Object constructorsAndreas Kling
2020-09-20LibJS: Make Interpreter::in_strict_mode() work outside of scopeAndreas Kling
This one is a little weird. I don't know why it's okay for this function to assume that there is a current scope on the scope stack when it can be called during global object initialization etc. For now, just make it say "we are in strict mode" when there is no currently active scope.
2020-09-20LibJS: Don't allocate property table during GC marking phaseAndreas Kling
Shape was allocating property tables inside visit_children(), which could cause garbage collection to happen. It's not very good to start a new garbage collection while you are in the middle of one already.
2020-09-20LibJS: Remove unused argument in NativeFunction constructorAndreas Kling
2020-09-20LibGUI: Fix row_rect(int) calculation in AbstractTableViewItamar
Previously, it didn't take into account the visibility of column headers.
2020-09-19LibGfx: Move vertically centered text down slightly based on baselineAndreas Kling
To make slightly more aesthetically pleasing use of the vertical space, we now move all vertically centered text lines down by half the amount of space below the font's baseline. This is probably not the "correct" way to do this, but it does make things look nicer with some of our fonts already.
2020-09-19LibGfx: Add a helper to check if a TextAlignment is vertically centeredAndreas Kling
2020-09-19LibGfx+FontEditor+Base: Add "baseline" value to all fontsAndreas Kling
This does nothing at the moment but will soon allow us to improve the vertical positioning of text.
2020-09-19LibGUI: Increase slider acceleration with Ctrl (#3499)Jakob-Niklas See
When holding Ctrl and scrolling on a slider widget, the scrolling acceleration gets increased. This can make it faster to get to the knob location you want to get to. :^)
2020-09-19LibJS: Handle getter exception in JSONObject::serialize_json_property()Linus Groh
In the case of an exception in a property getter function we would not return early, and a subsequent attempt to call the replacer function would crash the interpreter due to call_internal() asserting. Fixes #3548.
2020-09-19LibJS: Do not revisit already visited values in update_function_name()AnotherTest
Fixes #3471, adds a test.
2020-09-18LibGUI: Add TreeView::expand_all_parents_of(ModelIndex)Andreas Kling
This does exactly what it sounds like. :^)
2020-09-18LibGUI: Unbreak FileSystemModel::index(path) after virtual root changesAndreas Kling
Now that the "/" directory can have a (virtual) parent index, we need to account for that when converting a full path to a model index.
2020-09-18iLibGUI+Base: Show inaccessible directories with special icon in viewsAndreas Kling
2020-09-18LibGUI: FileSystemModel should provide full paths to FileIconProviderAndreas Kling
This will allow FileIconProvider to check additional things about the specified path. (We previously only had access to the basename.)
2020-09-18LibGUI: StackWidget should not steal focus when switching active childAndreas Kling
Only focus the new active child if the old one had focus previously.
2020-09-18LibJS: Simplify toEval() implementationLinus Groh
2020-09-18LibJS: Add FIXMEs for parsing increment operators with function LHS/RHSLinus Groh
The parser considers it a syntax error at the moment, other engines throw a ReferenceError during runtime for ++foo(), --foo(), foo()++ and foo()--, so I assume the spec defines this.
2020-09-18LibJS: Mark more ASTNode classes as `final`Linus Groh
2020-09-17Kernel+LibC+UserspaceEmulator: Add SO_TIMESTAMP, and cmsg definitionsNico Weber
When SO_TIMESTAMP is set as an option on a SOCK_DGRAM socket, then recvmsg() will return a SCM_TIMESTAMP control message that contains a struct timeval with the system time that was current when the socket was received.
2020-09-17LibC: Convert SO_ constants to enumNico Weber
I want to add another entry to this list and don't want to have to think of a number for it.
2020-09-17Kernel+LibC+UserspaceEmulator: Mostly add recvmsg(), sendmsg()Nico Weber
The implementation only supports a single iovec for now. Some might say having more than one iovec is the main point of recvmsg() and sendmsg(), but I'm interested in the control message bits.
2020-09-17LibGUI: Set ProcessChooser key column and sort order after set_model (#3521)Uma Sankar
Need to set the sort order after model was set to sort the table.
2020-09-17LibGUI: Respect the previously selected sort order in HeaderView (#3522)Uma Sankar
Instead of forcefully setting the sort order to Ascending upon column sort, setting it to the previously selected sort order
2020-09-17LibIPC: Check if socket is still open before using socket descriptorTom
Writing to the socket may trigger a close of the socket descriptor if a disconnect was detected. We need to check if it is still valid when waiting for a response after attempting to send a synchronous message. Fixes #3515
2020-09-17LibGUI: Don't recalcuate color from hue if it was not set by huePeter Elliott
Basically, setting the hue is numerically sensitive when the value or saturation are low.
2020-09-17LibGUI: Don't allow 4 character html color codes in GUI::ColorPickerPeter Elliott
When 4 character colors were allowed, backspace misbehaved and you couldn't backspace the whole color.
2020-09-16LibGUI: Use FileIconProvider in the FilePicker dialogAndreas Kling
2020-09-16LibGUI+Base: Add a hard-disk icon and use it for the path "/"Andreas Kling
2020-09-16LibGUI: Allow FileSystemModel to be rooted one level above "/"Andreas Kling
You can now construct a FileSystemModel with a null String() as the root path. This will root it one level above "/" which makes the root directory itself selectable as a child. This will be useful in some places, e.g the FileManager application.
2020-09-16LibCore: Add missing .characters() for String::format.asynts
2020-09-16LibCore: Add find_executable_in_path.asynts
2020-09-16LibIPC: Disable Notifier before closing socketTom
Because we're closing a file descriptor, we need to disable any Notifier that is using it so that the EventLoop does not use invalid file descriptors. Fixes #3508
2020-09-16LibCore: Add Notifier::closeTom
If a file descriptor is being closed, we need to permanently disable any Notifier and remove it from the event loop. This method removes the notifier and disables it so that the EventLoop does not use a invalid file descriptor.
2020-09-16LibGUI: Double-clicking on a TreeView item should set cursorAndreas Kling
Don't just set the selection, set the cursor.
2020-09-16LibGUI: Fix TreeView scrolling to top when clicking sub-itemsAndreas Kling
This code was confusing two different versions of scroll_into_view that were getting mixed up due to member function shadowing. Adding an "override" to the subclass declaration exposed the problem. With this fixed, we no longer lose our scroll position wildly when using the mouse to select TreeView items.
2020-09-15LibCore: Make Core::Object properties more dynamicAndreas Kling
Instead of everyone overriding save_to() and set_property() and doing a pretty asymmetric job of implementing the various properties, let's add a bit of structure here. Object properties are now represented by a Core::Property. Properties are registered with a getter and setter (optional) in constructors. I've added some convenience macros for creating and registering properties, but this does still feel a bit bulky. We'll have to iterate on this and see where it goes.
2020-09-15LibDiff: Add library for working with diffsItamar
LibDiff currently contains functionality for parsing diffs in the "unified format" and for a generating simple diff that contains only additions.
2020-09-15HackStudio: Add basic Git integrationItamar
This adds a "Git" tab to Hackstudio. Currently has support for staging and unstaging files.
2020-09-15LibCore: Add command() utility functionsItamar
Add utility functions for executing commands and getting their output.
2020-09-15LibGUI: Fix to ComboBox fields activationpkotzbach
2020-09-15AK: Remove OutputMemoryStream for DuplexMemoryStream.asynts
OutputMemoryStream was originally a proxy for DuplexMemoryStream that did not expose any reading API. Now I need to add another class that is like OutputMemoryStream but only for static buffers. My first idea was to make OutputMemoryStream do that too, but I think it's much better to have a distinct class for that. I originally wanted to call that class FixedOutputMemoryStream but that name is really cumbersome and it's a bit unintuitive because InputMemoryStream is already reading from a fixed buffer. So let's just use DuplexMemoryStream instead of OutputMemoryStream for any dynamic stuff and create a new OutputMemoryStream for static buffers.
2020-09-15LibLine: Implement ctrl-del: It does the same thing as alt-d, delete-wordNico Weber
2020-09-15LibVT: Use xterm modifier scheme for tilde keys tooNico Weber
2020-09-15LibLine: Support Alt + Arrow left/rightNico Weber
It does the same thing as Ctrl + Arrow left/right: Wordwise movement.
2020-09-15LibVT+LibLine: Use `1;mods` CSI parameters for ctrl/alt/shift-arrow keysNico Weber
xterms send a bitmask (+ 1) in the 2nd CSI parameter if "special" keys (arrow keys, pgup/down, etc) are sent with modifiers held down. Serenity's Terminal used to send ^[[O, which is a nonexistent escape sequence and a misread of VT100's ^[O (ie the '[' is replaced by 'O'). Since the xterm scheme also supports shift and alt modifiers, switch to that. More flexible, and makes ctrl-left/right and alt-left/right work in SerenityOS's bash port. Also do this for page up/down. No behavior change for SerenityOS's Shell.
2020-09-15LibLine: Parse CSI parameters and immediatesNico Weber
No behavior change, but it makes it easy to handle page up and page down if we wanted to make them do something in libline.
2020-09-14AK: Lower the requirements for InputStream::eof and rename it.asynts
Consider the following snippet: void foo(InputStream& stream) { if(!stream.eof()) { u8 byte; stream >> byte; } } There is a very subtle bug in this snippet, for some input streams eof() might return false even if no more data can be read. In this case an error flag would be set on the stream. Until now I've always ensured that this is not the case, but this made the implementation of eof() unnecessarily complicated. InputFileStream::eof had to keep a ByteBuffer around just to make this possible. That meant a ton of unnecessary copies just to get a reliable eof(). In most cases it isn't actually necessary to have a reliable eof() implementation. In most other cases a reliable eof() is avaliable anyways because in some cases like InputMemoryStream it is very easy to implement.
2020-09-14LibGUI: Minor consistency cleanup in AbstractView::set_cursor() (#3478)pkotzbach