Commit Graph

14231 Commits

Author SHA1 Message Date
thankyouverycool
76157594a9 TextEditor: Save wrapping mode settings 2022-02-26 22:54:25 +01:00
thankyouverycool
e5f7032fb8 TextEditor: Add missing syntax Alt-menu shortcuts 2022-02-26 22:54:25 +01:00
thankyouverycool
5fedb742da LibGUI: Set Editors to wrap at words when MultiLine
And default to NoWrap when they are type SingleLine.
2022-02-26 22:54:25 +01:00
Nícolas F. R. A. Prado
9e81c2dc83 LibLine: Update inline search cursor after kill_line (^U) command
After the kill_line (^U) command was used, searching backwards in the
history would still filter based on the text previous to the deletion.

Update the inline search cursor like already done in other internal
functions, so the text used for search is the current one.
2022-02-27 00:14:10 +03:30
kleines Filmröllchen
084347becc Utilities+Meta: Check icons in markdown-check
We use the environment variable SERENITY_SOURCE_DIR to resolve and check
icon links. This is a bit inconvenient as SERENITY_SOURCE_DIR needs to
be set correctly before invoking the markdown checker, but as we use it
through the check-markdown script anyways, I think it's not a problem.
2022-02-26 20:05:06 +02:00
kleines Filmröllchen
4ef1bedc38 Utilities: Check help:// manpage links in markdown-check 2022-02-26 20:05:06 +02:00
kleines Filmröllchen
7399520e9a Utilities: Perform most markdown-check link checking with URLs
This should be much more robust against weirdly-formatted links that are
still valid URLs, additionally, future URL checkers can immediately
take advantage of the already-existing URL object.

Note that not all markdown links are valid URLs or paths, and that that
is intentional (e.g. only fragments, relative links etc.). We don't just
fail when something is not a URL.
2022-02-26 20:05:06 +02:00
kleines Filmröllchen
9902e71f99 Utilities: Allow link checking in markdown-check to fail during visit
With a special flag, we can now invalidate the links early on.
2022-02-26 20:05:06 +02:00
kleines Filmröllchen
112642a262 Utilities: Partially revert 9ec2b37
This removed checks for missing manpages, which we now need again as the
manpages are checked again.
2022-02-26 20:05:06 +02:00
Lenny Maiorani
4e6898c5cc LibMain: Update header includes 2022-02-26 17:49:58 +00:00
Lenny Maiorani
6bd880c404 LibCrypto: Simplify and move CRC32 table to cpp file
CRC32 table is generated at compile-time and put into a static
variable in the header file. This can be moved to be a function
instead of a class, be moved to the `.cpp` file` and generated as an
array instead of a class which only implements `operator[]`.
2022-02-26 17:49:47 +00:00
kleines Filmröllchen
50dc9a7be7 LibAudio: Add an array conversion transitional API to Buffer
Of course, Buffer is going to be removed very soon, but much of the
WavLoader behavior still depends on it. Therefore, this intermediary
API will allow adopting the Loader infrastructure without digging too
deep into the WavLoader legacy code. That's for later :^)
2022-02-26 17:57:55 +01:00
kleines Filmröllchen
63d9ec8e94 LibAudio: Allow resampling from any array-like type 2022-02-26 17:57:55 +01:00
kleines Filmröllchen
5d01db3493 LibAudio: Split Buffer.{h, cpp} into three files
The Buffer files had contained both the ResampleHelper and the
sample format utilities. Because the Buffer class (and its file) is
going to be deleted soon, this commit separates those two things into
their own files.
2022-02-26 17:57:55 +01:00
Andreas Kling
262488ea33 LibWeb: Validate the qualified name in createDocumentType()
1% progression on ACID3. :^)
2022-02-26 17:26:37 +01:00
Andreas Kling
f855cbac92 LibWeb: Add simple ad-hoc version of window.postMessage()
This allows us to use the wpt.live copy of the ACID3 test, which is kept
updated, unlike the acidtests.org version.
2022-02-26 17:21:40 +01:00
Andreas Kling
fc5e414596 LibWeb: Reorganize window.parent so it looks a bit more like the spec 2022-02-26 16:03:06 +01:00
Arne Elster
7223b593cb LibAudio: Add basic MP3 Decoder
This is a basic MPEG-1 layer 3 audio decoder. It supports all
sample rates and stereo modes except for freeformat.
2022-02-26 16:01:26 +01:00
Arne Elster
6a64aabce8 LibDSP: Add IMDCT
This implements a generic IMDCT to be used by the MP3 decoder.
2022-02-26 16:01:26 +01:00
Arne Elster
82afbd6593 LibAudio: Add decoding tables for MPEG-1 layer 3 audio
All data is taken straight from ISO/IEC 11172-3. These are tables
necessary for decoding MP3.
2022-02-26 16:01:26 +01:00
Arne Elster
a4ba781f23 LibAudio: Add huffman tables for MPEG-1 layer 3 audio
The data is taken straight from the ISO/IEC 11172-3 standard. For
decoding efficiency the tables are transformed into trees at compile
time using a constexpr approach. That way no runtime initialization is
necessary and decoding can be faster than searching through tables.
2022-02-26 16:01:26 +01:00
Sam Atkins
a57128467a LibWeb: Implement :nth-of-type and :nth-last-of-type selectors :^) 2022-02-26 15:30:24 +01:00
Luke Wilde
ad5fb1fd7e LibWeb: Implement Range.comparePoint 2022-02-26 12:53:32 +01:00
Luke Wilde
62b76e0658 LibWeb: Implement Range.isPointInRange 2022-02-26 12:53:32 +01:00
Luke Wilde
386ee5ab17 LibWeb: Implement Range.intersectsNode 2022-02-26 12:53:32 +01:00
Luke Wilde
4c08757ff9 LibWeb: Add Range.detach 2022-02-26 12:53:32 +01:00
Luke Wilde
8a755726ad LibWeb: Implement Range.selectNodeContents 2022-02-26 12:53:32 +01:00
Luke Wilde
2b2dbdc74f LibWeb: Implement Range.collapse 2022-02-26 12:53:32 +01:00
Luke Wilde
dfdc2ddb9e LibWeb: Implement Range.selectNode 2022-02-26 12:53:32 +01:00
Luke Wilde
a26f1b2ff9 LibWeb: Implement Range.compareBoundaryPoints 2022-02-26 12:53:32 +01:00
Luke Wilde
d73fb7e10f LibWeb: Implement Range.set{Start,End}{Before,After} 2022-02-26 12:53:32 +01:00
Luke Wilde
46ce50f74e LibWeb: Make Range.setStart and Range.setEnd spec compliant
These functions are way more involved than simply setting their
respective boundary points :^)
2022-02-26 12:53:32 +01:00
Luke Wilde
af3c866898 LibWeb: Make TreeNode::child_count return size_t instead of int
The primary benefit of this is that it's unsigned, as you can't have a
negative amount of children. Plus, all the users of child_count expect
it to be size_t.
2022-02-26 12:53:32 +01:00
Luke Wilde
3d44118595 LibWeb: Implement StaticRange 2022-02-26 12:53:32 +01:00
Luke Wilde
a2acda5669 LibWeb: Abstract Range's members into AbstractRange
Range's member variables are stored in AbstractRange as per the spec,
as they are also shared with StaticRange.
2022-02-26 12:53:32 +01:00
Luke Wilde
ed76b4238c LibWeb: Implement the legacy Audio factory function
This creates an Audio element with preload="auto" and the given src
attribute.

Required by Cookie Clicker.
2022-02-26 12:18:56 +01:00
Andreas Kling
79ea30bc96 LibWeb: Add HTMLTableSectionElement.rows and HTMLTableRowElement.cells
1% progression on ACID3. :^)
2022-02-26 12:18:39 +01:00
Andreas Kling
647576ec13 LibWeb: Fix LibWeb build with Clang
Clang doesn't like unused lambda captures.
2022-02-26 12:18:39 +01:00
Filiph Sandström
3c01ef1c23 Spreadsheet: Disable cut/copy if no cell is selected
This resolves #12766 which occurred when the user tried to
use either the cut or copy action before selecting a cell.
2022-02-26 10:36:27 +01:00
Andreas Kling
fe67fe3791 LibWeb: Check for valid names in Document.createElement() & friends
We now validate that the provided tag names are valid XML tag names,
and otherwise throw an "invalid character" DOM exception.

2% progression on ACID3. :^)
2022-02-26 10:03:07 +01:00
Andreas Kling
8daf603f46 LibWeb: Paint full bitmap font glyphs, even if there's overlap
Since we now honor the CSS font-size values when deciding line box
metrics, we sometimes find ourselves needing to paint text with a bitmap
font into a box that isn't large enough for the glyphs.

As it turns out, it looks a bit better if we just grow the paint rect to
fit the glyphs (instead of painting chopped-off glyphs.) So let's just
do that for now.
2022-02-26 09:32:52 +01:00
Andreas Kling
00146005bb LibWeb: Very basic support for CSS vertical-align: <length>
If vertical-align is a length value, we lift each line box fragment that
far from the baseline of the line box.

This is rather messy, and we'll have to improve factoring as we add
support for more alignment types.
2022-02-26 09:30:17 +01:00
Andreas Kling
c8892f64f5 LibWeb: Make InlineLevelIterator not enter into inline-block boxes
The purpose of "entering" a box is to collect box model metrics that
apply to content fragments within the box. However, inline-blocks are
special, in that their inner content does not directly participate in
the inline formatting context outside it.
2022-02-26 09:27:20 +01:00
Andreas Kling
3ca26c7a7a LibWeb: Fix InlineLevelIterator not exiting box model metric nodes
We were neglecting to pop nodes from the box model stack. The metrics
were already being zeroed out when used, but let's not grow the stack
needlessly.
2022-02-26 09:25:24 +01:00
Andreas Kling
797f51e122 LibWeb: Add border box top/bottom metrics to line box fragments
This will allow us to support more kinds of vertical alignment.
2022-02-26 09:24:40 +01:00
Andreas Kling
8b369bf7bd LibWeb: Remove unused LineBox::ends_with_forced_line_break() 2022-02-26 08:33:45 +01:00
Andreas Kling
784dbdef8e LibWeb: Make DOM inspector overlay rects a little nicer
Instead of just the outline, fill them with some semi-transparent color.
Also add tag name, ID, classes and coordinates to the little tooltip.
Finally, use the border box instead of the context box for metrics,
same as other browsers.
2022-02-26 08:25:46 +01:00
Andreas Kling
c59ab7cc8b LibWeb: Make StyleValue absolutization non-destructive
Instead of awkwardly visiting and mutating lengths inside StyleValues,
we now simply create a new StyleValue instead.

This fixes an issue where inherited relative lengths could get
absolutized using a parent as reference, and then not having the correct
values when used in a child context.
2022-02-26 01:35:25 +01:00
Andreas Kling
1cdbd377e7 LibWeb: Add vertical-align to ComputedValues 2022-02-26 01:35:06 +01:00
Andreas Kling
c9f4759329 LibWeb: Use CSS font-size when computing text fragment content height 2022-02-26 01:10:43 +01:00