Commit graph

52683 commits

Author SHA1 Message Date
MacDue
48d03a68e9 LibWeb: Allow font-size as an SVG attribute and handle font scaling 2023-07-21 11:42:30 +02:00
MacDue
21ace4f90b LibWeb: Add Node::scaled_font(float scale_factor)
This will allow fetching fonts scaled by a transform.
2023-07-21 11:42:30 +02:00
MacDue
f84abbe1f9 LibWeb: Add FIXME for viewBox scaling to SVGTextBox 2023-07-21 11:42:30 +02:00
Nico Weber
6caaffa134 LibPDF: Add a few FIXMEs to set_graphics_state_from_dict 2023-07-21 08:17:12 +02:00
Nico Weber
9283c939bb LibPDF: Include width in Type1Font glyph cache key
LibGfx's ScaledFont doesn't do this, but in ScaledFont m_x_scale and
m_y_scale are immutable once the class is created, so it can get away
with not doing it.

In Type1Font, `width` changes in different calls to
Type1Font::draw_glyph(), so we need to make it part of the cache key.

Fixes rendering of the word "Version" on the first page of
pdf_reference_1-7.pdf.
2023-07-21 07:01:09 +02:00
MacDue
17a5af04e3 LibJS: Actually generate the bytecode CFG
This is just something I spotted looking around the code, previously
the PassPipelineExecutable was passed by value to
generate_cfg_for_block, which generated the CFG then just dropped it on
the floor. Making this a reference results in the CFG actually getting
generated.
2023-07-21 06:59:51 +02:00
Aliaksandr Kalenik
fb94415f03 LibJS: Delete Declaration::for_each_var_declared_name
1. Replaces for_each_var_declared_name usage with more generic
for_each_var_declared_identifier.
2. Deletes for_each_var_declared_name.
2023-07-20 20:19:15 +02:00
Aliaksandr Kalenik
0fa47405df LibJS: Delete Declaration::for_each_lexically_declared_name
1. Replaces for_each_lexically_declared_name usage with more generic
for_each_lexically_declared_identifier.
2. Deletes for_each_lexically_declared_name.
2023-07-20 20:19:15 +02:00
Aliaksandr Kalenik
231d58dd62 LibJS: Delete Declaration::for_each_bound_name
We can delete for_each_bound_name() because there is more generic
version of this function called for_each_bound_identifier() that gives
you identifier using which you can get both name and check if it is
local/global.
2023-07-20 20:19:15 +02:00
Aliaksandr Kalenik
348e43b36d LibJS: Replace for_each_bound_name with for_each_bound_identifier
Preparation before deleting for_each_bound_name.
2023-07-20 20:19:15 +02:00
Aliaksandr Kalenik
608a730bd6 LibWeb: Use Core::Timer for style and layout update timers in Document
Fixes leaking of DOM::Document by capturing it into JS::SafeFunction
callback when using Platform::Timer for style and layout update timers.
2023-07-20 15:01:52 +02:00
Sam Atkins
8ec691057f FileManager: Add "Font" tab to File Properties window
We now keep the MappedFile around when inspecting a font, so that we can
use that font to display a preview.
2023-07-20 08:02:12 +01:00
Sam Atkins
98eaa4b044 LibGfx: Add functions to convert font widths to/from strings
This isn't a "width" in the sense of a fixed-width font, but of the OS/2
width class defined in some font formats.
2023-07-20 08:02:12 +01:00
Sam Atkins
9f5e105958 LibCore: Add mime types for font files 2023-07-20 08:02:12 +01:00
Sam Atkins
50b6ed2aa3 FileManager: Add "Image" tab to File Properties window
We don't yet expose most image metadata yet, so most of this is ICC
profile data since we do have a way to access that.
2023-07-20 08:02:12 +01:00
Sam Atkins
835dada3d3 LibGfx: Add method to get String data from an ICC Profile tag 2023-07-20 08:02:12 +01:00
Sam Atkins
1066831b39 LibGfx: Add a method to get a specific tag from an ICC Profile 2023-07-20 08:02:12 +01:00
Sam Atkins
91b677c81e FileManager: Add "Audio" tab to File Properties window 2023-07-20 08:02:12 +01:00
Sam Atkins
0a9fa85e86 LibAudio: Use ReadonlyBytes instead of Bytes for buffer parameters
Bytes will implicitly cast to StringView, but not to ReadonlyBytes. That
means that if you call
`Audio::Loader::create_plugin(mapped_file->bytes())`
it will silently use the `create_plugin(StringView path)` overload.

Reading audio data does not require that data to be writable, so let's
use ReadonlyBytes for it and avoid the footgun.
2023-07-20 08:02:12 +01:00
Sam Atkins
8e0fa57e5b FileManager: Extract creation of PropertiesWindow General tab 2023-07-20 08:02:12 +01:00
Sam Atkins
a847bd463a FileManager: Remove unused PropertyValuePair struct 2023-07-20 08:02:12 +01:00
Sam Atkins
9cd6b97dd9 FileManager: Don't wrap long paths on Properties window
These have a fixed height, so any wrapping made them entirely illegible.
2023-07-20 08:02:12 +01:00
Kenneth Myhra
c0d0391d08 Toolchain+Ports: Update QEMU to 8.0.3 2023-07-20 07:24:40 +01:00
Kenneth Myhra
0263052284 Ports/glib: Reformat package.sh according to our current style 2023-07-20 07:24:40 +01:00
Kenneth Myhra
0bf8735aba Ports/glib: Update to 2.77.0 2023-07-20 07:24:40 +01:00
Kenneth Myhra
53db5d8b6c Ports/curl: Update to 8.2.0 2023-07-20 07:24:40 +01:00
Kenneth Myhra
1166f5a758 Ports/openssl: Reformat package.sh according to our current style 2023-07-20 07:24:40 +01:00
Kenneth Myhra
b38edc9d43 Ports/openssl: Update to 3.0.9
The 3.0 series is the new LTS version and is supported until 7th
September 2026. The 1.1.1 series which is the previous LTS version has
an end of support on 11th September 2023.
2023-07-20 07:24:40 +01:00
Matthew Olsson
25b89aa962 LibGfx: Replace a magic number in ScaledFont with the calculation
This makes the reason for the multiplication much clearer.
2023-07-20 06:56:41 +01:00
Matthew Olsson
5f8fd47214 LibPDF: Resize fonts when the text and line matrices change 2023-07-20 06:56:41 +01:00
Matthew Olsson
9a0e1dde42 LibPDF: Propogate errors from ColorSpace::color() 2023-07-20 06:56:41 +01:00
Matthew Olsson
e989008471 LibPDF: Use proper ICC profiles for ICCBasedColorSpace 2023-07-20 06:56:41 +01:00
Matthew Olsson
fa1b1f8244 LibGfx: Forward-declare TagData in WellKnownProfiles 2023-07-20 06:56:41 +01:00
Sebastian Zaha
7696738140 Meta: Port recent LibWeb and LibJS changes to gn build
This ports the following commits:
a8587fe54e
9d7215c636
2023-07-20 06:48:13 +01:00
Shannon Booth
a0d1ef34e2 LibJS: Deduplicate labelled continue & break bytecode generation
Similar to the scoped continue and break, the only two differences
between these functions is the scope that is scanned for a matching
label, and the specific handling of a continue/break boundary.
2023-07-20 07:24:31 +02:00
Shannon Booth
663e4507ea LibJS: Deduplicate scoped continue & break bytecode generation
The only two differences between these two functions are the name of the
block that is created and the specific jump/break handling per boundary.
2023-07-20 07:24:31 +02:00
Nico Weber
c4bad2186f LibPDF: Implement 7.6.4.3.4 Algorithm 2.B: Computing a hash
This is a step towards AESV3 support for PDF files.

The straight-forward way of writing this with our APIs is pretty
allocation-heavy, but this code won't run all that often for the
regular "open PDF, check password" flow.
2023-07-19 21:26:55 +01:00
Nico Weber
492962502f LibCrypto: Make create_aligned_buffer() static
I ended up not needing this, but there's no reason for this function
to not be static.
2023-07-19 21:26:55 +01:00
Sebastian Zaha
919033fffd Ladybird: Prevent QAction leaking
In some places in the code QAction instances are added to a parent
directly on instantiation. In the case they are not, Valgrind
reports them as leaking.
2023-07-19 21:26:43 +01:00
Sebastian Zaha
d974142c7e Ladybird: Allow copying text in the js console 2023-07-19 21:26:43 +01:00
Sebastian Zaha
8e8f124ca9 Ladybird: Implement JS console input history
One can now use KeyUp and KeyDown to navigate through the already run
commands in the JS console.
2023-07-19 21:26:43 +01:00
Sebastian Zaha
6f15b92ace Ladybird: Fix typo in variable name 2023-07-19 21:26:43 +01:00
Sebastian Zaha
5d430b276c Ladybird: Scroll the JS console to the bottom on input 2023-07-19 21:26:43 +01:00
Sam Atkins
d00f489cdc SoundPlayer: Rename main widget to SoundPlayerWidget
This is the main widget, and is never replaced by something else, so
having "AdvancedView" in there is a bit confusing.
2023-07-19 19:37:27 +01:00
Sam Atkins
fae350be3f SoundPlayer: Use an enum for PlaylistModel columns
Also correct some const-positioning.
2023-07-19 19:37:27 +01:00
Sam Atkins
32e5593ca9 SoundPlayer: Use AK::human_readable_size() for file sizes 2023-07-19 19:37:27 +01:00
Sam Atkins
ca3e0288e9 GMLPlayground: Keep a RefPtr to the "Save As..." action
Previously, the Save action held a reference to the local variable for
the Save As action, which goes out of scope at the end of
`initialize_menubar()`. This meant that if you tried to Save a new
file, it would instead crash and yeet your work into the abyss.
2023-07-19 19:36:17 +01:00
Andrew Kaster
e02b2a7b9a Ladybird: Make Android build work again, and tidy up files
We don't need the extra gradle files in our sources, the Qt CMake
integration will generate suitable ones for us.

Make sure that assets is always a folder, so that we can get the proper
layout for the ladybird-assets.tar.gz and CMake doesn't create a gzip
file with the name "assets".

Fix up the AndroidPlatform file and make sure it's linked into all the
applications that need it. Also make sure to copy all the application
shared libraries into the ladybird APK so that when we make them into
proper Services, the libs are already there.
2023-07-19 12:25:37 -06:00
Andrew Kaster
7de4fb2947 LibCore: Build LocalSocket on Android 2023-07-19 12:25:37 -06:00
Aliaksandr Kalenik
babadc19df Tests/LibWeb: Update WPT expectations
Updates WPT tests expectations in metadata.txt and changes run.sh to
checkout more recent commit in WPT upstream repository.
2023-07-19 18:34:36 +02:00