Commit graph

1407 commits

Author SHA1 Message Date
Andreas Kling 167da1fa84 Browser: Show website favicons in the location bar :^) 2020-06-29 20:35:53 +02:00
Andreas Kling b8a50e9d89 FileManager: Show a folder icon in the location text box :^) 2020-06-29 20:35:39 +02:00
Nico Weber 12cbc4ad0d Everywhere: Replace some uses of fork/exec with posix_spawn
It's less code, and it's potentially more efficient once
posix_spawn is a real syscall.
2020-06-29 12:04:27 +02:00
devashish 9f58624802 DisplaySettings: Allow setting wallpapers from outside /res/wallpapers
Ideally, we would copy the file to `/res/wallpapers`, add an entry to
`ComboBox` model and set the index to this entry. I didn't want to
touch anything outside of `DisplaySettings`, so this is more of a
workaround :^)
2020-06-28 00:06:09 +02:00
Andrew Kaster 3a4e121904 Browser: Add right-click context menu to tabs
Right clicking on a position in the PageView of a tab will open a
context menu with common actions like back, forward, reload, view
source and inspect DOM. :^)
2020-06-28 00:05:08 +02:00
Hüseyin ASLITÜRK d28a824d4c
QuickShow: Fix for zooming with mouse wheel (#2650)
Fixes #2648.
2020-06-28 00:04:11 +02:00
Andreas Kling 85ac7dc1b1 TextEditor: Add live preview for HTML documents :^)
This allows you to edit HTML and see the changes live. This feature is
possibly my favorite feature in the world right now.
2020-06-26 22:47:29 +02:00
Andreas Kling 981f403287 IRCClient: Remove duplicate <div> wrapper around colored messages 2020-06-26 11:59:04 +02:00
Andreas Kling 6293d1a13c LibWeb+Browser: Remove old HTML parser :^)
The new parser is now used everywhere and it's working pretty well!
2020-06-26 00:53:25 +02:00
Andreas Kling 6c783dbf62 IRCClient: Use Web::Element::set_inner_html()
Instead of invoking the (old) fragment parser directly.
2020-06-26 00:53:25 +02:00
Andreas Kling 10255bc5c6 LibWeb+Browser: Decode non-animated images out-of-process :^)
We now use the ImageDecoder service in LibWeb for everything except
GIF images (we'll have to deal with them later, ofc.)

This has a little bit of overhead but we should be able to optimize
it until it becomes negligible.
2020-06-22 21:47:01 +02:00
Andreas Kling 1f97897b40 TextEditor: Use Web::PageView::load_html() for the markdown preview 2020-06-21 21:54:30 +02:00
Andreas Kling 1c54272b41 Help: Use Web::PageView::load_html()
Instead of invoking the HTML parser directly.
2020-06-21 21:54:30 +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
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
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
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 02eb268c3e FileManager: Replace Label with Image component to show icons 2020-06-18 16:35:57 +02:00
Sergey Bugaev 363b7351b8 FileManager: Use Core::File::read_link() 2020-06-17 15:02:03 +02:00
Hüseyin ASLITÜRK ea1ebe8662 QuickShow: Add reset zoom action to toolbar
When zoom reset also reset pan origin
2020-06-16 14:42:18 +02:00
Hüseyin ASLITÜRK bf3d98012a QuickShow: Switch to full screen mode on double click
More respect to user behavior on image viewers :)
2020-06-16 14:42:18 +02:00
Hüseyin ASLITÜRK 1887e35dc8 KeyboardMapper: Replace char data type to u32 for code point 2020-06-16 13:15:17 +02:00
Hüseyin ASLITÜRK 3a903babee QuickShow: Use new Bitmap::is_path_a_supported_image_format method 2020-06-15 22:42:23 +02:00
Andreas Kling 1678aaa555 ProtocolServer+LibProtocol: Propagate HTTP status codes to clients
Clients now receive HTTP status codes like 200, 404, etc.
Note that a 404 with content is still considered a "successful"
download from ProtocolServer's perspective. It's up to the client
to interpret the status code.

I'm not sure if this is the best API, but it'll work for now.
2020-06-13 22:20:37 +02:00
Matthew Olsson e8e728454c AK: JsonParser improvements
- Parsing invalid JSON no longer asserts
    Instead of asserting when coming across malformed JSON,
    JsonParser::parse now returns an Optional<JsonValue>.
- Disallow trailing commas in JSON objects and arrays
- No longer parse 'undefined', as that is a purely JS thing
- No longer allow non-whitespace after anything consumed by the initial
  parse() call. Examples of things that were valid and no longer are:
    - undefineddfz
    - {"foo": 1}abcd
    - [1,2,3]4
- JsonObject.for_each_member now iterates in original insertion order
2020-06-13 12:43:22 +02:00
Hüseyin ASLITÜRK 3ebdb5ea30 Application: KeyboardMapper, make button to like a real key
Change key paint to more like a real key :)
2020-06-13 12:36:30 +02:00
Andreas Kling 6f19067c9a LibWeb+Browser: Add a barebones LayoutTreeModel to the inspector window
This allows you to inspect the layout tree, along side the DOM tree.
It will need more functionality to be truly useful, but it's a start.
2020-06-12 22:30:11 +02:00
Andreas Kling 68ae1de463 Browser: Be a little bit smarter about interpretering command line URLs
If the (optional) URL specified on the command line is an existing file
we now resolve its real path before turning into a URL. This makes
relative URLs inside the loaded document work correctly.

Also interpret all other specified URLs the same way we would if you
had typed them into the location bar.
2020-06-12 21:29:27 +02:00
Andreas Kling fdfda6dec2 AK: Make string-to-number conversion helpers return Optional
Get rid of the weird old signature:

- int StringType::to_int(bool& ok) const

And replace it with sensible new signature:

- Optional<int> StringType::to_int() const
2020-06-12 21:28:55 +02:00
Sergey Bugaev eb3700c565 Calendar: Fix using OwnPtr<> with RefCounted types 2020-06-12 16:08:45 +02:00
Andreas Kling 116cf92156 LibGfx: Rename Rect,Point,Size => IntRect,IntPoint,IntSize
This fits nicer with FloatRect,FloatPoint,FloatSize and gives a much
better visual clue about what type of metric is being used.
2020-06-10 10:59:04 +02:00
Andreas Kling 5042e560ef LibJS: Make more Interpreter functions take a GlobalObject& 2020-06-08 21:25:16 +02:00
Andreas Kling 92392398a2 LibWeb: Add Page abstraction between PageView and main Frame
* A PageView is a view onto a Page object.
* A Page always has a main Frame (root of Frame tree.)
* Page has a PageClient. PageView is a PageClient.

The goal here is to allow building another kind of view onto
a Page while keeping the rest of LibWeb intact.
2020-06-08 21:12:20 +02:00
Hüseyin ASLITÜRK ddeb0ab1ad Applications: Add new KeyboardSettings application
GUI application to manage Keyboard settings.
2020-06-08 09:28:18 +02:00
Andreas Kling 896db187e5 LibWeb: Move Frame.{cpp,h} into a new Frame/ directory 2020-06-07 10:14:41 +02:00
Andreas Kling d127492f0e TextEditor: Allow "TextEditor foo.txt" to create a new file
Attempting to open a non-existent file from the command line should not
fail, it should just open a new text document with that name. Note that
the file is not created until you actually save it.
2020-06-04 22:15:10 +02:00
Andreas Kling 959de19418 LibWeb: Process style sheets in document order
Until now we would simply apply stylesheets in the order they finished
loading. This patch adds a StyleSheetList object that hangs off of each
Document and contains all the style sheets in document order.

There's still a lot of work to do for a proper cascade, but at least
this makes us consistently wrong every time. :^)
2020-06-04 16:06:32 +02:00
Hüseyin ASLITÜRK d315281d56 PixelPaint: Use new app-pixel-paint.png for app icon 2020-06-04 12:34:31 +02:00
Andreas Kling 6c09420571 KeyboardMapper: Add missing #pragma once 2020-06-03 22:06:08 +02:00
Hüseyin ASLITÜRK d3578fdf9b Applications: Add new KeyboardMapper application
New editing app for keymap files.
2020-06-03 21:52:40 +02:00
Sergey Bugaev e651af21f8 Calculator: Set text color through the palette
Unfortunately, this means the Calculator won't pick up system theme changes
dynamically.

Fixes https://github.com/SerenityOS/serenity/issues/1077
2020-06-02 21:49:47 +02:00
Linus Groh a48080f62d LibJS: Move Interpreter::get_trace() to ConsoleClient
Having it globally on the interpreter is confusing as the last call frame
is skipped, which is specific to console.trace().
2020-06-02 15:22:34 +02:00
Linus Groh 871d88cd91 FontEditor: Fix typo in comment
s/Ediyor/Editor/
2020-06-02 14:38:17 +02:00
Andreas Kling 6ed11f1d1c LibWeb: Move ResourceLoader into a new Loader/ directory 2020-06-01 20:42:50 +02:00
Andreas Kling 8766e49a7c LibWeb+Browser: Use the new HTML parser by default
You can still run the old parser with "br -O", but the new one is good
enough to be the default parser now. We'll fix issues as we go and
eventually remove the old one completely. :^)
2020-06-01 19:08:31 +02:00