Commit graph

8789 commits

Author SHA1 Message Date
Brian Gianforcaro
1a80aa999a AK: Add timeval_to_timespec and timespec_to_timeval conversion methods
Add the ability to easily convert between timeval and timespec.
2020-04-26 21:31:52 +02:00
Hüseyin ASLITÜRK
089022e7f6 Applications: Add "thread" for HexEditor
HexEditor crashes during try OpenFile dialog.
2020-04-26 21:31:41 +02:00
Hüseyin ASLITÜRK
59f87d12d0 Base: 32x32 icons for cplusplus and header file types 2020-04-26 21:31:41 +02:00
Andres Vieira
88368df9a2 Base+Browser: Add an icon for the serenity Browser and make it use it
Browser was using the filetype-html icon instead of a dedicated one, so
we now have the globe from that icon reimagined and in good Buggie
company :^)
2020-04-26 21:13:57 +02:00
Linus Groh
14c7988eea LibJS: Implement Number.isInteger() 2020-04-26 20:36:59 +02:00
Linus Groh
7bd6b58b29 LibJS: Implement Number.isNaN()
Like the global isNaN() without the number coercion.
2020-04-26 20:36:59 +02:00
Linus Groh
c350f5ae67 LibJS: Implement Number.isFinite()
Like the global isFinite() without the number coercion.
2020-04-26 20:36:59 +02:00
LepkoQQ
b094c064d8 Base: Add test page for decoding different basic png formats. 2020-04-26 20:29:17 +02:00
LepkoQQ
e5a598414f LibGfx: PNGLoader support for grayscale images with alpha. 2020-04-26 20:29:17 +02:00
LepkoQQ
d009df074f LibGfx: PNGLoader support for grayscale images with 8/16bpp. 2020-04-26 20:29:17 +02:00
Andreas Kling
2778d077e5 LibJS: Grow storage when adding a property to uniquely-shaped Object
Normally the storage would be expanded by set_shape() upon transition
to a new shape, but if the shape is already unique, there is no new
transition so we have to expand the storage manually.
2020-04-26 19:05:08 +02:00
Hüseyin ASLITÜRK
c9c1d1fae0 LibGUI: Create thumnail for gif files 2020-04-26 18:44:20 +02:00
Hüseyin ASLITÜRK
e7b9e03285 LibCore: Open gif files with QuickShow 2020-04-26 18:44:20 +02:00
Hüseyin ASLITÜRK
679702045d QuickShow: Add gif files to navigation file list 2020-04-26 18:44:20 +02:00
LepkoQQ
35dda6222e Base: Improve cursor arrow to feel more symetrical 2020-04-26 18:17:46 +02:00
Linus Groh
9540174b40 js: Follow Serenity C++ naming conventions 2020-04-26 18:09:22 +02:00
Andreas Kling
37918d4141 Revert "LibGUI: Use bold font for the currently active TabWidget tab"
This reverts commit 4d8206f7c2.

This was not visually pleasant. We'll have to come up with some better
way to distinguish the active tab in Browser.
2020-04-26 17:46:16 +02:00
Andreas Kling
fb826aa59a Kernel: Make sys$sethostname() superuser-only
Also take the hostname string lock exclusively.
2020-04-26 15:51:57 +02:00
Andreas Kling
f897c41092 LibJS: Implement basic support for the "delete" operator
It turns out "delete" is actually a unary op :)
This patch implements deletion of object properties, it doesn't yet
work for casually deleting properties from the global object.

When deleting a property from an object, we switch that object to
having a unique shape, no longer sharing shapes with others.
Once an object has a unique shape, it no longer needs to care about
shape transitions.
2020-04-26 15:51:07 +02:00
Andres Vieira
1617be1e6f FileManager: Disable open_parent_directory_action if the new path is "/" 2020-04-26 15:26:01 +02:00
Linus Groh
421b6cd393 WebServer: Add optional positional port agument
This allows us to start WebServer on a port other than 8000, or multiple
instances of it at the same time :^)

Also print out what port was being used in the end.
2020-04-26 14:46:32 +02:00
Linus Groh
38ba13e912 LibJS: Implement Object.is()
Basically === with two particularities: comparing NaN to itself is
considered equal and comparing +0 and -0 is not.
2020-04-26 13:53:05 +02:00
Luke Payne
f191b84b50 Kernel: Added the ability to set the hostname via new syscall
Userland/hostname: Now takes parameter to set the hostname
LibC/unistd: Added sethostname function
2020-04-26 12:59:09 +02:00
bcoles
03f68a51af
Userland: Add arp utility (#1962) 2020-04-26 12:54:22 +02:00
Brian Gianforcaro
0f3990cfa3 Kernel: Support signaling all processes with pid == -1
This is a special case that was previously not implemented.
The idea is that you can dispatch a signal to all other processes
the calling process has access to.

There was some minor refactoring to make the self signal logic
into a function so it could easily be easily re-used from do_killall.
2020-04-26 12:54:10 +02:00
Brian Gianforcaro
597ff9ec93 Userland: Fix kill to support negative pid values.
The kill system call accepts negative pids, as they
have special meaning:

    pid == -1 means all processes the calling process has access to.

    pid < -1 means every process who's process group ID is -pid.

I don't see any reason why the user space program should mask this.
2020-04-26 12:54:10 +02:00
Brian Gianforcaro
1f64e3eb16 Kernel: Implement FUTEX_WAKE of arbitrary count.
Previously we just woke all waiters no matter how many were
requested. Fix this by implementing WaitQueue::wake_n(..).
2020-04-26 12:35:35 +02:00
Linus Groh
e8f6f655bf LibGUI: Use filetype-text icon for .md files 2020-04-26 01:12:14 +02:00
Linus Groh
634c834283 LibGUI: Use filetype-header icon for .h files 2020-04-26 01:12:14 +02:00
Linus Groh
4d0a344da0 Base+LibGUI: Add icon for Python files 2020-04-26 01:12:14 +02:00
Linus Groh
9de184d883 LibGUI: Use enumerator macros for filetype icons 2020-04-26 01:12:14 +02:00
Linus Groh
a36ceffb56 Emoji: Rename U+1F600.png to U+1F41E.png (ladybug)
The image for U+1F600 "GRINNING FACE" shows a ladybug, but the
codepoint of that emoji is actually U+1F41E "LADY BEETLE" :^)
2020-04-26 01:12:03 +02:00
Andreas Kling
35aea2e454 LibJS: Stop using Optional<Value> in favor of Value's empty state
JS::Value already has the empty state ({} or Value() gives you one.)
Use this instead of wrapping Value in Optional in some places.
I've also added Value::value_or(Value) so you can easily provide a
fallback value when one is not present.
2020-04-25 18:45:22 +02:00
Peter Nelson
5adf4901df LibGfx: Fix crash on decoding small gifs
The LZW decode step will now copy and pad LZW data out to 4 bytes if there are
less than 4 bytes remaining in the buffer. This means it will now also work when
the total size of the LZW image data is less than 4 bytes.
2020-04-25 18:37:13 +02:00
Andreas Kling
421619fe2f Browser: Rejig the "on_load_counter_change" hook when switching tabs
This feels a little shoddy, but we need to make sure that updates end
up on the right statusbar (since there is one statusbar per tab.)
2020-04-25 17:27:55 +02:00
Andreas Kling
9093625546 Browser: Unveil /etc/passwd so we can find our home directory if needed
Fixes #1952.
2020-04-25 17:21:59 +02:00
Andreas Kling
bd45b2b8d3 Browser: Share one BookmarksBarWidget between all Tabs 2020-04-25 17:20:23 +02:00
Andreas Kling
dc6b61dbcc LibGUI: Add ToolBar and ToolBarContainer to Forward.h 2020-04-25 17:20:10 +02:00
Andreas Kling
1887dc6de4 LibGUI: Make ToolBarContainer better at reacting to child events
Now you can remove a ToolBar from a ToolBarContainer and it will update
its own preferred size automatically.
2020-04-25 17:16:05 +02:00
Andreas Kling
9c772a64a1 LibGfx: Don't proceed with GIF format sniffing if stream read fails 2020-04-25 17:03:40 +02:00
Kesse Jones
838127df35 LibJS: Add String.prototype.includes 2020-04-25 16:54:25 +02:00
Drew Stratford
4a37362249 LibPthread: implicitly call pthread_exit on return from start routine.
Previously, when returning from a pthread's start_routine, we would
segfault. Now we instead implicitly call pthread_exit as specified in
the standard.

pthread_create now creates a thread running the new
pthread_create_helper, which properly manages the calling and exiting
of the start_routine supplied to pthread_create. To accomplish this,
the thread's stack initialization has been moved out of
sys$create_thread and into the userspace function create_thread.
2020-04-25 16:51:35 +02:00
Peter Nelson
4cb765e520 LibGfx: Remove unnecessary casts 2020-04-25 16:49:09 +02:00
Peter Nelson
76cbfe1c38 LibGfx: Minor changes to adhere to code style guidelines 2020-04-25 16:49:09 +02:00
Peter Nelson
e159370ccb LibWeb: Handle .gifs as images and use ImageDecoder to decode them 2020-04-25 16:49:09 +02:00
Peter Nelson
a1c0eb1e1d LibGfx: Remove debug output 2020-04-25 16:49:09 +02:00
Peter Nelson
9a2c8102cd LibGfx: Use content sniffing to choose which ImageDecoder plugin to use 2020-04-25 16:49:09 +02:00
Peter Nelson
2cd9716b38 LibGfx: Add a sniff method to ImageDecoder and implement for GIF and PNG
The sniff method is intended to be used for content sniffing. It should be a
cheap test to rapidly rule out whether a candidate image can be successfully
decoded. For the GIF and PNG implementations it simply attempts to decode the
image header, returning true if successful and false if not.
2020-04-25 16:49:09 +02:00
Peter Nelson
df0d6e241c LibGfx: Extract GIF header decoding into separate function 2020-04-25 16:49:09 +02:00
Peter Nelson
d5af7b220c LibGfx: implement remaining GIFImageDecoderPlugin methods 2020-04-25 16:49:09 +02:00