summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2021-01-01LibWeb: Use is<T> in XMLHttpRequestPrototypeAndreas Kling
2021-01-01AK: Deal with unsigned integers in binary search.asynts
2021-01-01LibJS: Remove hand-rolled type information in JS AST in favor of RTTIAndreas Kling
2021-01-01LibWeb: Remove hand-rolled is_foo() helpers in Layout::Node classesAndreas Kling
2021-01-01LibWeb: Remove more hand-rolled type information :^)Andreas Kling
Hoo boy, we've really accumulated a lot of this stuff.
2021-01-01LibJS+LibWeb: Stop generating is_foo_wrapper() for JS DOM wrappersAndreas Kling
2021-01-01LibJS: Remove hand-rolled Object is_foo() helpers in favor of RTTIAndreas Kling
2021-01-01LibJS: Use RTTI for inheritance checksAndreas Kling
This replaces the hand-rolled string-based inheritance check tech.
2021-01-01LibWeb: Demangle the names returned by Layout::Node::class_name()Andreas Kling
Note that these are only used in debugging/test output so it's not performance sensitive.
2021-01-01LibWeb: Simplify Layout::Node::class_name() with RTTIAndreas Kling
2021-01-01LibCore: Remove Core::Object::is_widget() in favor of RTTIAndreas Kling
2021-01-01LibCore: Remove some hand-rolled type information from Core::ObjectAndreas Kling
Both is_action() and is_window() can be answered by RTTI.
2021-01-01LibGUI: Remove some hand-rolled type information from WidgetAndreas Kling
2021-01-01AK+LibGUI+LibWeb: Remove AK::TypeTraits in favor of RTTI-based helpersAndreas Kling
Now that we have RTTI in userspace, we can do away with all this manual hackery and use dynamic_cast. We keep the is<T> and downcast<T> helpers since they still provide good readability improvements. Note that unlike dynamic_cast<T>, downcast<T> does not fail in a recoverable way, but will assert if the object being casted is not a T.
2021-01-01LibJS: Fix email in TypedArray{Constructor,Prototype} copyright headersLinus Groh
2021-01-01Applications+LibGUI: Convert all GML consumers to use the LibCore finderAndrew Kaster
Remove Widget::find_child_by_name and Widget::find_descendant_by_name, and convert all users to using the type-safer version in Core::Object.
2021-01-01LibCore: Add typed find_child and find_descendant helpers to ObjectAndrew Kaster
These look a lot like the parallel functionality in GUI::Widget :). These use dynamic_cast now, to make use of that RTTI we just added.
2021-01-01LibELF: validate_program_headers: Validate p_memsz and p_alignBrendan Coles
2021-01-01ProtocolServer: Use an empty Optional<IPC::File> to pass along "no fd"AnotherTest
Passing `-1` wouldn't work, as these are passed to `sendfd()'. Fixes #4706.
2021-01-01LibGUI: Hide unnecessary scrollbars in MultiViewAndreas Kling
This removes pointless scrollbars in FilePicker which looks nice.
2021-01-01LibGUI: Simplify setup code in GUI::MultiViewAndreas Kling
Use for_each_view_implementation() to avoid duplicating the setup code for each subview.
2021-01-01Meta: Update project copyright dates (2018-2021) :^)Andreas Kling
2021-01-01LibGUI: Transfer focus when checking exclusive button programmaticallyAndreas Kling
When calling set_checked(true) on an exclusive button, we will now transfer focus to the newly checked button if one of its now-unchecked siblings had focus before. This makes windows that place initial focus somewhere in a group of radio buttons look nicer when they show up, since focus will be on whichever radio button was pre-checked, which may not be the first one in the group.
2021-01-01LibGUI: Simplify RadioButton by using AbstractButton exclusive modeAndreas Kling
Making an AbstractButton exclusive means that we enforce that only one of the exclusive buttons within the same parent widget can be checked at a time. RadioButton was doing exactly the same thing, except in a custom way. So just remove the custom code and make it exclusive. :^)
2020-12-31LibGfx: Introduce provisional font interfaceStephan Unverwerth
Old font functionality has been moved into BitmapFont and an abstract Font interface has been introduced to faciliate further development of TTF font integration.
2020-12-31LibGUI: Add a bunch of missing widget registrationsAndreas Kling
2020-12-31LibWeb: Clear circular download reference when download finishedTom
2020-12-31LibAudio: Make it so that an unused WavWriter is destructibleAndrew Kaster
WavWriter::finalize didn't check that m_file was actually valid before trying to seek and close it. The file is only set by set_file, so it's not an invariant. Just add a null guard to finalize().
2020-12-31LibThread: Give Thread std::jthread semanticsAndrew Kaster
Because pthread_create will always call pthread_exit internally before exiting the thread function, we can remove the odd requirement that the user's thread function must call Thread::quit internally. Make Thread::join clear m_tid on success, and print to stderr on failure. Call join from ~Thread(). Now if you write an infinite loop in your thread in an application and don't have an exit condition, you will block in the thread's destructor forever. Time for stop_token? :)
2020-12-31LibThread: Hide Thread's constructor, as it is a Core::ObjectAndrew Kaster
Just constructing one of these guys on the stack willy nilly will leak the first reference to them. There might be other C_OBJECTs that have public constructors, seems like a good place for some static analysis checks :). Force users to call the construct() method for it.
2020-12-31Everywhere: Re-format with clang-format-11Linus Groh
Compared to version 10 this fixes a bunch of formatting issues, mostly around structs/classes with attributes like [[gnu::packed]], and incorrect insertion of spaces in parameter types ("T &"/"T &&"). I also removed a bunch of // clang-format off/on and FIXME comments that are no longer relevant - on the other hand it tried to destroy a couple of neatly formatted comments, so I had to add some as well.
2020-12-31ProtocolServer: Avoid blocking all downloads when client stops readingAnotherTest
Fixes #4668.
2020-12-31LibWeb: Don't hold on to the Download instance after it's finishedAnotherTest
Fixes* 4668
2020-12-31LibProtocol: Ensure download is finished before invoking on_finishedAnotherTest
2020-12-31LibGUI: Add 1px of margin to EmojiPickerDialogAndreas Kling
The left and top highlight edges were cut off by the dialog frame. Add a small margin to make sure all buttons can be painted fully.
2020-12-31LibGUI: Make the emojis in the emoji input dialog fit in the windowAndreas Kling
GUI::Button has a default min-width of 32, so we have to override that here in order to squeeze all the emojis into the window. Fixes #4689.
2020-12-31LibGUI: Add a new GUI::OpacitySlider widget :^)Andreas Kling
This widgets offers a more visually intuitive way to adjust the opacity of something.
2020-12-31LibGfx: Remove unnecessary assertion in Painter::draw_pixel()Andreas Kling
2020-12-31LibGUI: Constrain relative cursor delta to valid rangeTom
2020-12-31LibGUI: Don't change the actual combobox value while hovering itTom
We don't want to trigger an actual selection change until either confirming the new selection by keyboard or clicking on it. Dismissing the dropdown should have no effect on the current selection. Fixes #4657
2020-12-31LibGfx: Add Gfx::Font::bold_variant() that does a proper font lookupAndreas Kling
We previously had a cached bold variant font in Gfx::Font that was very haphazardly located by filename pattern. This patches replaces that mechanism with a proper Gfx::FontDatabase lookup for the same font but with bold weight (700).
2020-12-31Everywhere: Fix more typosLuke
2020-12-31LibGUI: Show font weight names instead of numeric weights in FontPickerAndreas Kling
Map font weights to their names from the OpenType specification.
2020-12-31LibGUI: Don't keep creating new models in FontPickerAndreas Kling
We can reuse the same model, as long as we call update() on them when the list of weights/sizes change.
2020-12-31LibGUI: Simplify FontPicker::set_font()Andreas Kling
Use Vector::find_first_index() instead of iterating manually. :^)
2020-12-31AK: Fix a race condition with WeakPtr<T>::strong_ref and destructionTom
Since RefPtr<T> decrements the ref counter to 0 and after that starts destructing the object, there is a window where the ref count is 0 and the weak references have not been revoked. Also change WeakLink to be able to obtain a strong reference concurrently and block revoking instead, which should happen a lot less often. Fixes a problem observed in #4621
2020-12-31LibGUI: Sort all the lists in the FontPickerAndreas Kling
Fixes #4671.
2020-12-30LibGUI: Tweak FontPicker layoutAndreas Kling
Make everything a bit smaller and hide the horizontal scrollbars in the list views since we don't really need them.
2020-12-30LibGFX: Move default_xxx_font() methods from Font to FontDatabaseStephan Unverwerth
When we have an abstract font class it makes no sense to keep these methods in the Font class.
2020-12-30LibTTF: Cache rasterized glyphs within TTF::ScaledFontStephan Unverwerth