summaryrefslogtreecommitdiff
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-19HackStudio: Move bulk of GUI logic into HackStudioWidgetItamar
Previously, the GUI logic of HackStudio was all stuffed into main(), and it started getting a bit out of hand :)
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-19WindowServer: Shrink menubar menu text rects slightlyAndreas Kling
We don't want the menu titles to cover the entire menubar.
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-19Kernel: Remove unnecessary class member in UHCIControllerLiav A
The m_address member is not needed, since PCI::Device already has one.
2020-09-19Meta: Add .clangd to .gitignoreLinus Groh
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-19Kernel: Fix assertion statement in GenericInterruptHandlerLiav A
We need to assert if interrupts are not disabled when changing the interrupt number of an interrupt handler. Before this fix, any change like this would lead to a crash, because we are using InterruptDisabler in IRQHandler::change_irq_number.
2020-09-19Kernel: Let InodeWatcher track child inode numbers instead of namesAndreas Kling
First of all, this fixes a dumb info leak where we'd write kernel heap addresses (StringImpl*) into userspace memory when reading a watcher. Instead of trying to pass names to userspace, we now simply pass the child inode index. Nothing in userspace makes use of this yet anyway, so it's not like we're breaking anything. We'll see how this evolves.
2020-09-19Kernel: Don't assert when reading too little from an InodeWatcherAndreas Kling
If you provide a buffer that's too small, we'll still dequeue an event and write whatever fits in the provided buffer.
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-19FileManager: Prevent feedback loop between treeview and directory viewAndreas Kling
When opening something in the left-side treeview, it also opens in the right-side directory view. That triggers the "path changed" hook in the directory view, which causes us to fully reveal the opened directory in the left-side treeview. This feedback loop made the UI feel weird since it caused directories to expand just by selecting them in the left-side treeview. So let's break that loop.
2020-09-19Kernel: Simplify ProcFS callbacks by using function pointers directlyTom
2020-09-19UserspaceEmulator: Support all msg_iovlens in recvmsg and sendmsgNico Weber
The kernel doesn't support msg_iovlens != 1 yet and nothing passes an amount != 1, but if anyone ever adds support for this they won't have to worry about ue at least.
2020-09-19Shell: Fix Vector OOB access in `add_entry_to_cache()'AnotherTest
Fixes #3530.
2020-09-19Shell: Make a new session at start if there's no active sessionAnotherTest
2020-09-19LibJS: Do not revisit already visited values in update_function_name()AnotherTest
Fixes #3471, adds a test.
2020-09-19Meta: Add env variable SERENITY_RUN to be able to choose qemu, bochs, etcTom
This allows picking for example bochs: SERENITY_RUN=b ninja run
2020-09-19ResourceGraph: Fix graph line position calculationLinus Groh
The calculation was only taking the rect's inner height, but not its top offset into account. Fixes #3540.
2020-09-19Kernel: Fix KResultOr move semanticsTom
We need to track whether we actually own the storage.
2020-09-19Shell: Do not strip glob base path when it was explicitly requestedAnotherTest
Fixes #3544.
2020-09-18FileManager: Properly reveal newly opened directories in the treeviewAndreas Kling
Use the new TreeView::expand_all_parent_of() API to ensure that newly opened directories are revealed and scrolled-into-view in the left-side treeview. :^)
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-18FileManager: Update GUI when "entering" an inaccessible directoryAndreas Kling
When we enter an inaccessible directory, we still allow that directory to become selected in the left-side treeview, so we need to update the location box and window title to reflect the new current path. This is not perfectly factored and there's a bit of duplication between the model's on_error and on_complete hook callbacks in DirectoryView. Needs more work. :^)
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-18FileManager: Show an inline error message for inaccessible directoriesAndreas Kling
Instead of popping up a message box whenever we can't read an opened directory, show the error message inside the DirectoryView (as a label) instead. This fixes a visual inconsistency where an inaccessible directory would be selected in the left-side treeview while the previous directory's contents were still showing on the right. This also makes keyboard navigation a bit more pleasant since you're not suddenly interrupted by a message box.
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-18FileManager: Remove an unused enum in DirectoryViewAndreas Kling
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-18HackStudio: Only refresh Git widget on save if initializedItamar
2020-09-18Minesweeper: Fix inverted Single-Click Chording settingPeter Elliott
This was introduced by 705cee528a803b1671d16eeaf222d3318708500b, where the '!' was copied from the previous implementation, but the behavior was not
2020-09-17FileManager: Move DirectoryView into the FileManager namespaceAndreas Kling
2020-09-17ntpquery: Use SO_TIMESTAMP to get a more accurate destination_timestampNico Weber
We can now see at which time a packet was received by the network adapter, instead of having to measure user time after receiving the packet in user space. This means the destination timestamp is no longer affected by in-kernel queuing delays, which can be tens of milliseconds when the system is under load. It also means that if ntpquery grows a message queue that waits on replies from several requests, the time used processing one response won't be incorrectly included in the destination timestamp of the next response (in case two responses arrive at the network adapter at roughly the same time). NTP's calculations work better if send and receive latency are about equal, and this only removes in-kernel queue delays and context switch delays for the receiving packet. But the two latencies aren't very equal anyways because $network. Also, maybe we can add another API for setting the send time in the outgoing packet in kernel space right before (or when) hitting the network adapter and use that here too. So this still seems like progress.
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: Plumb packet receive timestamp from NetworkAdapter to Socket::recvfromNico Weber
Since the receiving socket isn't yet known at packet receive time, keep timestamps for all packets. This is useful for keeping statistics about in-kernel queue latencies in the future, and it can be used to implement SO_TIMESTAMP.
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