Commit graph

10757 commits

Author SHA1 Message Date
Nico Weber
e34299a136 Ports: Remove dropbear patch that removed calls to seteuid()
This is no longer necessary now that seteuid() / setegid()
is implemented.
2020-06-19 20:34:59 +02:00
Nico Weber
748ac5e01b Ports: Pull dropbear from a mirror
The main web page has been offline for at least a week.
This gets the dropbear port building again.
2020-06-19 20:34:59 +02:00
Nico Weber
e89a82a476 LibC: Add support for POSIX_SPAWN_RESETIDS
This is possible now that seteuid() / setegid() are implemented.
2020-06-19 20:34:59 +02:00
Nico Weber
35c4a4971a CMake: Make the install step more zen
The "Installing $foo..." messages are just noise, so turn them off.
2020-06-19 20:34:25 +02:00
Hüseyin ASLITÜRK
dff5abb073 LibGfxDemo: Fix "90s-bg.png" path
Incorrect image file path cause the application to crash on startup.
2020-06-19 20:34:09 +02:00
Tom Lebreux
605a21b892 Userland: Add base64 tool 2020-06-18 23:21:41 +02:00
Tom Lebreux
e14c8b2707 AK: Add tests for Base64 decoder 2020-06-18 23:21:41 +02:00
Tom Lebreux
79529ffd47 AK: Add a simple and inefficient Base64 encoder
The test cases are taken from RFC 4648.
2020-06-18 23:21:41 +02:00
Nico Weber
dd53e070c5 Kernel+LibC: Remove setreuid() / setregid() again
It looks like they're considered a bad idea, so let's not add
them before we need them. I figured it's good to have them in
git history if we ever do need them though, hence the add/remove
dance.
2020-06-18 23:19:16 +02:00
Nico Weber
a38754d9f2 Kernel+LibC: Implement seteuid() and friends!
Add seteuid()/setegid() under _POSIX_SAVED_IDS semantics,
which also requires adding suid and sgid to Process, and
changing setuid()/setgid() to honor these semantics.

The exact semantics aren't specified by POSIX and differ
between different Unix implementations. This patch makes
serenity follow FreeBSD. The 2002 USENIX paper
"Setuid Demystified" explains the differences well.

In addition to seteuid() and setegid() this also adds
setreuid()/setregid() and setresuid()/setresgid(), and
the accessors getresuid()/getresgid().

Also reorder uid/euid functions so that they are the
same order everywhere (namely, the order that
geteuid()/getuid() already have).
2020-06-18 23:19:16 +02:00
Hüseyin ASLITÜRK
0001bbf182 QuickShow:If image is larger then window size resize it to fit the image 2020-06-18 23:18:11 +02:00
Hüseyin ASLITÜRK
79de1a33cf QuickShow: Add a new "Set as desktop wallpaper" action under Image menu 2020-06-18 23:18:11 +02:00
Hüseyin ASLITÜRK
12671e38e7 LibGUI: Add a new Window::is_maximized method 2020-06-18 23:18:11 +02:00
Hüseyin ASLITÜRK
5950736efa WindowServer: Add a new IsMaximized message
New message to query window maximized state.
2020-06-18 23:18:11 +02:00
Till Mayer
5bd0015583 FileManager: Small improvements to PropertyDialog's apply button logic
The apply button used to be enabled directly after opening the dialog.
Changes in the permissions now enable/disable the apply button as well.
2020-06-18 23:14:13 +02:00
Till Mayer
072e6a6405 WavLoader: Search for DATA marker by reading single bytes
Previously 4 bytes at once were read and compared to the string
"DATA". This worked when the DATA marker was aligned on a 32-bit
boundary relative to the start of the file. However, this is not
guranteed to always be the case, and for some files the loader
would just keep searching for the marker.
2020-06-18 23:13:48 +02:00
Andreas Kling
c053537321 keymap: Add copyright header 2020-06-18 23:00:19 +02:00
Andreas Kling
d480944f6a ClipboardHistory: Use pledge() and unveil() :^) 2020-06-18 22:34:15 +02:00
Andreas Kling
fe458f81ec KeyboardSettings: Call out to /bin/keymap to actually set the keymap
Now that KeyboardSettings is no longer setuid-root, we have to call out
to a helper program to actually set the keymap.

This is a very nice improvement to system security. :^)
2020-06-18 22:29:09 +02:00
Andreas Kling
6e78279614 keymap: Add back a tiny utility for setting the system keyboard layout
This patch removes the setuid-root flag from the KeyboardSettings GUI
application and adds back the old "keymap" program.

It doesn't feel very safe and sound to have a GUI program runnable
as setuid-root, so in the next patch I'll be making KeyboardSettings
call out to the "keymap" program to do its bidding.
2020-06-18 22:19:57 +02:00
Andreas Kling
0609eefd57 Kernel: Add "setkeymap" pledge promise 2020-06-18 22:19:36 +02:00
Andreas Kling
033da11364 LibGUI: Fix MessageBox width calculation not including the icon width 2020-06-18 22:18:19 +02:00
Andreas Kling
07b06cdc7e LibWeb: Fix broken #include after moving files around 2020-06-18 22:01:05 +02:00
Andreas Kling
995d93c9d9 LibWeb: Move StackingContext from Layout/ to Painting/
The stacking context tree doesn't affect layout at all, so let's move
it into the Painting/ directory. I'm not sure yet if it's worth going
for a fullly separate painting tree. So far I'm thinking a stacking
context tree with pointers into the layout tree might be enough.
2020-06-18 21:42:19 +02:00
Andreas Kling
8c82d26668 LibWeb: Rename LayoutNode::render() to paint()
"Paint" matches what we call this in the rest of the system. Let's not
confuse things by mixing paint/render/draw all the time. I'm guilty of
this in more places..

Also rename RenderingContext => PaintContext.
2020-06-18 21:37:20 +02:00
Andreas Kling
dec0cd3755 LibWeb: Respect min-width and max-width on position:absolute elements 2020-06-18 21:31:20 +02:00
Andreas Kling
55a3575a7c LibWeb: More work on width of position:absolute elements
The shrink-to-fit width algorithm actually works a little bit different
in the absolute positioning context, so it can't share all of its code
with non-absolute positioning.

Also, inline-block elements were always inserting unnecessary line
breaks when splitting, which caused the preferred width to be smaller
than it should be. This patch fixes that as well, by just not breaking
after inline-block elements in LayoutMode::OnlyRequiredLineBreaks.
2020-06-18 21:16:29 +02:00
Andreas Kling
cfab53903f LibWeb: Separate layout tree rendering into phases
CSS defines a very specific paint order. This patch starts steering us
towards respecting that by introducing the PaintPhase enum with values:

- Background
- Border
- Foreground
- Overlay (internal overlays used by inspector)

Basically, to get the right visual result, we have to render the page
multiple times, going one phase at a time.
2020-06-18 18:57:35 +02:00
Andreas Kling
abe811104f LibWeb: Better width computation for position:absolute blocks
This patch basically translates the CSS2.2 spec language into C++ for
computing the  width of absolutely positioned non-replaced elements.
2020-06-18 18:28:32 +02:00
Andreas Kling
3f87c98f44 Base: Fix broken ACID2 browser bookmark :^) 2020-06-18 16:47:04 +02:00
William McPherson
34ee76984c Piano: Expose multi-track functionality
This commit adds some actions for creating and cycling through tracks.

set_octave_and_ensure_note_change() was refactored to allow switching
tracks to implement the same behaviour.

KnobsWidget is getting pretty bad.
2020-06-18 16:42:37 +02:00
William McPherson
ee52572ca1 Piano: Allow multiple tracks internally
This commit adds multi-track functionality without exposing it to the
user.

All I really did was rename AudioEngine to Track and allow more than one
Track in TrackManager. A lot of the changes are just changing widgets to
take a TrackManager and use current_track().

The TrackManager creates Tracks and gives them a read-only reference to
the global time value. When the TrackManager wants to fill a sample in
the buffer (in fill_buffer()), it calls fill_sample() on each Track.

The delay code is slightly different - a Track will fill its
m_delay_buffer with the sample it just created rather than the most
recent sample in the buffer (which used to be the same thing).

TrackManager manages the current octave.

Other than those few things, this is a pretty basic separation of
concerns.
2020-06-18 16:42:37 +02:00
Hüseyin ASLITÜRK
db5b28b78e DownloadWidget: Use GUI::Image instead of Label to show image 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
d139df706a Welcome: Replace Label with Image component to show banner and app icon 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
d0411f3756 Minesweeper: Replace Label with Image component to show flag and timer 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
0a2dc1f5c0 AboutDialog: Replace Label with Image to show banner and app icon 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
77c8a960ad NotificationWindow: Replace Label with Image component to show icons 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
030d0f9937 MessageBox: Replace Label with Image component to show icons 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
3a676c6fd2 ClipboardHistory: Replace IconWidget with GUI::Image 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
56e82a2c07 FilePicker: Replace Label with Image component to show icons 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
02eb268c3e FileManager: Replace Label with Image component to show icons 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
900aaf68d4 WidgetGallery: Add Image component demo for png and animated gif files 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
49c801f7fd LibGfx: Fix color alfa for transparent color in GIFLoader 2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
ccb0d00020 LibGUI: Add a new GUI::Image component for display images
New GUI::Image component for replace Label usage for icons and images.
2020-06-18 16:35:57 +02:00
Hüseyin ASLITÜRK
4e43cd8252 Base: Add a new download-animation.gif 2020-06-18 16:35:57 +02:00
Érico Nogueira Rolim
fef9ad520b
Toolchain: Use curl instead of wget (#2574)
- For Linux: curl is already listed as a dependency;
- For macOS: curl is pre-installed;
- For OpenBSD and FreeBSD: curl is a dependecy of git.
2020-06-18 16:31:12 +02:00
LepkoQQ
73bcc01143 Base: Add slovenian keymap 2020-06-18 16:28:20 +02:00
LepkoQQ
83edbd05cf Base: Add slovenian characters to Katica and Csilla fonts 2020-06-18 16:28:20 +02:00
Andreas Kling
10fd862a55 Kernel: Unbreak sys$setkeymap()
This syscall was disabling SMAP too late and would crash every time
when trying to set a new keymap.
2020-06-17 20:32:53 +02:00
Andreas Kling
2ad1c2d959 LibWeb: Add PageClient::palette() for view-agnostic palette access 2020-06-17 20:26:59 +02:00