Commit Graph

46847 Commits

Author SHA1 Message Date
Yedaya Katsman
82470e9266 Documentation: Fix Ladybird debug instructions
The current Meta/serenity.sh script only accepts the `gdb` subcommand,
not `debug`.
2023-02-14 19:38:29 +01:00
Nico Weber
1c259b7a5a LibGfx: Validate ICC namedColor2Tag consistency 2023-02-14 19:28:13 +01:00
Nico Weber
45e391dae9 LibGfx: Add v2 "ncol" tag, expand comment
I had missed this in 21cc0c0cb2 because this tag is missing in
"Table 32 — Tag list" in the v2 ICC spec O_o. But it's in
"6.4.26 namedColorTag".

Also add a comment pointing to a page saying that all these tags
are very deprecated and not even recommended for new v2 profiles.
(That's how I noticed that namedColorTag was missing.)
2023-02-14 19:28:13 +01:00
Ali Mohammad Pur
617d112780 Meta: Add a Shell --posix parser fuzzer 2023-02-13 23:00:15 +03:30
Ali Mohammad Pur
eb20fbe145 Everywhere: Use /bin/Shell as the shebang for Shell scripts 2023-02-13 23:00:15 +03:30
Ali Mohammad Pur
beaae6b420 Shell: Use the POSIX parser if run as /bin/sh or passed the --posix flag
Note that the default shellrc is most likely not valid posix sh code, so
passing --skip-shellrc is suggested until we come up with a separate
shellrc file for the POSIX parser to use when interactive.
2023-02-13 23:00:15 +03:30
Ali Mohammad Pur
2a276c86d4 Shell: Start implementing a POSIX-compliant parser
The parser is still very much a work-in-progress, but it can currently
parse most of the basic bits, the only *completely* unimplemented things
in the parser are:
- heredocs (io_here)
- alias expansion
- arithmetic expansion

There are a whole suite of bugs, and syntax highlighting is unreliable
at best.
For now, this is not attached anywhere, a future commit will enable it
for /bin/sh or a `Shell --posix` invocation.
2023-02-13 23:00:15 +03:30
Sam Atkins
2dc1682274 LibGUI: Take gutter into account when measuring TextEditor content area 2023-02-13 16:54:56 +00:00
Sam Atkins
6905622b41 LibGUI: Don't show caret cursor when hovering TextEditor's gutter 2023-02-13 16:54:56 +00:00
Sam Atkins
69333e5dbd LibGUI: Combine wrapping/non-wrapping TextEditor code paths
The `is_wrapping_enabled()` paths function just fine when wrapping is
disabled. We already calculate `m_line_visual_data`. The only reason to
use a special path is for speed, since you can skip some steps if you
know each line is only 1 line high visually.

However, with code-folding being added, we can't make assumptions about
line height because a line could be hidden and have an effective height
of 0px. So `text_position_at_content_position()` always needs to loop
through the lines to see what our position is, and that function always
needs to be called to calculate the real position.
2023-02-13 16:54:56 +00:00
Sam Atkins
7aef096f85 LibGUI: Fix typo in span_consumed variable 2023-02-13 16:54:56 +00:00
Sam Atkins
476ec563bc LibWeb: Convert CSS Token::to_debug_string() to ::to_string() :^)
Using from_utf8_short_string() for all cases that are <= 3 bytes long.
Which is almost all of the static ones.
2023-02-13 14:35:40 +00:00
Sam Atkins
2368e6c5f2 LibWeb: Convert CSS Token/ComponentValue::to_debug_string() to String
These are only used for debugging, so I've decided that logging the
ErrorOr<String> itself is fine instead of trying to handle that error
more gracefully in those cases. If you're getting OOM trying to debug
log things, you have bigger problems.
2023-02-13 14:35:40 +00:00
Sam Atkins
7fc72d3838 LibWeb: Convert CSS Token value to new FlyString 2023-02-13 14:35:40 +00:00
Sam Atkins
09f7682feb LibWeb: Return StringViews from CSS Token bracket-string getters
These don't need to be full Strings, so let's be lightweight.
2023-02-13 14:35:40 +00:00
Kenneth Myhra
562594c416 LibWeb: Do not assume field element is always a HTMLInputElement
Cast to a HTMLElement instead and retrieve the value attribute from
there instead.
2023-02-13 14:34:37 +00:00
Kenneth Myhra
7d23af49c2 LibWeb: Avoid dereferencing null pointer
Null check was missing and we would crash when dereferencing the
pointer to access the type() member.
2023-02-13 14:34:37 +00:00
networkException
f1dd4f42bc LibWeb: Clarify WebIDL::Promise as an alias for JS::PromiseCapability
This patch adds the WebIDL::Promise type explicitly defined in the
WebIDL spec to be a PromiseCapability Record from ecma262.
2023-02-13 12:11:32 +00:00
kleines Filmröllchen
863afbaf38 Base: Add a quote to the fortunes database 2023-02-13 12:10:27 +00:00
Tim Schumacher
43f98ac6e1 Everywhere: Remove the AK:: qualifier from Stream usages 2023-02-13 00:50:07 +00:00
Tim Schumacher
874c7bba28 LibCore: Remove Stream.h 2023-02-13 00:50:07 +00:00
Tim Schumacher
606a3982f3 LibCore: Move Stream-based file into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher
a96339b72b LibCore: Move Stream-based sockets into the Core namespace 2023-02-13 00:50:07 +00:00
Tim Schumacher
d43a7eae54 LibCore: Rename File to DeprecatedFile
As usual, this removes many unused includes and moves used includes
further down the chain.
2023-02-13 00:50:07 +00:00
Karol Kosek
14951b92ca LibGUI: Remove deprecated text and set_text functions in AbstractButton
This moves the functions to lambda when registering a property.
External code can now only communicate using the new String API.
2023-02-13 00:45:09 +00:00
Karol Kosek
e39adc4772 Userland: Set Button text using the new String class 2023-02-13 00:45:09 +00:00
Karol Kosek
b5cb9a9ebb LibGUI+TaskBar: Make Calendar::formatted_date() return ErrorOr<String>
This commit introduces no error propagation.
2023-02-13 00:45:09 +00:00
Karol Kosek
f802920a3a Userland: Use default initializer instead of an empty string for Buttons 2023-02-13 00:45:09 +00:00
Karol Kosek
d32d4029d3 Userland: Replace usages of AbstractButton::text_deprecated with text() 2023-02-13 00:45:09 +00:00
Karol Kosek
fca29eae09 LibGUI: Store text using the new String class in the AbstractButton
This change also adds non-deprecated text() and set_text() functions and
helper constructors for Button, CheckBox, and RadioButton to call the
strings directly.

The whole codebase at this point is still using the deprecated string
functions, which the class will quietly convert to a new String.
2023-02-13 00:45:09 +00:00
Karol Kosek
d32b052f22 LibGUI+Userland: Add _deprecated suffix to AbstractButton::{set_,}text 2023-02-13 00:45:09 +00:00
Karol Kosek
61b49daf0a LibGUI: Make Clipboard::set_plain_text take text as a StringView 2023-02-13 00:45:09 +00:00
Karol Kosek
67ffc687d8 LibGUI+PixelPaint: Port GUI::ValueSlider's suffix to the new String 2023-02-13 00:26:39 +00:00
Rodrigo Tobar
c4507bb56e LibPDF: Add more built-in SIDs
The first iteration has enough SIDs to display simple documents, but
when trying more and more documents we started to need more of these
SIDs to be properly defined. This is a copy/paste exercise from the CFF
document, which is tedious, so it will continue in small drops.

This commit fills all the gaps until SID 228, which covers all the
ISOAdobe space, and should be enough for most use cases. Since this is a
continuous space starting at 0, we now use an Array instead of a Map to
store these names, which should be more performant. Also to simplify
things I've moved the Array out of the CFF class, making it a simpler
static variable, which allows us to use template type deduction.
2023-02-13 00:23:17 +00:00
Zaggy1024
fb0c226da3 LibVideo/VP9: Convert the Parser to use AK/BitStream.h
This doesn't appear to have had a measurable impact on performance,
and behavior is the same.

With the tiles using independent BooleanDecoders with their own
backing BitStreams, we're even one step closer to threaded tiles!
2023-02-13 00:22:23 +00:00
Nico Weber
6f39c44160 icc: Dump embedded non-parametric curves in lutAToBType and lutAToBType 2023-02-13 00:15:02 +00:00
Nico Weber
7929f8fef9 icc: Dump embedded parametric curves in lutAToBType and lutAToBType 2023-02-13 00:15:02 +00:00
Nico Weber
ed8bd3a792 icc: Dump more information about curves in lutAToBType and lutAToBType 2023-02-13 00:15:02 +00:00
Nico Weber
6f95ec5821 LibGfx: Validate presence of curves for lutAToBType and lutBToAType 2023-02-13 00:15:02 +00:00
Nico Weber
9cfd7a299c Userland: Use allocation-failure safe functions where it's easy
I went through all callers of adopt_own() and replaced them with
try_make<>() if possible or adopt_nonnull_own_or_enomem() else
in cases where it was easy (i.e. in functions already returning
ErrorOr).

No intended behavior change.
2023-02-12 22:54:28 +01:00
Kenneth Myhra
f698585097 LibWeb: Move setting of FormDataPrototype to initialize()
This moves the setting of FormDataPrototype out of the constructor to
initialize().
2023-02-12 21:35:59 +00:00
Liav A
4b1e501bdf Utilities/arp: Don't unveil /tmp/portal/lookup for numerical output
It's not needed in such case, and in the near-future when we would want
to use this utility in an initramfs environment where there's no service
such as LookupServer being running, it's still useful to have the option
to invoke this utility with the mentioned limited output functionality.
2023-02-12 20:54:20 +00:00
Ollrogge
0ce1c52577 LibArchive: Add support for modification time and date 2023-02-12 13:13:15 -07:00
Ollrogge
361df6eff8 AK: Add conversion functions for packed DOS time format
This also adjusts the FATFS code to use the new functions and removes
the now redundant old conversion functions.
2023-02-12 13:13:15 -07:00
Nico Weber
7e915b145b LibGfx: Let ICC code validate tag data alignment
Both when reading the main tag table and when reading embedded
curve data in lutAToBType or lutBToAType.
2023-02-12 20:07:45 +00:00
Nico Weber
b15a889ca4 icc: Dump some of lutAToBType and lutBToAType curve data 2023-02-12 20:07:45 +00:00
Nico Weber
c4b650cf4e LibGfx: Implement curve parsing for lutAToBType and lutBToAType
With this, we parse all data of all permitted tag types of all
required tags in all ICC profile types :^)

(`icc` doesn't dump this data yet, though.)
2023-02-12 20:07:45 +00:00
Nico Weber
bb19dc00af LibGfx: Add a size-less ParametricCurveTagData::from_bytes() overload
The curve data in lutAToBType and lutBToAType can store 'para' data, but
other than in the main ICC tag table, the size of the tag data isn't
explicitly stored. So it must be computed from the data contents.

Extract the function body into a helper can call that from both
variants.
2023-02-12 20:07:45 +00:00
Nico Weber
8ed3f7c4c2 LibGfx: Add a size-less CurveTagData::from_bytes() overload in ICC code
The curve data in lutAToBType and lutBToAType can store 'curv' data, but
other than in the main ICC tag table, the size of the tag data isn't
explicitly stored. So it must be computed from the data contents.

Extract the function body into a helper can call that from both
variants.
2023-02-12 20:07:45 +00:00
Liav A
38ce053296 Utilities/netstat: Don't unveil /tmp/portal/lookup for numerical output
It's not needed in such case, and in the near-future when we would want
to use this utility in an initramfs environment where there's no service
such as LookupServer being running, it's still useful to have the option
to invoke this utility with the mentioned limited output functionality.
2023-02-12 19:38:40 +00:00