Commit graph

15736 commits

Author SHA1 Message Date
Jesse Buhagiar
33d73c600c Kernel/USB: Move USB classes into USB namespace
The entire USB spec involves more than just UHCI, so
let's put everything into it's own nice namespace :^)
2021-01-09 13:48:15 +01:00
Jesse Buhagiar
0dbb9361b8 Kernel/USB: Move USB related files to into specific directory
As the USB/UHCI driver grows in size, it'll be much cleaner to have
all of the USB related files in one folder where they can be easily
accessed :^)
2021-01-09 13:48:15 +01:00
TheMorc
8b6db78aa7 MenuApplets: Open the correct tab in SystemMonitor on applet click
ResourceGraph and Network applets now open their SystemMonitor tab
2021-01-09 13:27:23 +01:00
TheMorc
124518a14a SystemMonitor: Add args parsing for opening a specific tab
This allows SystemMonitor to parse -t or -open-tab argument
to open a specific tab. (ex. network, interrupts etc.)
2021-01-09 13:27:23 +01:00
TheMorc
d0adaf4465 LibGUI: Add set_tab_index method
This method sets the current tab index to the value specified.
2021-01-09 13:27:23 +01:00
Andreas Kling
5f364f5dc1 LibGUI: Clear the application's drag-hovered widget on drop event
When we drop something on any window, there's no longer an ongoing drag
so let's forget the drag-hovered widget.
2021-01-09 12:02:07 +01:00
Andreas Kling
9e60fc5006 LibGUI: Add visual indicators for accepted drags to view classes
All the view classes used in FileManager now indicate when they are
ready to accept a drop by showing a rounded rectangle around the item.
2021-01-09 12:02:07 +01:00
Andreas Kling
607c01fad1 LibGUI: Add visual indicator for accepted drags to BreadcrumbBar
BreadcrumbBar segments will now indicate drag acceptance with a rounded
rectangle around the accepting segment.
2021-01-09 12:02:07 +01:00
Andreas Kling
b08ed1b560 LibGUI: Make AbstractView accept drags (and delegate to model) 2021-01-09 12:02:07 +01:00
Andreas Kling
7baaa34490 LibGUI: Make SortingProxyModel proxy accepts_drag() 2021-01-09 12:02:07 +01:00
Andreas Kling
12d0d12a78 FileManager+LibGUI: Make the breadcrumb bar accept text/uri-list drags 2021-01-09 12:02:07 +01:00
Andreas Kling
67b91d51a7 WindowServer+LibGUI: Pass the set of mime types being dragged to client
Previously the client would only learn the mime type of what was being
dropped on it once the drop occurred. To enable more sophisticated
filtering of drag & drop, we now pass along the list of mime types being
dragged to the client with each MouseMove event.

(Note that MouseMove is translated to the various Drag* events in LibGUI
on the client side.)
2021-01-09 12:02:07 +01:00
Andreas Kling
3b94af2c07 LibGUI: Have widgets signal willingness to accept drops
If a widget accept()'s a "drag enter" event, that widget now becomes
the application-wide "pending drop" widget. That state is cleared if
the drag moves over another widget (or leaves the window entirely.)
2021-01-09 12:02:07 +01:00
Andreas Kling
dbd090fd95 LibCore: Don't auto-accept events that hit bubbling limit
We were using the "accept" flag on the event to break out of the
bubbling loop, but this had lasting consequences since all events that
bubbled too far came out looking as if someone had accepted them.

If an event is ignored by everyone, it should appear ignored.
2021-01-09 12:02:07 +01:00
Andreas Kling
094b47971b LibGUI: Make Widget::HitTestResult::widget a WeakPtr 2021-01-09 12:02:07 +01:00
Andreas Kling
c17fa67f51 WindowServer+LibGUI: Notify hovered window when drag&drop is cancelled
The hovered window may want to react to a drag being cancelled, even
if the drag originated in some other window.
2021-01-09 12:02:07 +01:00
Andreas Kling
9acb72e804 LibGUI: Add "drag enter" and "drag leave" events
These events allow widgets to react when a drag enters/leaves their
rectangle. The enter event carries position + mime type, while the
leave event has no information.
2021-01-09 12:02:07 +01:00
Itamar
4728d0dd6a Profiler: Fix disassembly view to work with shared libraries
Also, update path to kernel image from "boot/kernel" to "boot/Kernel".

Fixes #4555
2021-01-09 10:56:04 +01:00
Itamar
1af2f65df5 Profiler: Use CoreDumpReader::library_containing 2021-01-09 10:56:04 +01:00
Itamar
65ffd8de69 LibCoreDump: Add 'library_containing' API to CoreDump::Reader
This API returns info about the library whose range in memory contains
a given address (similar to 'region_containing', but for libraries).
2021-01-09 10:56:04 +01:00
Itamar
399091dec3 LibELF: Fix cached sorted symbols in ELF::Image
Previously, we didn't set the 'symbol' field of SortedSymbol objects in
some code paths that populate the sorted symbol cache.
2021-01-09 10:56:04 +01:00
Itamar
a4b74cba0b Loader.so+LibELF: Do not read environment variables if AT_SECURE is set
AT_SECURE is set in the auxiliary vector when we execute setuid/setgid
programs.
In those cases, we do not want to read environment variables that
influence the logic of the dynamic loader, as they can be controlled
by the user.
2021-01-09 10:55:46 +01:00
Itamar
20974b0772 LibDebug: Keep going when parent's location info could not be computed
Previously, when trying to parse the location info of a member
variable, we asserted that the location info of its parent is of type
'Address'.

However, there are cases where we cannot compute the location info of
the parent (for example - because we do not yet support the type of
debug info generated for it).
In those cases, it is better to just leave the location info of the
member variable empty instead of crashing.
2021-01-09 10:55:46 +01:00
Itamar
e318a3d3d4 little: Remove "-Os" compile flag
This flag made gcc generate location info of type "location_list" for
'my_struct', which we do not yet support in LibDebug.
2021-01-09 10:55:46 +01:00
Itamar
94db04fc12 HackStudio: Make debugger support shared libraries 2021-01-09 10:55:46 +01:00
Itamar
dcdb68a013 Debugger: Support shared libraries
This makes our cli debugger, 'sdb', conform to the updated DebugSession
API and support shared libraries.
2021-01-09 10:55:46 +01:00
Itamar
4b91e7c821 LibDebug: Support shared libraries
DebugSession now makes the loader stop after loading the libraries,
and parses the loaded libraries of the program before continuing its
execution.

DebugSession now also supports inserting a breakpoint at a given symbol
or source position.
Additionally, DebugInfo now takes the base address of its object into
consideration.
2021-01-09 10:55:46 +01:00
Itamar
ca9d6d21b5 Loader.so+LibELF: Introduce "_LOADER_BREAKPOINT" environment variable
If set, the dynamic loader will perform a software breakpoint after
loading all libraries, and just before jumping to the main entry point.

This allows a debugger to inspect the loaded libraries before the
program starts executing.
2021-01-09 10:55:46 +01:00
Itamar
bb90d961b8 LibELF: Add Symbol::is_undefined() 2021-01-09 10:55:46 +01:00
Itamar
f95f15e0bd CMake: Install sources of LibELF 2021-01-09 10:55:46 +01:00
Brendan Coles
fc9f79fe01 Profiler: load_from_perfcore_file: handle invalid JSON gracefully 2021-01-09 10:36:40 +01:00
Emanuele Torre
5735fb47f3 FileManager: Remove extra semicolon added by mistake. 2021-01-08 22:10:25 +01:00
Andreas Kling
3b3233aaf0 FileManager: Allow drag&drop onto breadcrumb bar directories :^)
You can now drop dragged items onto directories in the breadcrumb bar
and we'll copy them to that directory for you. Pretty cool!
2021-01-08 19:51:44 +01:00
Andreas Kling
6159630fa0 LibGUI: Make BreadcrumbBar report drop events
Dropping something on a breadcrumb segment button will now fire the
BreadcrumbBar::on_drop hook.

Fixes #4792.
2021-01-08 19:51:44 +01:00
Tyler Lanphear
c762a0c4d6 LibC: Implement tgoto(). 2021-01-08 17:09:40 +01:00
Tyler Lanphear
0f988424cf LibVT: Implement ICH sequence. 2021-01-08 17:09:40 +01:00
Mart G
e575d3fd3d Utilities: Add a disk space usage analyzation program.
SpaceAnalyzer: Partially address code review changes.

- Use GUI::CommonActions::make_about_action().
- Pass large arguments by const reference instead of by value.
- Mark const functions as such.
- Add newline at end of SpaceAnalyzer.af
- Use full words instead of abbreviations in variable names.
- Use application's namespace instead of 'TreeMap'.
- move() certain assignments.
- Use member declaration initialization.
- Initialize TreeNode* member of QueueEntry.
- Rewrite find_mount_for_path to return MountInfo* instead.
- Rename ITreeMap and ITreeMapNode to TreeMap and TreeMapNode.
- Replace ext suffix with rect suffix for rectangles.

SpaceAnalyzer: Further address code review and coding style.

- Remove get prefix from accessor functions.
- Layout algorithm in its own function, with callback.
- Remove nullptr comparisons.
- Store lstat errors in error_accumulator.
- Use Rect::shatter.
- Use Rect's orientation based functions.

SpaceAnalyzer: Make sort_children_by_area const qualified.
2021-01-08 17:08:48 +01:00
Andreas Kling
56ff0f89af WindowServer: is_blocked_by_modal_window() => blocking_modal_window()
The name of this function was weird, since it returned the blocking
modal window itself, and not just a bool answering the question.
2021-01-08 12:33:34 +01:00
Andreas Kling
6a970611d6 UserspaceEmulator: Fix build after MOVSX shadowing changes 2021-01-08 12:29:46 +01:00
Gal Horowitz
2fd2396d63 UserspaceEmulator: Fix incorrect shadowing on mov sign extend
Unlike zero-extend moves, the upper bytes are not just zeroed,
but rather are based on the sign bit of the source, which means
if the source is tainted, so should the upper bytes be.
2021-01-08 12:17:06 +01:00
Tom
edc18ab4e6 WindowServer: Start blocked modal animation when clicking on frame
Fixes #4835
2021-01-08 11:21:30 +01:00
Brendan Coles
d0a9954f0e Userland: Add ddate utility
Today is Boomtime, day 7 of Chaos, in the YOLD 3187
2021-01-08 09:42:43 +01:00
Brendan Coles
fb9eb20544 date: Use ArgsParser and add ISO8601 / RFC3339 / RFC5322 output formats 2021-01-07 20:17:44 +01:00
Nico Weber
cf9135557b Userland: Rename cp's "-r" flag to "-R"
Linux accepts both -r and -R, but the BSDs only like -R, and
dR POSIX also only mentions -R. So make -R the canonical flag.

Keep -r available as an alias for -R.
2021-01-07 20:00:39 +01:00
Andreas Kling
56c2cc4162 LibWeb: Implement most of the CSS table fixup algorithm
This patch implements the "remove irrelevant boxes" and "generate
missing child wrappers" parts of table fixup.

"Generate missing parents" is left as a task for our future selves.
2021-01-07 18:00:51 +01:00
Andreas Kling
0fd577084f LibWeb: Specialize is<DOM::Element>() and is<Layout::Box>()
These two show up in profiles, so let's add specializations for them.
2021-01-07 17:33:29 +01:00
Andreas Kling
d3046a2649 LibWeb: Allow anonymous table, table-row and table-cell layout nodes 2021-01-07 17:33:29 +01:00
Andreas Kling
75829c1b81 LibWeb: Move remove_all_children() from Node to TreeNode<T>
This is useful in all tree types.
2021-01-07 17:33:29 +01:00
Andreas Kling
fe9de4b55c LibWeb: Add the computed "display" values to CSS::ComputedValues 2021-01-07 17:33:29 +01:00
Andreas Kling
f655a60773 LibWeb: Add some more CSS "display" values 2021-01-07 17:33:29 +01:00