Commit graph

10963 commits

Author SHA1 Message Date
Andreas Kling
ada3c9ca46 WebContent: Put some debug spam behind an #ifdef 2020-07-04 23:19:12 +02:00
Andreas Kling
3005c0af69 WebContent: Add a little text file I drew of the server/client classes 2020-07-04 23:17:58 +02:00
Andreas Kling
efc335c457 TextEditor: Allow turning off the preview mode
This patch adds a PreviewMode enum with the following values:

- None
- Markdown
- HTML

This makes it a bit more logical to implement exclusive behavior.
2020-07-04 21:21:04 +02:00
Andreas Kling
a378500b45 Base: Remove /home/anon/myfile.txt
I added this file while originally testing the kernel's file system
support. We have plenty of random files lying around these days. :^)
2020-07-04 21:21:04 +02:00
Andreas Kling
a4b5350aff WebContent: Notify client when web content selection changes
The WebContentView widgets reacts to this by requesting a repaint.
2020-07-04 20:57:57 +02:00
Andreas Kling
8476e3933b SystemMonitor: Change default update frequency to 3 seconds
1 second is just too annoyingly jumpy when you're trying to grab
something in the list.
2020-07-04 20:45:37 +02:00
Andreas Kling
0b9efc04b5 LibGUI: Sort FileSystemModel alphabetically internally
This just makes everything nicer.
2020-07-04 20:33:23 +02:00
Andreas Kling
67f999b701 Base: Set a reasonable HoverHighlight color in Redmond theme
Buttons turning deep blue when hovered was a bit too weird. :^)
2020-07-04 20:27:09 +02:00
Andreas Kling
998b3f6d87 LibGUI: Fix glitchy behavior in ScrollableWidget::scroll_into_view()
This function relies on visible_content_rect() which could previously
return rectangles with negative size. This was causing TableViews to
scroll down a little bit when assigning a model to them.

Also tweak the logic so we scroll a 0x0 rect into view, giving a
slightly nicer final position.
2020-07-04 20:18:57 +02:00
Andreas Kling
36150a118d SystemMonitor: New 16x16 icon in the same style as Terminal 2020-07-04 20:03:09 +02:00
Andreas Kling
8bd2fd8df9 Taskbar: Don't wrap minimized window titles in []
This actually looks a lot nicer without the [] and I'm not sure that
the visual cue about minimization state was actually useful.
2020-07-04 20:03:09 +02:00
Andreas Kling
a409e6d27d Base: New "generic window" icon based on the Terminal app icon 2020-07-04 20:03:09 +02:00
Andreas Kling
10fadd734c Terminal: New 16x16 icon in a more '90s style :^) 2020-07-04 20:03:09 +02:00
Andreas Kling
bc1ec588f0 TextEditor: Tweak 16x16 icon
In keeping with the slightly-higher-contrast theme.
2020-07-04 19:44:27 +02:00
Andreas Kling
14edd67bcc Profiler: Use SortingProxyModel::set_sort_role()
Use the new API to avoid duplicating code in the RunningProcessesModel.
2020-07-04 19:22:30 +02:00
Andreas Kling
b85a57ead7 WindowServer: Move window titles 1px to the right
This makes it look nicer with wide window icons.
2020-07-04 19:21:57 +02:00
Andreas Kling
a5799ed462 LibGUI: Add SortingProxyModel::sort_role()
This allows you to specify a role to sort by. Defaults to Role::Sort.
Also reordered the Role enum so that Role::Custom is last.
2020-07-04 18:40:21 +02:00
Andreas Kling
d851863704 Userspace: Remove a bunch of unnecessary Kernel/API/KeyCode.h includes 2020-07-04 17:25:31 +02:00
Andreas Kling
11c4a28660 Kernel: Move headers intended for userspace use into Kernel/API/ 2020-07-04 17:22:23 +02:00
Andreas Kling
ca93c22ae2 LibGUI: Turn GUI::Application::the() into a pointer
During app teardown, the Application object may be destroyed before
something else, and so having Application::the() return a reference was
obscuring the truth about its lifetime.

This patch makes the API more honest by returning a pointer. While
this makes call sites look a bit more sketchy, do note that the global
Application pointer only becomes null during app teardown.
2020-07-04 16:54:55 +02:00
Andreas Kling
f7577585a6 AK: Add Weakable::revoke_weak_ptrs()
This allows you to clear all the WeakPtrs pointing at a Weakable *now*
instead of waiting until the Weakable is destroyed.
2020-07-04 16:23:52 +02:00
Andreas Kling
1dd1595043 LibGUI: Make GUI::Application a Core::Object
Having this on the stack makes whole-program teardown iffy. Turning it
into a Core::Object allows anyone who needs it to extends its lifetime.
2020-07-04 14:05:57 +02:00
Andreas Kling
0d577ab781 Kernel: Add "child added" and "child removed" InodeWatcher events
The child name is not yet accessible to userspace, but will be in a
future patch.
2020-07-04 13:37:51 +02:00
Andreas Kling
ea17d2d3da Kernel: Remove debug spam in finalizer task 2020-07-04 13:00:48 +02:00
Andreas Kling
c6c71b0fcc LibGUI: Respect per-index font when computing TreeView item rects
This makes the selected (currently shown in bold) item in HackStudio's
project file view show up at the correct position.
2020-07-04 11:01:43 +02:00
Petr Akhlamov
188c83328f
Meta: Add ALT Linux packages to BuildInstructions.md (#2688) 2020-07-04 10:51:16 +02:00
AnotherTest
b6853a118a Meta: Show the outputs of failing tests in travis 2020-07-04 10:49:48 +02:00
AnotherTest
29e00b637e LibC: Implement cf{g,s}et{i,o}speed 2020-07-04 10:49:36 +02:00
AnotherTest
9609539236 Kernel: Change the value of SO_KEEPALIVE to reflect LibC's constant
This change was partially introduced in 861eb8d, which changed the
constant in LibC without changing the one in the kernel.
2020-07-04 10:49:36 +02:00
AnotherTest
aa7148af89 strace: Use ArgsParser for argument processing 2020-07-04 10:49:36 +02:00
Andreas Kling
ccdaa1bea9 LibWeb: Insert newlines at <br> and block boundaries in copied text :^)
To make the plain text we copy out from LibWeb look at least somewhat
like its original form, let's insert newlines at <br> elements and when
we exit a block-level element.

This is far from perfect, but seems to work pretty okay.
2020-07-03 21:34:12 +02:00
Andreas Kling
f7ef6c65b4 LibWeb: Add a "select all" action to the Web::PageView
This works by finding the very first and very last LayoutText nodes
in the layout tree and then setting the selection bounds to those two
nodes. For some reason it gets glitchy if we set the very first and
very last *LayoutNode* as the selection bounds, but I didn't feel like
investigating that too closely right now.
2020-07-03 21:34:12 +02:00
Andreas Kling
eec22acb8e LibGUI: Add GUI::CommonActions::make_select_all_action() :^) 2020-07-03 21:34:12 +02:00
Andreas Kling
8001a85fc7 Browser: Don't crash when inspecting an anonymous LayoutNode
Not all LayoutNodes have a corresponding DOM node.
2020-07-03 21:34:12 +02:00
Andreas Kling
f87881e198 LibWeb: Implement basic text copying :^)
You can now press Ctrl+C to copy the selected text in a Web::PageView
to the system clipboard. Very cool!
2020-07-03 21:34:12 +02:00
Andreas Kling
da66d99566 Base: Add TextEditor to the quick-launch area in the Taskbar :^)
I'm always starting text editors by opening a Terminal and typing "te"
which is a bit silly when I can have an icon for it instead!
2020-07-03 21:34:12 +02:00
Tom
0f2530524e Kernel: Remove /proc/PID/regs
There isn't an easy way to retreive all register contents anymore,
so remove this functionality. We do have the ability to trace
processes, so it shouldn't really be needed anymore.
2020-07-03 21:16:56 +02:00
Tom
bb84fad0bf Kernel: Fix retreiving frame pointer from a thread
If we're trying to walk the stack for another thread, we can
no longer retreive the EBP register from Thread::m_tss. Instead,
we need to look at the top of the kernel stack, because all threads
not currently running were last in kernel mode. Context switches
now always trigger a brief switch to kernel mode, and Thread::m_tss
only is used to save ESP and EIP.

Fixes #2678
2020-07-03 21:16:56 +02:00
Nico Weber
6d5bd8c76b LibC: Minor style fix for getresuid/getresgid 2020-07-03 19:37:28 +02:00
Nico Weber
cbbd55bd6b LibC: Remove a few comments now that we have man pages for this. 2020-07-03 19:37:28 +02:00
Nico Weber
1f323076f0 Add man pages for seteuid() and friends.
Also add an overview page that explains the general concepts.
2020-07-03 19:37:28 +02:00
Tom
9b4e6f6a23 Kernel: Consolidate features into CPUFeature enum
This allows us to consolidate printing out all the CPU features
into one log statement. Also expose them in /proc/cpuinfo
2020-07-03 19:32:34 +02:00
Tom
e373e5f007 Kernel: Fix signal delivery
When delivering urgent signals to the current thread
we need to check if we should be unblocked, and if not
we need to yield to another process.

We also need to make sure that we suppress context switches
during Process::exec() so that we don't clobber the registers
that it sets up (eip mainly) by a context switch. To be able
to do that we add the concept of a critical section, which are
similar to Process::m_in_irq but different in that they can be
requested at any time. Calls to Scheduler::yield and
Scheduler::donate_to will return instantly without triggering
a context switch, but the processor will then asynchronously
trigger a context switch once the critical section is left.
2020-07-03 19:32:34 +02:00
Tom
a308b176ce Kernel: Allow recursion when writing to the debug log
This allows printing in the case e.g. a page fault happens
during a log statement
2020-07-03 19:32:34 +02:00
Tom
3cc0e86cd8 Kernel: Change kmalloc lock to be recursive
If the heap code dumps a stack trace (e.g. out of memory) then
it may recursively call into it. Rather than deadlocking, allow
recursion.
2020-07-03 19:32:34 +02:00
Tom
038dd9f30e AK: Serialize entire log statements
Prior to this, we wrote to the log every time the << operator
was used, which meant that only these parts of the log statement
were serialized. If the thread was preempted, or especially with
multiple CPUs the debug output was hard to decipher. Instead, we
buffer up the log statements. To avoid allocations we'll attempt
to use stack space, which covers most log statements.
2020-07-03 19:32:34 +02:00
Tom
57b61b2dde Kernel: Split initialization of Processor structure
We need to very early on initialize the Processor structure so
that we can use RecursiveSpinLock early on.
2020-07-03 19:32:34 +02:00
Tom
137e1dc7bd AK: Fixes for atomic pointers 2020-07-03 19:32:34 +02:00
Matthew Olsson
6af3fff0c2 LibJS: Reformat run-tests.sh output
- Use emojis instead of the pass/fail text
- Fix the new version of the script to run inside Serenity
- Don't print erroneous output after 'Output:'; start on a newline
instead
- Skip 'run-tests.sh' while testing
2020-07-03 19:30:13 +02:00
Matthew Olsson
d5beaa497f Base: Add green check mark and red X emojis 2020-07-03 19:30:13 +02:00