Commit graph

44186 commits

Author SHA1 Message Date
Linus Groh
eb4ea557f1 LibJS: Add spec comments to mod() 2022-12-10 11:23:23 +00:00
Linus Groh
dc747b3dd4 LibJS: Add spec comments to div() 2022-12-10 11:23:23 +00:00
Linus Groh
f0f476079b LibJS: Add spec comments to mul() 2022-12-10 11:23:23 +00:00
Linus Groh
51cdf2cdef LibJS: Add spec comments to sub() 2022-12-10 11:23:23 +00:00
Linus Groh
d5359164b1 LibJS: Add spec comments to add() 2022-12-10 11:23:23 +00:00
Linus Groh
e27ef63217 LibJS: Add spec comments to unsigned_right_shift() 2022-12-10 11:23:23 +00:00
Linus Groh
b66f9a8718 LibJS: Add spec comments to right_shift() 2022-12-10 11:23:23 +00:00
Linus Groh
8aa19a8a60 LibJS: Add spec comments to left_shift() 2022-12-10 11:23:23 +00:00
Linus Groh
08f6be1715 LibJS: Add spec comments to unary_minus() 2022-12-10 11:23:23 +00:00
Linus Groh
4458b7bf19 LibJS: Add spec comments to unary_plus() 2022-12-10 11:23:23 +00:00
Linus Groh
c23d8c7486 LibJS: Add spec comments to bitwise_not() 2022-12-10 11:23:23 +00:00
Linus Groh
f0f2dd5850 LibJS: Add spec comments to bitwise_xor() 2022-12-10 11:23:23 +00:00
Linus Groh
07f9ae908c LibJS: Add spec comments to bitwise_or() 2022-12-10 11:23:23 +00:00
Linus Groh
9d3d4a760f LibJS: Add spec comments to bitwise_and() 2022-12-10 11:23:23 +00:00
Linus Groh
3a8c704d19 LibJS: Add spec comments to less_than_equals() 2022-12-10 11:23:23 +00:00
Linus Groh
e53c8ae593 LibJS: Add spec comments to less_than() 2022-12-10 11:23:23 +00:00
Linus Groh
27ed1f6d5e LibJS: Add spec comments to greater_than_equals() 2022-12-10 11:23:23 +00:00
Linus Groh
444ba191af LibJS: Add spec comments to greater_than() 2022-12-10 11:23:23 +00:00
Linus Groh
058a247c61 LibJS: Add spec comments to Value::to_integer_or_infinity() 2022-12-10 11:23:23 +00:00
Linus Groh
72ee346f64 LibJS: Add spec comments to Value::to_index() 2022-12-10 11:23:23 +00:00
Linus Groh
d1b2ac41fd LibJS: Add spec comments to Value::to_length() 2022-12-10 11:23:23 +00:00
Linus Groh
34e372cbff LibJS: Add spec comments to Value::to_u8_clamp() 2022-12-10 11:23:23 +00:00
Linus Groh
fff5fe44c1 LibJS: Add spec comments to Value::to_u8() 2022-12-10 11:23:23 +00:00
Linus Groh
2a3f150ab8 LibJS: Add spec comments to Value::to_i8() 2022-12-10 11:23:23 +00:00
Linus Groh
42eac3b7d3 LibJS: Add spec comments to Value::to_u16() 2022-12-10 11:23:23 +00:00
Linus Groh
b8ae9ca206 LibJS: Add spec comments to Value::to_i16() 2022-12-10 11:23:23 +00:00
Linus Groh
1ef2b43e4c LibJS: Add spec comments to Value::to_u32() 2022-12-10 11:23:23 +00:00
Linus Groh
f958b19b19 LibJS: Add spec comments to Value::to_i32{,_slow_case}() 2022-12-10 11:23:23 +00:00
Linus Groh
c2d33ec48a LibJS: Add spec comments to Value::to_property_key() 2022-12-10 11:23:23 +00:00
Linus Groh
7abd9efe33 LibJS: Add spec comments to Value::to_bigint_uint64() 2022-12-10 11:23:23 +00:00
Linus Groh
fb5256b225 LibJS: Add spec comments to Value::to_bigint_int64() 2022-12-10 11:23:23 +00:00
Linus Groh
0d4b798932 LibJS: Add spec comments to Value::to_bigint() 2022-12-10 11:23:23 +00:00
Linus Groh
b97cdfc36c LibJS: Add spec comments to Value::to_number() 2022-12-10 11:23:23 +00:00
Linus Groh
9a406ccba6 LibJS: Add spec comments to Value::to_numeric() 2022-12-10 11:23:23 +00:00
Linus Groh
63f6099cc3 LibJS: Add spec comments to Value::to_object() 2022-12-10 11:23:23 +00:00
Linus Groh
9c10624278 LibJS: Add spec comments to Value::to_primitive() 2022-12-10 11:23:23 +00:00
Linus Groh
e3c8e1362f LibJS: Add spec comments to Value::to_boolean() 2022-12-10 11:23:23 +00:00
Linus Groh
596b30df5f LibJS: Add spec comments to Value::to_string() 2022-12-10 11:23:23 +00:00
Linus Groh
9a961af0b0 LibJS: Add spec comments to Value::typeof() 2022-12-10 11:23:23 +00:00
Linus Groh
1fe7984160 LibJS: Add spec comments to Value::is_regexp() 2022-12-10 11:23:23 +00:00
Linus Groh
b11135cbc2 LibJS: Add spec comments to Value::is_function() 2022-12-10 11:23:23 +00:00
Linus Groh
aaa4fe8c34 LibJS: Add spec comments to Value::is_array() 2022-12-10 11:23:23 +00:00
Andrew Kaster
77a22268c6 Documentation: Describe extra clang tools built alongside BuildClang.sh
Also rephrase some of the information on updated clang-format binaries
2022-12-10 03:00:24 -07:00
Rodrigo Tobar
67b50d7994 PDFViewer: Let users change image rendering
A new checkbox in the toolbar now allows users toggle image rendering. A
corresponding Config option makes this setting non-volatile. To void
clashing with the previous "show_clipping_paths" option when caching a
Page, we now use the RenderingPreferences.hash() and the pair_int_hash
funcitons to compute a unique key into the page cache map for a given
RenderingPreferences and zoom level.
2022-12-10 10:49:03 +01:00
Rodrigo Tobar
adc45635e9 LibPDF: Add initial image display support
After adding support for XObject Form rendering, the next was to display
XObject images. This commit adds this initial support,

Images come in many shapes and forms: encodings: color spaces, bits per
component, width, height, etc. This initial support is constrained to
the color spaces we currently support, to images that use 8 bits per
component, to images that do *not* use the JPXDecode filter, and that
are not Masks. There are surely other constraints that aren't considered
in this initial support, so expect breakage here and there.

In addition to supporting images, we also support applying an alpha mask
(SMask) on them. Additionally, a new rendering preference allows to skip
image loading and rendering altogether, instead showing an empty
rectangle as a placeholder (useful for when actual images are not
supported). Since RenderingPreferences is becoming a bit more complex,
we add a hash option that will allow us to keep track of different
preferences (e.g., in a HashMap).
2022-12-10 10:49:03 +01:00
Rodrigo Tobar
2331fe5e68 LibPDF: Add first interpolation methods
Interpolation is needed in more than one place, and I couldn't find a
central place where I could borrow a readily available interpolation
routine, so I've implemented the first simple interpolation object. More
will follow for more complex scenarios.
2022-12-10 10:49:03 +01:00
Rodrigo Tobar
e818c955b3 LibGfx: Allow creating Bitmaps from ReadonlyBytes objects
The existing try_create_from_serialized_byte_buffer function accepts a
ByteBuffer, but in reality it requires only a ReadonlyBytes, since
internally the only thing it does is calling buffer.bytes(). There is
thus no reason to have a function that simply accepts ReadonlyBytes, and
implement the former in terms of the newer.
2022-12-10 10:49:03 +01:00
Rodrigo Tobar
17676705a5 LibPDF: Add facility to obtain Vector<float> from ArrayObject
Arrays of float numbers are common in many PDF objects, and thus to
avoid code repetition I'm introducing a new method to ArrayObject that
will return exactly that.
2022-12-10 10:49:03 +01:00
Rodrigo Tobar
a63b93f724 LibPDF: Add new Error::Type for unsupported rendering features 2022-12-10 10:49:03 +01:00
Rodrigo Tobar
26f8c0b76c LibPDF: Add more knowledge to ColorSpaces classes
ColorSpaces now can tell users how many components they expect, and the
default decode array that should be used when converting unit bit
sequences into color space component input values during image
rendering.
2022-12-10 10:49:03 +01:00