summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-01-10LibGUI+FileManager: Misc tweaks courtesy of clang-formatSergey Bugaev
2020-01-10LibGUI+FileManager: Merge GDirectoryModel into GFileSystemModelSergey Bugaev
We used to have two different models for displaying file system contents: the FileManager-grade table-like directory model, which exposed rich data (such as file icons with integrated image previews) about contents of a single directory, and the tree-like GFileSystemModel, which only exposed a tree of file names with very basic info about them. This commit unifies the two. The new GFileSystemModel can be used both as a tree-like and as a table-like model, or in fact in both ways simultaneously. It exposes rich data about a file system subtree rooted at the given root. The users of the two previous models are all ported to use this new model.
2020-01-10LibGUI: Add GAbstractView::activate_selected()Sergey Bugaev
This is a nice little utility to activate all the selected items, which is what you usually want to do.
2020-01-10LibGUI: Fix GModel::is_valid() behavior for tree-like modelsSergey Bugaev
2020-01-10LibGUI: Fix tree view column positioning when some columns are hiddenSergey Bugaev
2020-01-10LibC: Remove useless retry loop in connect_to_lookup_server()Andreas Kling
2020-01-10Kernel: Enable SMAP protection during the execve() syscallAndreas Kling
The userspace execve() wrapper now measures all the strings and puts them in a neat and tidy structure on the stack. This way we know exactly how much to copy in the kernel, and we don't have to use the SMAP-violating validate_read_str(). :^)
2020-01-10Kernel+LibELF: Enable SMAP protection during non-syscall exec()Andreas Kling
When loading a new executable, we now map the ELF image in kernel-only memory and parse it there. Then we use copy_to_user() when initializing writable regions with data from the executable. Note that the exec() syscall still disables SMAP protection and will require additional work. This patch only affects kernel-originated process spawns.
2020-01-09LibC: Fail name lookups immediately if we can't connect to LookupServerAndreas Kling
2020-01-09Kernel: Take path+length in the unlink() and umount() syscallsAndreas Kling
2020-01-09LibELF: Remove DynamicSection from ELFImageAndrew Kaster
Since ELFDynamicObject needs the actual virtual address of the .dynamic section in the loaded image, and not the file offset like we assumed before, due to MAP_PRIVATE secretly giving us a MAP_SHARED, we can remove all of the Dynamic* code from ELFImage. ELFDynamicLoader only needs ELFImage to get the Program headers at this point. More consolidation opportunities seem likely in the future.
2020-01-09LibELF: Map .text segment with MAP_ANONYMOUS for shared objectsAndrew Kaster
We need to workaround the fact that MAP_PRIVATE when passed a file descriptor doesn't work the way we expect. We can't change the permissions on our mmap to PROT_WRITE if the original executable doesn't have PROT_WRITE. Because of this, we need to construct our ELFDynamicObject using the actual virtual address of the .dynamic section, instead of using the offset into the ELFImage that was actually getting modified by accident ...somehow. Not clear what was going on.
2020-01-08LibVT: Relayout TerminalWidget on font changeAndreas Kling
We were not recomputing the internal dimensions after a font changed, which caused things to look very off. It's still not perfect as we're always using the same (small) font for bold text, which obviously sticks out like a sore pinky when the rest of the terminal text is large.
2020-01-08WindowServer+LibGUI: Paint exclusive actions as radio buttons in menusAndreas Kling
Actions that are checkable and members of a GActionGroup will now be painted with a radio button appearance in menus.
2020-01-08LibDraw+LibGUI: Move radio button painting into StylePainterAndreas Kling
This will allow WindowServer to draw radio buttons :^)
2020-01-08LibC: Don't leave /etc/passwd open in getlogin()Andreas Kling
2020-01-08LibGUI: clicking and dragging one item will drag other items in selectionDov Alperin
Previously if more than one item was selected clicking on one of them and dragging would de-select everything that is not the one that was clicked on. Now, if more than one items are selected and there is a mousedown it goes into a "mightdrag" state. The user can then perform a drag, if they don't everything that is not the item being clicked gets unselected in the mouseup event, mimicking the previous behavior.
2020-01-08LibGUI: separate file names with commas in the drag operation textDov Alperin
2020-01-07LibGUI: Preserve existing GItemView selection on rubber band (#1031)DAlperin
2020-01-07LibC: Add MAP_FILE for mmap()Andreas Kling
2020-01-07LibGUI: Run clang-format on GModel.h to neaten up some formattingConrad Pankoff
2020-01-07LibCore: Fix a typo in CConfigFile.hConrad Pankoff
2020-01-07GAbstractView: Add function for adding all to selectionShannon Booth
2020-01-07LibDraw: Add support for parsing #RGBA colorsN00byEdge
This was the nicest way of making this happen, I think. Fitting it into the 4 length function ended up becoming too hard to read. Closes #1027
2020-01-07Themes: Support rubberband selection theming0xtechnobabble
2020-01-06Kernel+LibELF: Validate PT_LOAD and PT_TLS offsets before memcpy()'ingAndreas Kling
Before this, you could make the kernel copy memory from anywhere by setting up an ELF executable with a program header specifying file offsets outside the file. Since ELFImage didn't even know how large it was, we had no clue that we were copying things from outside the ELF. Fix this by adding a size field to ELFImage and validating program header ranges before memcpy()'ing to them. The ELF code is definitely going to need more validation and checking.
2020-01-06LibC: Remove thread-specific TID cacheAndreas Kling
As Sergey pointed out forever ago, this value is wrong after fork().
2020-01-06Kernel: Make utime() take path+length, remove SmapDisablerAndreas Kling
2020-01-06Kernel: Pass name+length to mmap() and remove SmapDisablerAndreas Kling
2020-01-06Kernel: Pass name+length to set_mmap_name() and remove SmapDisablerAndreas Kling
2020-01-06Kernel: Make realpath() take path+length, get rid of SmapDisablerAndreas Kling
2020-01-06Kernel: Make watch_file() syscall take path length as a size_tAndreas Kling
We don't care to handle negative path lengths anyway.
2020-01-06Kernel: Pass path+length to mkdir(), rmdir() and chmod()Andreas Kling
2020-01-06LibC: Make the syscall wrappers for stat/lstat/chdir return EFAULTAndreas Kling
If we pass a null path to these syscall wrappers, just return EFAULT directly from the wrapper instead of segfaulting by calling strlen(). This is a compromise, since we now have to pass the path length to the kernel, so we can't rely on the kernel to tell us that the path is at a bad memory address.
2020-01-06Kernel: Make access() take path+lengthAndreas Kling
Also, let's return EFAULT for nullptr at the LibC layer. We can't do all bad addresses this way, but we can at least do null. :^)
2020-01-06LibC: Remove dubious String ends_with usageShannon Booth
As mentioned in #917, the String destructor could potentially be clobbering the errno. Use memcpy so that we do not need String at all.
2020-01-06AK+Demos+Libraries: Remove executable permissions from {.cpp,.h} filesShannon Booth
2020-01-05Kernel: Make chdir() take path+lengthAndreas Kling
2020-01-05Kernel: Pass path+length to the stat() and lstat() syscallsAndreas Kling
It's not pleasant having to deal with null-terminated strings as input to syscalls, so let's get rid of them one by one.
2020-01-05LibCore: Oops, we were forgetting to destroy disconnected RPC clientsAndreas Kling
2020-01-05LibHTML: Fix broken build after Element::computed_style() changeAndreas Kling
2020-01-05LibHTML: Make the Element::computed_style() return NonnullRefPtrMatrix89
Because Element::computed_style() can never retrun null we can return NonnullRefPtr instead of RefPtr.
2020-01-05LibHTML: Add four missing border properties to the computed styleMatrix89
2020-01-05LibHTML: Replace StyleProperties::create(StyleProperties) with clone()Matrix89
2020-01-05Browser+LibHTML: Change the way computed styles are queriedMatrix89
2020-01-05Browser+LibHTML: Deduplicate inspector codeMatrix89
The `DOMElementStyleModel` and `DOMComputedElementStyleModel` classes were replaced by the `StylePropertiesModel`.
2020-01-05Browser+LibHTML: Add "Computed" styles to the DOM inspectorMatrix89
I though it would be nice to also show the style that the browser uses to display an element. In order to do that, in place of the styles table I've put a tab widget, with tabs for both element and computed element styles.
2020-01-05LibELF: Fix stack overflow in ELFImage::relocations()Andreas Kling
Thanks to braindead for finding the bug! :^)
2020-01-05LibHTML: Respect the system themeSergey Bugaev
LibHTML will now use the palette colors for the default document background and the text. As always, a page can override this default styling with CSS if it really wants a specific color or style. Fixes https://github.com/SerenityOS/serenity/issues/963
2020-01-05AK+LibCore: Add an IDAllocator and use to allocate timer idsShannon Booth