Commit Graph

9721 Commits

Author SHA1 Message Date
Yonatan Goldschmidt
3a90a01dd4 Ext2FS: Fix indirect-blocks iteration
For singly-indirect blocks, "callback" is just "add_block".
For doubly-indirect blocks, "callback" is the lambda function
iterating on singly-indirect blocks: so instead of adding itself to the
list, the doubly-indirect block will add all its childs, but they add
themselves again when they run the callback of singly-indirect blocks.
And nothing adds the doubly-indirect block itself :(

This leads to a double free of all child blocks of the doubly-indirect
block, which is the failed assert described in #1549.

Closes: #1549.
2020-05-22 10:50:41 +02:00
Yonatan Goldschmidt
00c0650f96 Build: Add Dockerfile 2020-05-22 01:19:15 +02:00
Linus Groh
27913154ea LibJS: Disallow multiple parameters in paren-less arrow function
Fixes #2323.
2020-05-22 00:50:57 +02:00
Andreas Kling
84b508befa PixelPaint: Rename original_event => image_event
These events are in image coordinates, not really original coordinates.
2020-05-21 22:56:32 +02:00
Matthew Olsson
45dfa094e9 LibJS: Add getter/setter support
This patch adds a GetterSetterPair object. Values can now store pointers
to objects of this type. These objects are created when using
Object.defineProperty and providing an accessor descriptor.
2020-05-21 22:56:18 +02:00
Linus Groh
a4d04cc748 LibJS: Refactor Array.prototype callback functions and make them generic 2020-05-21 22:50:14 +02:00
Linus Groh
5db9becc4a LibJS: Treat missing arg in Array.prototype.includes() as undefined 2020-05-21 22:50:14 +02:00
Linus Groh
fbcfc8dcd0 LibLine: Hide debug output behind SUGGESTIONS_DEBUG define 2020-05-21 22:50:14 +02:00
FalseHonesty
9241c3a957 Browser: Pop up a context menu when one is requested on a tab
Currently, the tab's context menu only has options to reload and
close, but this patch allows for those options to be quickly
expanded!
2020-05-21 21:53:17 +02:00
FalseHonesty
bf2e6325a4 LibGUI: Add hook when a context menu is requested on a tab 2020-05-21 21:53:17 +02:00
Andreas Kling
ff98f55b85 LibGUI: Fix view column auto-sizing of icon-only columns
For icon columns, just use the item height as the auto width for now.
This gives us 16x16 icons, which is always what we want anyway.
2020-05-21 20:54:21 +02:00
Andreas Kling
248f2d5cf5 LibGUI: Remove Model::row_name() since nothing used it 2020-05-21 20:19:43 +02:00
Andreas Kling
278b307713 LibGUI: Make all views use CenterLeft as the default text alignment
If a model doesn't specify a text alignment for a given field, we now
fall back to CenterLeft. This will look better than Center in the vast
majority of cases.
2020-05-21 19:55:44 +02:00
Andreas Kling
2adb0a07e5 LibGUI: Get rid of Model::ColumnMetadata and always use auto-sizing
Auto-sizing of view columns is now enabled by default. This removes the
last remaining need for ColumnMetadata, so this patch gets rid of it.
2020-05-21 19:55:44 +02:00
Andreas Kling
c666c251c8 LibGUI: Replace ColumnMetadata::sortable => Model::is_column_sortable()
Now there's only one thing left in ColumnMetadata: the initial width.
2020-05-21 19:55:44 +02:00
Andreas Kling
2e03bded43 LibGUI: Add Model::Role::TextAlignment and remove from ColumnMetadata 2020-05-21 19:55:44 +02:00
Andreas Kling
3c819b8ff4 Applications: Sort CMakeLists.txt alphabetically :^) 2020-05-21 19:55:44 +02:00
Andreas Kling
04187576ff LibGUI: Models should always specify font via Model::Role::Font
This gets rid of one field in ColumnData. The goal is to get rid of all
fields and lose ColumnData entirely.
2020-05-21 19:55:44 +02:00
Luke
57d15acd4c LibJS: Add Array.prototype.every 2020-05-21 19:44:59 +02:00
Andreas Kling
4cdbdf0a84 LibGUI: Always paint the cursor visible when focusing a TextEditor
If the cursor happened to be blinking in the invisible state, it would
take 500ms before we actually see the cursor in a newly focused editor
widget. This patch makes it show up right away.
2020-05-21 17:38:01 +02:00
Andreas Kling
4806cd122d LibGUI: Focus the first focusable widget added to a window
It feels really awkward if nothing is focused when opening a window.
2020-05-21 17:26:09 +02:00
Linus Groh
65d94a1e74 Base: Add simple setInterval() test 2020-05-21 15:18:08 +02:00
Linus Groh
4e657c370c LibJS: Make Interpreter::call() this_value a required argument
Right now the default is an empty value, which we accidentally exposed
in set{Interval,Timeout}() by not providing a custom this value, which
should't happen at all. Let's just make it a required argument instead.
2020-05-21 15:18:08 +02:00
Linus Groh
14dffe4721 LibWeb: Set window object as this value in set{Interval,Timeout}() 2020-05-21 15:18:08 +02:00
Linus Groh
7defc521be LibWeb: Ignore non-finite args in CanvasRenderingContext2D.{scale,translate}() 2020-05-21 15:16:48 +02:00
Linus Groh
b962728c4e LibWeb: Enforce set{Interval,Timeout}() min interval of 0 2020-05-21 15:16:48 +02:00
Linus Groh
c769784406 LibWeb: Allow setInterval() with no interval 2020-05-21 15:16:48 +02:00
Linus Groh
e3e9749d88 LibWeb: Let various functions throw if not enough arguments
...instead of handing out null / undefined / empty values.
2020-05-21 15:16:48 +02:00
Linus Groh
2d503b20da LibWeb: Embrace Interpreter::{argument_count(), argument(index)} 2020-05-21 15:16:48 +02:00
Sergey Bugaev
c00076de82 LibWeb: Update the CSS prefix to -libweb 2020-05-21 14:15:49 +02:00
Andreas Kling
80f43ffc27 LibGUI: Move AbstractTableView::keydown_event() down to TableView
We can't really share this stuff with TreeView anyway, since tables
and trees have very different spatial relationships between indexes.
2020-05-21 13:40:52 +02:00
Andreas Kling
9d9a31384e LibGUI: Allow expand/collapse subtrees in TreeView with Alt+Left/Right
This makes TreeView a lot more keyboard friendly.
2020-05-21 13:36:08 +02:00
Andreas Kling
63d98bbd76 LibWeb: Send User-Agent in HTTP requests
Coming soon to a Browser Market Share graph near you! :^)
2020-05-21 12:58:57 +02:00
Andreas Kling
897998017a ProtocolServer: Support request headers
You can now pass a dictionary of request headers when starting a new
download in ProtocolServer.

The HTTP and HTTPS protocol will include the headers in their requests.
2020-05-21 12:27:42 +02:00
Andreas Kling
25cfdf3f67 LibWeb: Parse " into '"' 2020-05-21 12:27:08 +02:00
AnotherTest
0751592a18 LibLine: Correctly track the completion start and end
To achieve this, the API was tweaked a bit to allow for easier tracking
of completions.
This API change is non-disruptive to any application that does not use
anchored styles.
2020-05-21 10:52:11 +02:00
AnotherTest
5358608a94 Shell: Attach links to completed paths
```
ls ./Ter<tab>
```
gets you a link to ./Terminal.ini, right in the prompt.
2020-05-21 01:37:19 +02:00
AnotherTest
88f542dc30 LibLine: Support applying styles to suggestions
This commit also adds the concept of "anchored" styles, which are
applied to a specific part of the line, and are tracked to always stay
applied to that specific part.

Inserting text in the middle of an anchored style extends it, and
removing the styled substring causes the style to be removed as well.
2020-05-21 01:37:19 +02:00
Linus Groh
a0f3e3c50e LibWeb: Add CanvasRenderingContext2D.canvas 2020-05-21 01:24:36 +02:00
Linus Groh
abb33d425e LibWeb: Let HTMLCanvasElement.getContext() return null for unknown types
Currently we would assert. Also make it case sensitive.
2020-05-21 01:24:36 +02:00
AnotherTest
50c0944767 LibHTTP: Handle chunk sizes that start with zeros correctly
Apparently that's allowed and the RFC is just unclear about it.
Some servers seem to zero-pad the chunk size for whatever reason, and
previously, we interpreted that as the last chunk.
2020-05-21 01:21:39 +02:00
AnotherTest
7d76299ca9 LibTLS: Do not call on_tls_finished until the client has read app data 2020-05-21 01:21:39 +02:00
Hüseyin ASLITÜRK
ef49309807 Applications: Convert 256 char font to 384 char font 2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
8b3bd1a54b LibGfx: Font, extend fonts to 384 character to support LatinExtendedA 2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
840a64e2f9 LibGfx: Painter, extend fonts to 384 character to support LatinExtendedA
Replace codepoint variable type from char to u32.
2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
8790d6bafc Base: Extend fonts to 384 character to support LatinExtendedA 2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
ec9f1af0fb Base: Add HTML character escape test document
Test page for Turkish and Swedish custom characters.
2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
241df7206e LibWeb: HTML Parser, handle html escaped characters
Convert HTML escaped (&#XXX;)  characters to string.
2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
738235574f AK: StringUtils, add "convert_to_uint_from_hex" method
New method to convert hex string unsigned integer.
2020-05-21 01:19:42 +02:00
Hüseyin ASLITÜRK
9300a8cfe5 LibGUI: FileSystemModel, markdown file icon for .md files. 2020-05-21 01:19:13 +02:00