Commit graph

5247 commits

Author SHA1 Message Date
Andreas Kling 61f611bf3c IPv4: Protect the list of unacked TCP packets with a lock
Otherwise things get racy and crashy.
2019-11-23 21:44:47 +01:00
Andreas Kling dc9d44d7b1 IPCCompiler: Add support for String parameters in messages 2019-11-23 21:44:00 +01:00
Andreas Kling 20c957ef61 LibCore: Have CNetworkJob protect itself during the on_finish callback
Otherwise, the callback may trigger the destruction of the CNetworkJob
and make it difficult to continue execution correctly.
2019-11-23 21:42:02 +01:00
Andreas Kling 5d8324f133 Applications: Remove unused/unfinished "Downloader" program 2019-11-23 19:26:57 +01:00
Andreas Kling 8f9a522c37 HackStudio: Highlight matching pairs of [ and ] as well
Also refactor the token pair matching code a little bit to not repeat
ourselves so much. :^)
2019-11-23 17:49:14 +01:00
Andreas Kling fc14bdd442 LibGUI: Don't recompute line-wrapping over and over during set_text()
This makes the TextEditor start up fast for large files again.
2019-11-23 17:41:14 +01:00
Andreas Kling 9a157b5e81 Revert "Kernel: Move Kernel mapping to 0xc0000000"
This reverts commit bd33c66273.

This broke the network card drivers, since they depended on kmalloc
addresses being identity-mapped.
2019-11-23 17:27:09 +01:00
Andreas Kling f61ed8eab5 WindowServer: Listen for muted state changes from AudioServer
Now the menu audio icon updates between muted/unmuted when anything in
the system changes the muted state. :^)
2019-11-23 17:21:28 +01:00
Andreas Kling 84cb91de38 AudioServer: Broadcast muted state changes to all clients 2019-11-23 17:21:12 +01:00
Andreas Kling 00ab9488ad LibDraw: Start work on a GIF decoder (not yet functional!)
Here comes the first part of a GIF decoder. It decodes up to the point
of gathering all the LZW-compressed data. The next step is to implement
decompression, and then turn the decompressed data into a bitmap using
the color maps, etc.
2019-11-23 16:50:21 +01:00
Andreas Kling 630d5b3ffd LibIPC+AudioServer: Allow unsolicited server-to-client IPC messages
Client-side connection objects must now provide both client and server
endpoint types. When a message is received from the server side, we try
to decode it using both endpoint types and then send it to the right
place for handling.

This now makes it possible for AudioServer to send unsolicited messages
to its clients. This opens up a ton of possibilities :^)
2019-11-23 16:50:21 +01:00
Andreas Kling 06ee24263c Meta: The Qt Creator .files refresh script should pick up .c files 2019-11-23 16:50:21 +01:00
Andreas Kling 5a84944dc8 LibVT: Don't scroll to bottom for Ctrl/Alt/Shift
It's nice that we scroll the cursor into view when typing in a terminal
but it's not necessary when pressing only Ctrl, Alt of Shift.
2019-11-23 16:50:21 +01:00
Till Mayer 09189e34e3 FileManager: Added support for deleting directories
Directories can now be deleted using the "Delete..." action from the
context menu
2019-11-23 16:38:24 +01:00
Andreas Kling 9009390f9c WindowServer: Add an audio icon to the menu bar
Clicking on this icon toggles the AudioServer muted state.

It currently does not react to muted state changes caused by other
programs, since it has no way of learning about those from AudioServer,
other than performing a synchronous IPC call (GetMuted), which we don't
want to be doing in the WindowServer :^)
2019-11-22 22:15:39 +01:00
Andreas Kling 6fbe0f17f2 Docs: Add avol(1) 2019-11-22 21:52:52 +01:00
Andreas Kling 107011f119 AudioServer: Allow muting the system audio
This patch adds muting to ASMixer, which works by substituting what we
would normally send to the sound card with zero-filled memory instead.
We do it this way to ensure that the queued sample buffers keep getting
played (silently.)

This is obviously not the perfect way of doing this, and in the future
we should improve on this, and also find a way to utilize any hardware
mixing functions in the sound card.
2019-11-22 21:44:02 +01:00
Sergey Bugaev 2b9ec22576 WindowServer: Optimize backing store placement for resizing windows
When a window is being resized, its size may differ from the size of its backing
store. In this case, peek at the direction the window is being resized in, and
render the backing store at the same place as it was previously.

https://github.com/SerenityOS/serenity/issues/52
2019-11-22 18:42:31 +01:00
Sergey Bugaev 555b4236f8 WindowServer: Ensure resized windows move in the expected direction
When a window is being interactively resized, there are several rules
beyond the actual mouse movement that can impact the new size of the
window, such as its size increments and minimum size limit.

Move the placement logic after applying all the sizing logic, so that
whatever final size the window ends up with, the sides of the window
that do move are the ones that the user is dragging.

https://github.com/SerenityOS/serenity/issues/52
2019-11-22 18:42:31 +01:00
Jesse Buhagiar bd33c66273 Kernel: Move Kernel mapping to 0xc0000000
The kernel is now no longer identity mapped to the bottom 8MiB of
memory, and is now mapped at the higher address of `0xc0000000`.

The lower ~1MiB of memory (from GRUB's mmap), however is still
identity mapped to provide an easy way for the kernel to get
physical pages for things such as DMA etc. These could later be
mapped to the higher address too, as I'm not too sure how to
go about doing this elegantly without a lot of address subtractions.
2019-11-22 16:23:23 +01:00
Andreas Kling 61ba19f031 LibHTML: Handle stand-alone attribute selectors
A selector like "[foo]" is now parsed as a universal selector component
with an attribute match type. Pretty neat :^)
2019-11-21 20:19:00 +01:00
Andreas Kling c02f560f73 LibHTML: Parse <element attribute=value> correctly
We were not committing the attribute at all in this case.
2019-11-21 20:18:18 +01:00
Andreas Kling 8946e50986 LibHTML: Implement some attribute selector support
This patch adds a[foo] and a[foo=bar] attribute selectors.

Note that an attribute selector is an optional part of a selector
component, and not a component on its own.
2019-11-21 20:07:43 +01:00
Andreas Kling 54a6ae9201 LibHTML: Make the HTML parser handle <div attr> and <div attr="">
We were not producing the correct DOM attribute in either of those
cases. "<div attr>" would produce no attribute, and the other would
produce an attribute with null value (instead of an empty value.)
2019-11-21 20:06:10 +01:00
Andreas Kling bd857cd0fa Browser: Add a debug menu action to dump the current style sheets 2019-11-21 19:52:09 +01:00
Andreas Kling 9f0ca1bfb0 LibHTML: Paint text background color before the underline decoration 2019-11-21 13:15:11 +01:00
Drew Stratford ee0eed26f4 Ext2FileSystem: set_metadata_dirty(true) during write_directory().
This adds a call to set_metadata_dirty(true) to
Ext2FS::write_directory(). This fixes a bug wherein InodeWatchers
weren't alerted on directory updates.
2019-11-21 13:04:38 +01:00
Andreas Kling 554f28901b Kernel: Build with -fno-asynchronous-unwind-tables
We'll never use exceptions in the kernel, so there's no need for unwind
tables and we can save ourselves some space.
2019-11-21 12:47:49 +01:00
Till Mayer b0b523e973 FileManager: Added properties dialog
The user can rename files, change the permissions and view different
properties of the file.
2019-11-20 23:23:57 +01:00
Andreas Kling e630ad5927 GTableView: Don't allow resizing columns to a negative width
This is definitely not perfect but better than letting you put the
GTableView into a weird state with negative column widths. :^)
2019-11-20 22:27:12 +01:00
Andreas Kling e08d605f72 GTableView: Don't hover-highlight unsortable column headers
The hover highlight is meant to indicate that the button is pressable.
Non-sortable columns are not pressable.
2019-11-20 22:23:51 +01:00
Andreas Kling 16c290e8d5 GTableView: Highlight the hovered column header
This makes it feel even *more* like a proper button.
2019-11-20 22:19:30 +01:00
Andreas Kling 191535d626 LibGUI: Make the GTableView column headers behave like proper buttons
Previously they would resort based on the column immediately when you
mousedown on them. Now we track the click event and show the header
in a pressed state, etc. The usual button stuff :^)
2019-11-20 22:11:43 +01:00
Andreas Kling 0b0017bbbd LibGUI: Make the GTableView row background colors a little brighter
This has been bothering me for a long time.. :^)
2019-11-20 21:52:34 +01:00
Andreas Kling 386bf8b763 LibVT: Don't implicitly copy the selection on double-click or mouse-up 2019-11-20 21:47:12 +01:00
Andreas Kling dabdd484f7 LibVT: Add a context menu to TerminalWidget
Starting with only the copy and paste actions. But I'm sure we can come
up with some more things to put here. :^)
2019-11-20 21:47:12 +01:00
Andreas Kling dbf8d6bc1e Terminal+LibVT: Switch Terminal to using explicit copy/paste actions
Instead of implicitly copying whatever you select, and pasting when you
middle-click, let's have traditional copy and paste actions bound to
Ctrl+Shift+C and Ctrl+Shift+V respectively.
2019-11-20 21:47:12 +01:00
Andreas Kling 6fa26c73e2 LibVT: Use the middle mouse button for pasting (instead of right)
This will allow us to show a context menu when you right-click,
which will feels more consistent with the rest of the Serenity desktop.
2019-11-20 21:47:12 +01:00
Andreas Kling ef552add6c Terminal: Add action to open a new terminal with Ctrl+Shift+N 2019-11-20 21:47:12 +01:00
Sergey Bugaev 3df521e2b7 AudioServer: Make all source files depend on generated sources
This fixes race conditions & failures during build.
2019-11-19 20:10:38 +01:00
Andreas Kling 9a6388f718 LibHTML: Render a background-color behind line box fragments if needed 2019-11-19 19:23:14 +01:00
Andreas Kling 5a04472470 LibHTML: Fix bug in removal of trailing whitespace from line boxes
This code was using the text from the DOM as a reference for how much
whitespace to remove from the end of a line box.

Since the DOM may contain uncollapsed whitespace, it would sometimes
be out of sync with the collapsed text used by the rest of the layout
system.
2019-11-19 19:21:47 +01:00
Andreas Kling 1fe2cca439 LibHTML: Use LayoutText::text_for_rendering() in layout tree dumps
This way the fragment offsets make a lot more sense, since they assume
whitespace has already been collapsed.
2019-11-19 18:36:33 +01:00
Andreas Kling dce7646882 LibHTML: Failed font lookups should use a bold fallback when fitting
If we fail to find the font specified by a page, but we do have some
font-weight information, use a bold fallback font for bold weights.
2019-11-19 18:23:58 +01:00
Andreas Kling 1fd5869490 LibHTML: Tolerate empty CSS rules
A rule that contains nothing but whitespace is still a valid rule.
2019-11-19 18:23:18 +01:00
Andreas Kling 56dad2272c LibHTML: Implement the universal selector ("*") 2019-11-19 18:23:09 +01:00
Andreas Kling 516708aab2 LibHTML: Don't crash when stringifying an unknown CSS property
Instead, just log that it happened, and then we can track it down.
2019-11-19 18:21:12 +01:00
Andreas Kling e87b9e2d7c LibHTML: Add the CSS "position" property to CSS/Properties.json 2019-11-19 18:20:54 +01:00
Andreas Kling 0405ab91aa LibHTML+AK: Move URL completion from Document to AK::URL
Completing a relative URL based on a base URL seems like generally
useful functionality.
2019-11-19 17:46:36 +01:00
Sergey Bugaev 47326042c5 Ports: Make sure Bash loads its built-in commands statically
Bash's configure script is checking whether the system has dlopen().
We do, but it doesn't actually work (yet). So patch the check out.
2019-11-19 16:03:25 +01:00