Andreas Kling
6469d7f043
LibHTML: Flesh out the code to dump a StyleSheet object graph.
2019-06-25 06:31:47 +02:00
Andreas Kling
048705e1c2
Kernel: Share code between all the exceptions that cause process crash.
2019-06-25 05:55:18 +02:00
Andreas Kling
583606a2b1
StringImpl: Fix possible uninitialized access in StringImpl::create().
...
If the provided length is 0, there's no need to dereference the const char*.
2019-06-24 14:38:44 +02:00
Andreas Kling
643a43f278
AK: Add JsonValue::to_string(default_value = {}).
2019-06-24 14:25:45 +02:00
Andreas Kling
266fed8c00
AK: Let's put the JSON parsing in a separate class.
2019-06-24 13:39:45 +02:00
Andreas Kling
8392c549a3
JsonValue: Add as_array() and as_object().
2019-06-24 12:03:31 +02:00
Andreas Kling
dd36f797d5
JsonObject: Let the compiler generate a copy constructor.
...
This was only needed while HashMap was noncopyable. :^)
2019-06-24 12:03:11 +02:00
Andreas Kling
15003245cd
JsonArray: Add for_each() helper.
2019-06-24 12:02:31 +02:00
Andreas Kling
2c1c4ab116
AK: Make it possible to move and copy HashMap and HashTable.
...
Previously it was only possible to move them, but we should allow copying
as well, since it's gonna be useful for many things.
2019-06-24 11:57:54 +02:00
Andreas Kling
009b9bfd10
AK: Implement a naive JSON parser.
...
This parser assumes that the JSON is well-formed and will choke horribly
on invalid input.
Since we're primarily interested in parsing our own output right now, this
is less of a problem. Longer-term we're gonna need something better. :^)
2019-06-24 11:28:24 +02:00
Andreas Kling
bad8ab697b
NonnullRefPtr: Simplify copy constructors.
2019-06-24 10:23:59 +02:00
Andreas Kling
2dd54f062a
AK: Mark some helper things constexpr.
2019-06-24 10:13:28 +02:00
Andreas Kling
bf97b9589d
NonnullRefPtr: Some improvements.
...
- Delete the default constructor instead of just making it private.
It's never valid to create an empty NonnullRefPtr.
- Add copy assignment operators. I originally omitted these to force use
of .copy_ref() at call sites, but the hassle/gain ratio is minuscule.
- Allow calling all the assignment operators in all consumable states.
This codifies that it's okay to overwrite a moved-from NonnullRefPtr.
2019-06-24 09:58:21 +02:00
faissaloo
25e8498dcc
LibM: Switch sin() for fast sin()
2019-06-23 22:13:29 +02:00
CallumAttryde
e38c3bce15
add ~/.history file for Shell, stores entire command log and loads recent commands into history buffer
2019-06-23 22:08:12 +02:00
Andreas Kling
eedb4f6b2f
QuickShow: Allow panning and zooming the image instead of stretching it.
...
This needs more work and polish, but it's a step in a more pleasant and
useful direction.
Also turn QuickShow into a fully-fledged "application". (By that, I really
just mean giving it its own Applications/ subdirectory.)
2019-06-23 16:35:43 +02:00
Andreas Kling
cf0d05d54a
Terminal: Don't compute buffer positions outside the possible area.
2019-06-23 15:34:36 +02:00
Andreas Kling
5aefd7f828
PaintBrush: Implement a thickness setting for the pen tool.
...
Painter gains the ability to draw lines with arbitrary thickness.
It's basically implemented by drawing filled rects for thickness>1.
In PaintBrush, Tool classes can now override on_contextmenu() to
provide a context menu for the toolbox button. :^)
2019-06-23 10:00:02 +02:00
Andreas Kling
08c04f0a41
Terminal: Add basic mouse selection with copy and paste.
...
Left mouse button selects (and copies the selection on mouse up).
The right mouse button then pastes whatever's on the clipboard. I always
liked this behavior in PuTTY, so now we have it here as well :^)
2019-06-23 09:18:17 +02:00
Andreas Kling
2cebf78fad
GTextEditor: Add assertion that did_change() isn't called in readonly mode.
2019-06-23 08:23:37 +02:00
Andreas Kling
6a0011dcea
LibGUI+VisualBuilder: Support custom editing widgets for property values.
...
Implemented this by letting GAbstractViews provide a GModelEditingDelegate
for a given index, which then knows how to create and setup a custom widget
appropriate for the data type being edited.
2019-06-23 08:18:28 +02:00
Andreas Kling
1d0ada32cc
GComboBox: Add set_text() and on_return_pressed hook.
...
Also give focus back to the editor when closing the list popup window.
2019-06-23 07:55:28 +02:00
Andreas Kling
0af61e9123
GVariant: Add to_string(GVariant::Type) helper.
2019-06-23 07:54:46 +02:00
Andreas Kling
0e18201b7e
GTextEditor: Don't replace selection on enter press in single-line editor.
2019-06-23 07:53:58 +02:00
Andreas Kling
3e7f33e4eb
GAbstractView: Correct placement of editor widgets.
2019-06-23 06:45:23 +02:00
Andreas Kling
dc8333067f
CHttpJob: Block until we can actually read during State::InBody.
...
Also move to State::Finished once we've received >= Content-Length.
2019-06-22 23:10:05 +02:00
Andreas Kling
6d5633904f
CIODevice: Don't discard already-buffered data when there's no more to read.
...
When we had some data already in the CIODevice buffer, we should make sure
we always return that data, even if the attempt to ::read() even more data
fails. This was causing us to lose partial HTTP payloads.
2019-06-22 23:07:42 +02:00
Andreas Kling
ec99f7f721
CHttpRequest: Okay let's go back to HTTP/1.0 for now..
...
I don't want to deal with sessions staying alive at the moment.
2019-06-22 23:04:31 +02:00
Andreas Kling
af75ccee65
CNetworkJob: Automatically delete finished jobs after on_finish.
...
Also, pretty-print any failure messages.
2019-06-22 22:46:05 +02:00
Andreas Kling
639478391b
Kernel: Colorize debugger output from the kernel.
...
This makes it easy to distinguish kernel/userspace dbgprintf()'s. :^)
2019-06-22 22:45:16 +02:00
Andreas Kling
db2980c848
CHttpRequest: Use the correct newline format ('\r\n').
...
Also let's say HTTP/1.1 instead of HTTP/1.0. :^)
2019-06-22 22:10:43 +02:00
Andreas Kling
4573eb226e
LibHTML: Implement enough of the CSS parser to parse the default stylesheet.
2019-06-22 21:48:56 +02:00
Andreas Kling
7e1cb86da7
LibHTML: Make it possible to build LibHTML on the host.
...
- "make" builds the normal Serenity libhtml.a
- "make -f Makefile.host" builds a test program for the host machine.
2019-06-22 21:21:57 +02:00
Andreas Kling
04b2082e97
Build: Enable the -Werror flag.
...
Okay, I've now fixed all the warnings and it was pretty lame. Let's keep the
build warning-free from now on.
2019-06-22 16:32:04 +02:00
Andreas Kling
3ed17b0792
printf: Support %zu (the 'z' is really just ignored.)
2019-06-22 16:30:32 +02:00
Andreas Kling
1b6fa30e58
WidgetGallery: Fix compiler warnings.
2019-06-22 16:27:35 +02:00
Andreas Kling
61b4da447d
PaintBrush: Fix compiler warnings.
2019-06-22 16:26:04 +02:00
Andreas Kling
46a06c23e3
Kernel: Fix all compiler warnings.
2019-06-22 16:22:34 +02:00
Andreas Kling
17acc1e0a8
VisualBuilder: Fix compiler warnings.
2019-06-22 16:16:39 +02:00
Andreas Kling
3b01d7fdff
Userland: Fix more compiler warnings.
2019-06-22 16:13:47 +02:00
Andreas Kling
4118aaaa32
Terminal: Fix compiler warnings.
2019-06-22 16:07:46 +02:00
Andreas Kling
1277d583ef
printf: Oops, '-' is the left padding modifier, not ' '.
...
It's kinda funny how I can make a mistake like this in Serenity and then
get so used to it by spending lots of time using this API that I start to
believe that this is how printf() always worked..
2019-06-22 15:53:52 +02:00
Andreas Kling
5980007e44
Userland: Fix many compiler warnings.
2019-06-22 15:47:08 +02:00
Andreas Kling
0deade2883
WindowServer: Fix compiler warnings.
2019-06-22 14:49:01 +02:00
Andreas Kling
3f0f7caa45
LibGUI: Fix compiler warnings.
2019-06-22 14:41:11 +02:00
Andreas Kling
56ae96558b
LibC: Fix locale.cpp warnings.
2019-06-22 14:32:59 +02:00
Andreas Kling
bd4ac6d42e
LibC: Fix various stdlib.cpp warnings.
2019-06-22 14:27:15 +02:00
Andreas Kling
54c5b68921
LibC: execvpe() should use the provided environment instead of 'environ'
2019-06-22 14:07:34 +02:00
Andreas Kling
25fd847ef2
PaintBrush: Add a color picker tool.
2019-06-22 12:05:35 +02:00
Andreas Kling
41613e4303
GSpinBox: Make the increment/decrement buttons unfocusable.
2019-06-22 11:16:41 +02:00