Commit graph

9433 commits

Author SHA1 Message Date
Nicholas Hollett
b7810a31c3 LibDesktop: Switch to LaunchServer for DesktopServices::open
Moves DirectoryServices out of LibCore (because we need to link with
LibIPC), renames it Desktop::Launcher (because Desktop::DesktopServices
doesn't scan right) and ports it to use the LaunchServer which is now
responsible for starting programs for a file.
2020-05-09 15:13:32 +02:00
Nicholas Hollett
2708cc0f72 LaunchServer: Add the LaunchServer to centralise file associations.
Step one of moving DesktopServices::open handling out of process. This
makes it easier to do things like read in associations for which program
opens which files or protocols. This gives users the ability to modify
the associations without having to rebuild :^)
2020-05-09 15:12:56 +02:00
Andreas Kling
b65ca3b944 LibVT: Make Terminal::Line non-copyable and non-movable 2020-05-09 13:20:01 +02:00
Andreas Kling
9c927538ad Kernel: ioctl(TCSETSF) on a TTY should flush input
This is where we end up when calling tcsetattr() with TCSAFLUSH.
This fixes vttest not accepting the first keystroke as input.
2020-05-09 12:30:51 +02:00
Andreas Kling
a0616d96bf LibVT: Make the Xterm/OSC sequence parsing a bit more robust
Tolerate sequences ending in both <0x07> (BEL) and <0x1b> <0x5c> (ST).
The former is apparently an Xterm extension and the latter is standard.
2020-05-09 12:08:41 +02:00
Andreas Kling
283bd1a95c LibVT: Respond to DSR 0 (device status)
Also emit query responses in a single write() syscall instead of going
character-at-a-time.
2020-05-09 12:02:22 +02:00
Peter Nelson
b1fee13904 LibGfx: Implement GIFImageDecoderPlugin animation methods
GIFImageDecoderPlugin now lazily decodes GIF frames as they are
requested.
2020-05-09 12:01:59 +02:00
Peter Nelson
ddc4eb7be0 LibGfx: Optimise LZWDecoder
Various optimisations to speed up LZWDecoder
- Take advantage of the fact that we add new codes in the order they are
  discovered so no need to store the code as part of a separate
  CodeTableEntry structure. Instead we store directly store vectors of
  colors and the code is the index into the vector.
- Cache current table capacity to avoid calling pow2 every time.
- Prevent some unnecessary vector copies by returning by reference from
  get_output.
2020-05-09 12:01:59 +02:00
Peter Nelson
b8f5b81019 LibWeb: Add support for animated images to HTMLImageElement
Uses a Core::Timer (similar to HTMLBlinkElement) to transition between
frames of an animated image. Also keeps track of the number of animation
loops.
2020-05-09 12:01:59 +02:00
Peter Nelson
d22bb92764 LibGfx: Add support for animated images to ImageDecoder{Plugin}
Adds methods to determine whether an image is animated, how many times
the animation loops, the number of frames, and to get individual frames.

Implements stubs of these methods for PNGImageDecoderPlugin and
GIFImageDecoderPlugin.
2020-05-09 12:01:59 +02:00
Ben Wiederhake
eec99b23a0 Userland: Remove double-'#include' in date.cpp 2020-05-09 10:00:29 +02:00
Hüseyin ASLITÜRK
3874664752 Applications: FontEditor, relocate form items by fonts size
FontEditor widget rewritten for respect to the font size and added fixed width and height header values.
2020-05-09 10:00:13 +02:00
Hüseyin ASLITÜRK
e68a08ad7c LibGfx: Add new methods to Font to avoid embedded values in FontEditor 2020-05-09 10:00:13 +02:00
Hüseyin ASLITÜRK
6f2837cb13 Base: Move 32px font editor app icon under 32x32 folder 2020-05-09 10:00:13 +02:00
Andreas Kling
6808ad1607 Meta: Update ReadMe a bit, add link to issue policy 2020-05-09 09:51:12 +02:00
Linus Groh
f8c7ab55f8 LibWeb: Implement "text-transform: {upper,lower}case" 2020-05-08 23:04:54 +02:00
Andreas Kling
5bfd893292 Kernel+Userland: Add "settime" pledge promise for setting system time
We now require the "settime" promise from pledged processes who want to
change the system time.
2020-05-08 22:54:17 +02:00
Andreas Kling
1cddb1055f Kernel: Only allow superuser to call sys$clock_settime() 2020-05-08 22:47:21 +02:00
Andreas Kling
652b22ee9c Kernel: Remove SmapDisabler in sys$clock_settime() 2020-05-08 22:47:03 +02:00
Andreas Kling
6e9c57fcc3 LibWeb: Generate a new list item marker on every layout
This is a workaround for the silly issue where some content would move
one pixel upward on every layout. The block layout code was finding
the list item marker and doing regular inline layout on it. We were not
prepared to handle this, which caused it to move in a silly way.

For now, just regenerate markers on every layout to work around the
issue. In the future we should figure out a nice way to layout markers.
2020-05-08 22:40:20 +02:00
Andreas Kling
85a3678b4f Kernel: Assert on startup if we don't find any physical pages
Instead of checking this on every page allocation, just check it once
on startup. :^)
2020-05-08 22:15:02 +02:00
Andreas Kling
55f61c0004 Kernel: Add for_each_vmobject_of_type<T>
This makes iterating over a specific type of VMObjects a bit nicer.
2020-05-08 22:10:47 +02:00
Andreas Kling
239fd33405 Services: Move Taskbar and SystemMenu from Applications to Services 2020-05-08 22:00:41 +02:00
Andreas Kling
cf3b58fbe8 Services: Renamed from Servers
It didn't feel right to have a "DHCPClient" in a "Servers" directory.
Rename this to Services to better reflect the type of programs we'll
be putting in there.
2020-05-08 21:57:44 +02:00
Andreas Kling
042b1f6814 Kernel: Propagate failure to commit VM regions in more places
Ultimately we should not panic just because we can't fully commit a VM
region (by populating it with physical pages.)

This patch handles some of the situations where commit() can fail.
2020-05-08 21:47:08 +02:00
Andreas Kling
25db315b29 LibIPC: Use NonnullOwnPtrVector<Message> in IPC::ServerConnection
We never want to store null messages, so make it impossible to do so.
2020-05-08 21:40:06 +02:00
Andreas Kling
d69fd87b50 AK: Add templated NonnullOwnPtr::release_nonnull()
This allows you to release a NonnullOwnPtr<T> into a NonnullOwnPtr<U>
2020-05-08 21:38:47 +02:00
Andreas Kling
788293ead8 Browser: Move InspectorWidget into the Browser namespace 2020-05-08 21:38:30 +02:00
Andreas Kling
c24304dca3 Kernel: Use NonnullRefPtrVector for HardwareTimer and HPETComparator 2020-05-08 21:22:58 +02:00
Andreas Kling
03c91fce74 LibGUI: Highlight interactive area of hovered CheckBox and RadioButton
This is consistent what we do for regular Buttons and gives a pleasant
visual cue when you're over a clickable area.
2020-05-08 21:12:16 +02:00
Andreas Kling
d92f62db43 Kernel: Remove ref-counting from interrupt override metadata
I don't see a reason for these to be reference-counted, and removing it
simplifies a bunch of surrounding data structures.
2020-05-08 21:12:16 +02:00
Andreas Kling
d87f875552 SystemServer: Use NonnullRefPtrVector 2020-05-08 21:12:16 +02:00
Andreas Kling
d74650e80d Kernel: Use NonnullRefPtrVector<T> instead of Vector<RefPtr<T>> some 2020-05-08 21:12:16 +02:00
AnotherTest
bd12f132f3 LibJS: Correct tiny issue with passing a String to String::format
I'm not sure how this even _builds_
2020-05-08 21:02:47 +02:00
AnotherTest
0901b17126 LibJS: Be a bit more explicit about sizeof(buf) / sizeof(FlatPtr)
This (seemingly) no-op cast communicates our intention to clang
2020-05-08 21:02:47 +02:00
Linus Groh
e333b60064 LibJS: Add Array.of() 2020-05-08 20:06:49 +02:00
Linus Groh
ca22476d9d LibJS: Add Array.isArray() 2020-05-08 20:06:49 +02:00
Linus Groh
01fd6ce045 LibJS: Support multiple arguments in Array constructor 2020-05-08 20:06:49 +02:00
Linus Groh
8137f40b73 LibJS: Add Value::is_integer() 2020-05-08 20:06:49 +02:00
AnotherTest
88738aefa3 LibGfx: Revert #2154 and properly handle simple polygons
The existing scanline method works just fine, and only needs the points
to be available as floats.
This commit reverts the complex polygon mitigation, and instead fixes
the rasterization process to avoid generating complex polygons because
of precision issues.
2020-05-08 19:39:38 +02:00
Andreas Kling
0f0d73d1b5 LibGUI: Make the "enabled" widget state propagate to child widgets
This simplifies building composite widgets by not having to worry about
updating widget subtrees.
2020-05-08 13:49:58 +02:00
AnotherTest
677568e3d4 LibGfx: Handle filling complex shapes better
This allows the painter to render filled complex shapes better, by
constructing a path graph for (interesting) intersecting lines and
omitting lines from the containing segments if they are detected
to take no part in defining the edges of a shape.

This approach would still fail if there are multiple logical shapes
that are confined to the collection of lines.
For instance, two polygons intersecting each other in a way that one
vertex of polygon A ends up inside polygon B.
we would detect that polygon A's edges are part of the shape
(technically correct) even though they are not a part of polygon B at
all.
2020-05-08 12:49:15 +02:00
Itamar
14ee090f25 HackStudio: Support variable inspection in nested scopes 2020-05-08 12:16:10 +02:00
Itamar
f0cbaf453c HackStudio: Close the debug tab when debugged program exits 2020-05-08 12:16:10 +02:00
Hüseyin ASLITÜRK
a3367cf4fa LibCore: DesktopServices, open fonts with FontEditor 2020-05-08 09:49:41 +02:00
Hüseyin ASLITÜRK
39a8db936a Applications: Replace SystemMenu name to hi voltage emoji 2020-05-08 09:49:41 +02:00
Hüseyin ASLITÜRK
cef2dce9a1 Base: Add emoji files for 26A1, 2B06 and 2B07 2020-05-08 09:49:41 +02:00
Hüseyin ASLITÜRK
f0f98de5d8 LibGUI: Fix for disable state of SpinBox 2020-05-08 09:49:41 +02:00
Matthew Olsson
532d4bc0ab LibJS: Spec-compliant equality comparisons
The ECMAScript spec defines multiple equality operations which are used
all over the spec; this patch introduces them. Of course, the two
primary equality operations are AbtractEquals ('==') and StrictEquals
('==='), which have been renamed to 'abstract_eq' and 'strict_eq' in
this patch.

In support of the two operations mentioned above, the following have
also been added: SameValue, SameValueZero, and SameValueNonNumeric.
These are important to have, because they are used elsewhere in the spec
aside from the two primary equality comparisons.
2020-05-08 09:49:20 +02:00
Devashish Jaiswal
cc01933840
AK: Declare LogStream::operator<<(const LogStream&, long) (#2155)
LogStream::operator<<(const LogStream&, long) was implemented in
AK/LogStream.cpp but the declaration was missing from the header.
2020-05-08 09:35:23 +02:00