Commit Graph

45492 Commits

Author SHA1 Message Date
Timothy Flynn
1ff29afc45 LibUnicode+LibJS+LibWeb: Propagate OOM from Unicode case transformations 2023-01-09 22:48:15 +00:00
Timothy Flynn
48474b0de6 LibJS: Handle OOM errors in String.prototype.replaceAll 2023-01-09 22:48:15 +00:00
Timothy Flynn
57b918807e LibJS: Handle OOM errors in the GetSubstitution AO 2023-01-09 22:48:15 +00:00
Julian Offenhäuser
5b7dfe848d LibGfx: Implement TrimmedTable mappings for Cmaps 2023-01-09 22:38:40 +00:00
Julian Offenhäuser
04ee181b21 LibGfx: Implement ByteEncoding mappings for Cmaps 2023-01-09 22:38:40 +00:00
Julian Offenhäuser
0ff9f2b865 LibGfx: Select a valid TTF cmap subtable for the Macintosh platform
While this subtable ID is supposed to be deprecated, it is used heavily
in PDF files.

It supports mapping one or two-byte values, with quite a large list of
encodings to tell you which one to expect.
For our use case, we ignore this encoding ID and just pick the first
subtable with this platform ID. Unsupported encodings will get caught
by Subtable::glyph_id_for_code_point() anyway.
2023-01-09 22:38:40 +00:00
Jelle Raaijmakers
7c2976e006 Ports: Make sed work on macOS
The ports `libvorbis`, `readline` and `timidity` would not install on
macOS as a result of using `sed -i` without an extension provided. GNU
sed is available through Homebrew, but it does not replace `sed` by
default.

Instead, provide a new `sed_in_place` function that calls `sed` with the
right arguments.
2023-01-09 22:36:50 +00:00
Andreas Kling
3110f5b328 Presenter: Rearchitect on top of LibWeb
This patch replaces the bespoke rendering engine in Presenter with a
simple pipeline that turns presentations into single-page HTML files.
The HTML is then loaded into an OutOfProcessWebView.

This achieves a number of things, most importantly:
- Access to all the CSS features supported by LibWeb
- Sandboxed, multi-process rendering

The code could be simplified a lot further, but I wanted to get the new
architecture in place without changing anything about the file format.
2023-01-09 22:34:57 +00:00
Andreas Kling
ed3c2cbdf6 LibWebView: Add OOPWV "content scales to viewport" hint
By setting this hint, you indicate to OOPWV that the content inside will
scale itself to the viewport size. In such situations, it's fine for
OOPWV to reuse a scaled version of an outdated backing store while the
view is being resized.
2023-01-09 22:34:57 +00:00
Andreas Kling
c55739bbc0 LibGfx: Make Rect::align_within() correct for TopCenter and BottomCenter
Also update the LibGfxDemo to actually show off these alignments.
2023-01-09 19:54:26 +01:00
implicitfield
f63ecc2763 VideoPlayer: Port to GML 2023-01-09 17:32:03 +00:00
implicitfield
f0a33b2a8e VideoPlayer: Propagate errors from VideoPlayerWidget::initialize_menubar 2023-01-09 17:32:03 +00:00
implicitfield
a2ca2d8364 LibGUI: Register "jump_to_cursor" as a GML property 2023-01-09 17:32:03 +00:00
Arda Cinar
33ea96912a SpaceAnalyzer: Do not reset the path to '/' after a refresh
Clicking analyze or deleting a file would always cause the tree view in
the widget to reset back to viewing the root. This was changed to stay
in the directory currently being viewed
2023-01-09 17:08:17 +00:00
Arda Cinar
c045ae1a96 SpaceAnalyzer: Keep the current path via filenames, not indices
The tree map widget keeps the current path to allow the user to navigate
between directories. This path was being kept as indices into the
children array. The indices might change after the tree is regenerated
and this change is required to keep the user's current place after a
re-analysis
2023-01-09 17:08:17 +00:00
Arda Cinar
ba33267132 SpaceAnalyzer: Add a method to TreeNode to get a child node by name
This will make it easier to get to a tree node given a file path
2023-01-09 17:08:17 +00:00
Arda Cinar
0d67e60559 SpaceAnalyzer: Make sure data fields of TreeNode are encapsulated
Made the member fields of Tree and TreeNode structures private and moved
the functions in main.cpp that accessed the internals of these
structures inside the TreeNode class
2023-01-09 17:08:17 +00:00
Arda Cinar
8ba37872e9 SpaceAnalyzer: Remove an unnecessary level of inheritance
The TreeMapNode and TreeMap structs inside TreeMapWidget.h both had
single implementers, TreeNode and Tree inside main.cpp. The indirection
was removed and the new structures were moved to their own file
2023-01-09 17:08:17 +00:00
Andreas Kling
f476b827de Ladybird: Let Qt pick the reload shortcut
This fixes an issue on platforms where Ctrl+R is the preferred native
shortcut, and we were effectively trying to set it twice.
2023-01-09 17:32:00 +01:00
Aliaksandr Kalenik
1242bd5ee5 LibWeb: Move clear property from table-root to table-wrapper
CSS 2.2 only mentions that float property need to be moved
but in practice clear property also need to be moved to
produce correct layout.
2023-01-09 15:47:59 +01:00
Aliaksandr Kalenik
77a2b151ea LibWeb: Use table_box() to get root box in TFC
Introduce `table_box()` function that returns table formatting
context root box casted to `TableBox` similar to how it's done
in other formatting contexts like `root()` in BFC and
`flex_container` in FFC. And replace `context_box()` calls
in TFC with calls to `table_box()`.
2023-01-09 15:06:27 +01:00
Aliaksandr Kalenik
f26eed9633 LibWeb: Rename used_width to used_height in TFC row struct
Rename used_width to used_height because it is used
to store row height.
2023-01-09 15:06:27 +01:00
Aliaksandr Kalenik
0e1da540b6 LibWeb: Move cells positioning in separate function in TFC 2023-01-09 15:06:27 +01:00
Aliaksandr Kalenik
ea4937a457 LibWeb: Move rows positioning in separate function in TFC 2023-01-09 15:06:27 +01:00
Aliaksandr Kalenik
7d2a72d748 LibWeb: Move rows heights calculation in separate function in TFC 2023-01-09 15:06:27 +01:00
Andreas Kling
a915fee5f3 LibWeb: Only log HTML parser errors when HTML_PARSER_DEBUG is enabled
At this point, the parser is reliable enough that we don't need to spam
the debug log about minor parsing issues on every websites.
2023-01-09 14:00:26 +01:00
Jelle Raaijmakers
4ee40aeefd Meta: Add GMTA to CODEOWNERS 2023-01-09 07:07:47 -05:00
Jelle Raaijmakers
9398e308fe Ports: Use sha256 hash for libmpg123 2023-01-09 12:56:46 +01:00
Jelle Raaijmakers
44d679ba7e LibSoftGPU: Remove workaround for i686 depth comparison 2023-01-09 12:55:41 +01:00
Aliaksandr Kalenik
577c552209 LibWeb: Remove unused TableCellBox::next_cell() 2023-01-09 11:47:31 +01:00
Aliaksandr Kalenik
6c5ba10bb0 LibWeb: Remove redundant check for empty anonymous blocks
It is incorrect to skip anonymous block containers without
line boxes during block auto height calculation because there
might be table roots wrapped in anonymous table boxes after fixup
and their height should be taken in account so leaving just
condition to skip child boxes which margins are "collapsed
through" (`border_box_height() == 0`) sufficient to skip
anonymous blocks without lines but still consider table wrappers.
2023-01-09 11:47:31 +01:00
Aliaksandr Kalenik
57940f4370 LibWeb: Wrap table roots in anonymous block boxes
According to table fixup algorithm:
https://www.w3.org/TR/css-tables-3/#fixup-algorithm
around every table-root should be generated anonymous
box wrapper.

Also this patch implements important part of CSS 2.2
spec that is currently not present in CSS Tables 3
spec draft: https://www.w3.org/TR/CSS22/tables.html#model
that portion of computed properties should be moved
from table-root to table wrapper box. Without having
this part implemented height of absolutely positioned
table with `height: auto` won't be computed correctly.
2023-01-09 11:47:31 +01:00
Aliaksandr Kalenik
e107c83a57 LibWeb: Remove inheritance of TableBox from BlockContainer
Fixup rule that table roots need to be wrapped in anonymous
block boxes need to be implemeted instead of having `TableBox`
inherited from `BlockContainer`.
2023-01-09 11:47:31 +01:00
Aliaksandr Kalenik
c8337e9ee8 LibWeb: Remove inheritance of TableRowGroupBox from BlockContainer
Having `TableRowGroupBox` not inherited from `BlockContainer`
allows to write more simpler layout code.
2023-01-09 11:47:31 +01:00
Hendiadyoin1
1bdc4e6b29 AK: Reorder AK/Math after the removal of i686
Without i686 we can remove some implementations for sqrt and round_to.
2023-01-09 11:36:21 +01:00
martinfalisse
ce0f41b9fb LibWeb+WebContent: Use new String class in CSS::StyleValue
Converts uses of DeprecatedString to String in StyleValue, and patches
surrounding files that depend on these functions.
2023-01-09 11:09:31 +01:00
Srikavin Ramkumar
1c2e7b1e47 LibWeb: Run object representation steps on specified attribute updates 2023-01-09 10:58:22 +01:00
Srikavin Ramkumar
83cb35b60f LibWeb: Run object representation steps on element creation
Prior to this change, fallback content inside an object tag would not
be rendered on page load.
2023-01-09 10:58:22 +01:00
Karol Kosek
166f7e0b96 LibWeb: Respect box-sizing: content-box inside inline-blocks 2023-01-09 10:54:20 +01:00
Tim Ledbetter
61074b6b5c Help: Update browse view when opening a new help page
The browse view now always tracks the currently open help page.
2023-01-09 09:55:02 +01:00
Karol Kosek
41691a7fcb LibGUI: Make CommonLocationsProvider::load_from_json() failable
... and additionally port it to Core::Stream. :^)
2023-01-09 09:45:26 +01:00
Ben Wiederhake
493658423a fortunes: Fix broken links to now-defunct freenode.logbot.info
On the page https://archive.logbot.info/ , the old data is still easily
accessible. Even if it goes down, there will 'always' be a backup of the
serenityos content at my backup site, as a gzipped text file:
https://benwiederhake.github.io/freenode-serenity-archive/index.html

Long live fortunes(1)!
2023-01-09 09:13:48 +01:00
Nico Weber
b8bfefd130 LibGfx: Add initializer for ICC::DistinctFourCC
These are currently only used in Optional<>s, so this is no effective
behavior change.
2023-01-08 23:41:14 +01:00
Nico Weber
db02cf2aa8 LibGfx: Add initializers for ICCProfile enum class fields 2023-01-08 23:41:14 +01:00
Nico Weber
1a907aa305 LibGfx: Add initializer for ICCProfile::m_creation_timestamp 2023-01-08 23:41:14 +01:00
Nico Weber
7ae97c9fc4 LibGfx+icc: Look at profile_size field
This trims the input bytes to the profile size stored in the file.
Alternatively, we could reject files where the stored size doesn't
match the handed in size. But ICC profiles can be embedded in other
files, and those could conceivably pad the ICC profile data some.
2023-01-08 23:41:14 +01:00
Nico Weber
7d4ec4fecf LibGfx: Rename ICC::DateTimeNumber::hour to hours to match spec 2023-01-08 23:41:14 +01:00
Andreas Kling
33fd9ea5b3 LibGUI: Prevent "hide unnecessary scrollbars" from showing unwanted bars
When using this mode on an AbstractScrollWidget, it was not honoring the
related "scrollbars enabled" setting.

If scrollbars are disabled, they should never be made visible by the
"unnecessary scrollbars" logic.
2023-01-08 23:01:16 +01:00
EWouters
06d24be8c9 Ports/timidity: Use fresh config.guess for timidity 2023-01-08 22:54:19 +01:00
Liav A
29a46f400d Documentation: Remove references to the removed NE2000 driver 2023-01-08 21:51:59 +01:00