summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-09-24LibGUI: Stop editing in views when the view is hiddenAndreas Kling
This fixes an issue in FileManager where an editor opened in the table view mode would remain open after switching to the icon mode.
2020-09-24LibGUI: Make inline editing work in ColumnsViewAndreas Kling
All it took was overriding content_rect() :^)
2020-09-24LibGUI: Move editing key handling up to AbstractViewAndreas Kling
We want all views to respond to the editing key as long as the relevant edit trigger is activated.
2020-09-24LibGUI: Support inline editing in GUI::IconViewAndreas Kling
IconView now responds to the editing key (F2) if the view is editable. It does feel a little bit weird to have content_rect() return the text rect for an item, and not the whole item rect. This internal API could probably be better.
2020-09-24LibGUI: Support editing filenames through FileSystemModel :^)Andreas Kling
2020-09-24LibGUI: Make SortingProxyModel forward is_editable() and set_data()Andreas Kling
This will allow us to edit models through a SortingProxyModel. :^)
2020-09-24LibWeb: Add a separate UA style sheet for documents in quirks modeAndreas Kling
We need to make some additional tweaks to the default UA style when displaying documents in quirks mode.
2020-09-23AK: Resolve format related circular dependencies properly.asynts
With this commit, <AK/Format.h> has a more supportive role and isn't used directly. Essentially, there now is a public 'vformat' function ('v' for vector) which takes already type erased parameters. The name is choosen to indicate that this function behaves similar to C-style functions taking a va_list equivalent. The interface for frontend users are now 'String::formatted' and 'StringBuilder::appendff'.
2020-09-23UserspaceEmulator+LibX86: Clean up some obnoxious template spamAndreas Kling
Don't require clients to templatize modrm().read{8,16,32,64}() with the ValueWithShadow type when we can figure it out automatically. The main complication here is that ValueWithShadow is a UE concept while the MemoryOrRegisterReference inlines exist at the lower LibX86 layer and so doesn't have direct access to those types. But that's nothing we can't solve with some simple template trickery. :^)
2020-09-23UserspaceEmulator+LibX86: Add support for 64-bit memory reads and writes (#3584)Nico Weber
This is useful for reading and writing doubles for #3329. It is also useful for emulating 64-bit binaries. MemoryOrRegisterReference assumes that 64-bit values are always memory references since that's enough for fpu support. If we ever want to emulate 64-bit binaries, that part will need minor updating.
2020-09-23LibGUI: Use on_up_pressed/on_down_pressed events in SpinBoxTibor Nagy
Fixes keyboard increment/decrement of SpinBox values. After PR #2412 the TextBox class started not propagating arrow key events to the parent widgets because it handles them itself now. It also added two new events for these arrow keys, so use them instead in SpinBox.
2020-09-22LibWeb: Disallow cross-origin access to <iframe>.contentDocumentAndreas Kling
With this patch, we now enforce basic same-origin policy for this one <iframe> attribute. To make it easier to add more attributes like this, I've added an extended IDL attribute ("[ReturnNullIfCrossOrigin]") that does exactly what it sounds like. :^)
2020-09-22LibWeb: Add Origin::is_same(const Origin&)Andreas Kling
Getting ready for some extremely basic same-origin policy stuff, this initial implementation simply checks that two origins have identical protocol, host and port.
2020-09-22LibWeb: Add WindowObject::origin()Andreas Kling
This is a convenience getter to retrieve the security origin of a DOM window's document.
2020-09-22LibWeb: Dispatch DOM "load" event on <iframe> elementsAndreas Kling
2020-09-22LibWeb: Rename HTMLIFrameElement::hosted_frame() => content_frame()Andreas Kling
This matches the standard API names contentWindow and contentDocument.
2020-09-22LibJS: Let the VM cache an empty ("") PrimitiveStringAndreas Kling
Empty string is extremely common and we can avoid a lot of heap churn by simply caching one in the VM. Primitive strings are immutable anyway so there is no observable behavior change outside of fewer collections.
2020-09-22LibJS: Move well-known symbols to the VMAndreas Kling
No need to instantiate unique symbols for each Interpreter; they can be VM-global. This reduces the memory cost and startup time anyway.
2020-09-22LibJS: Use VM::exception() instead of Interpreter::exception() a bunchAndreas Kling
There's a lot more of these things to fix. We'll also want to move from passing Interpreter& around to VM& instead wherever that is enough.
2020-09-22LibJS: Add a way to get from a Cell to the VMAndreas Kling
2020-09-22LibJS: Move the current exception from Interpreter to VMAndreas Kling
This will allow us to throw exceptions even when there is no active interpreter in the VM.
2020-09-21LibCore: Add Core::Account for login management.Peter Elliott
Core::Account abstracts login semantics like password checking and switching uid/gid.
2020-09-21HackStudio: Add auto-complete capability to the EditorItamar
2020-09-21Base: Add the PlaceholderText attribute to themesPeter Elliott
2020-09-21LibGUI: Add optional placeholder to TextEditorPeter Elliott
This lets you show some disabled text when no text is entered, and the editor is not focused.
2020-09-21LibJS: VM::interpreter() should just assert when no active interpreterAndreas Kling
I accidentally committed some code here to force a crash, but this should just assert.
2020-09-21LibJS: Assert if garbage collection is restarted while ongoingAndreas Kling
We can't GC while we're already in GC. Assert if this happens.
2020-09-21LibJS: Rename InterpreterScope => InterpreterExecutionScopeAndreas Kling
To make it a little clearer what this is for. (This is an RAII helper class for adding and removing an Interpreter to a VM's list of the currently active (executing code) Interpreters.)
2020-09-21LibJS: GC should gather roots from all active interpretersAndreas Kling
If we are in a nested execution context, we shouldn't only mark things used by the active interpreter.
2020-09-21LibIPC: Use InputMemoryStream instead of BufferStream.asynts
2020-09-21LibGfx+JPGLoader: Use InputMemoryStream instead of BufferStream.asynts
2020-09-21LibGfx+ICOLoader: Use InputMemoryStream instead of BufferStream.asynts
2020-09-21LibGfx+GIFLoader: Use InputMemoryStream instead of BufferStream.asynts
2020-09-21LibGfx+Font: Use OutputFileStream instead of BufferStream.asynts
2020-09-21LibAudio: Use InputMemoryStream instead of BufferStream.asynts
2020-09-20LibGUI: Remove unnecessary type cast in JsonArrayModel.asynts
Since TCP sequence numbers are randomly choosen 32-bit numbers, it often happend that the most significant bit was set. The cast to a 32-bit signed integer then made the number negative. Thus TCP sequence were shown negative in the SystemMonitor every so often.
2020-09-20LibGUI: Pad row/column headers of AbstractTableViewTibor Nagy
2020-09-20LibJS+Clients: Add JS::VM object, separate Heap from InterpreterAndreas Kling
Taking a big step towards a world of multiple global object, this patch adds a new JS::VM object that houses the JS::Heap. This means that the Heap moves out of Interpreter, and the same Heap can now be used by multiple Interpreters, and can also outlive them. The VM keeps a stack of Interpreter pointers. We push/pop on this stack when entering/exiting execution with a given Interpreter. This allows us to make this change without disturbing too much of the existing code. There is still a 1-to-1 relationship between Interpreter and the global object. This will change in the future. Ultimately, the goal here is to make Interpreter a transient object that only needs to exist while you execute some code. Getting there will take a lot more work though. :^) Note that in LibWeb, the global JS::VM is called main_thread_vm(), to distinguish it from future worker VM's.
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.