Commit graph

34813 commits

Author SHA1 Message Date
Sam Atkins
a9ad72cc0f Base: Add a pseudo-element test page 2022-02-25 19:35:34 +01:00
networkException
692757c489 Base: Use "Library Functions" instead of "Libraries" for man section 3 2022-02-25 12:06:31 -05:00
networkException
9279dd783b Everywhere: Use title case for man section titles
In addition to the section headings on man.serenityos.org,
all occurances of man section titles are now formatted in title case.
2022-02-25 12:06:31 -05:00
Linus Groh
967300e1e3 Meta: Title case 'File Formats' on man.serenityos.org 2022-02-24 23:04:22 +00:00
networkException
156e8a80c7 Meta: Use correct man page title for section 5 on man.serenityos.org 2022-02-24 22:49:03 +00:00
Karol Kosek
4cab5bbead Base: Make U+0126, U+0132, U+0152 and U+0153 wider in Katica Regular 10 2022-02-24 22:26:17 +00:00
Karol Kosek
906e7aebe4 Base: Add Latin Extended-A to font Katica Regular 12
0100-017E: https://www.unicode.org/charts/PDF/U0100.pdf
2022-02-24 22:26:17 +00:00
Jan Grau
9311b685fe Taskbar: Minimize/activate window on Super+Digit event
Handle the SuperDigitKeyPressed event in the taskbar. Toggle the
respective taskbar button.
2022-02-24 18:57:20 +00:00
Jan Grau
6992a07afc LibGUI+WindowServer: Add new WMEvent Super+Digit
This adds a keyboard event for Super+0 to Super+9. Later to be consumed
in the taskbar.

Currently only this keyboard sequence is supported:
  - Super key down
  - Digit key down

But not this:
  - Super key down
  - Digit key down
  - Digit key up
  - Digit key down
2022-02-24 18:57:20 +00:00
Andreas Kling
001b08dec9 LibGUI: Put TextEditor widgets in "Wrap at Words" mode by default 2022-02-24 19:40:26 +01:00
thankyouverycool
29504ae5b6 HackStudio: Adjust heights for Locator and Find widgets
These were two pixels too small and, in Locator's case, blurring
the boundary with Statusbar.
2022-02-24 19:09:41 +01:00
thankyouverycool
77c4b20157 HackStudio: Segment the status bar and setup override text 2022-02-24 19:09:41 +01:00
thankyouverycool
988c6fea19 LibGUI: Prefer to pop-up Tray Button menus from the top right
Fixes menus obscuring SegmentWidgets in status bars.
2022-02-24 19:09:41 +01:00
thankyouverycool
b9f81b91a6 TextEditor: Update status bar to use clickable Segments
Adds two new Segments to TextEditor's status bar to quickly
change and display syntax highlighting and line and column info.
2022-02-24 19:09:41 +01:00
thankyouverycool
94b74937d8 LibGUI+LibSyntax: Stringify Highlighter::Language
This patch adds a Highlighter::Language -> string helper and a
callback for Highlighter changes.
2022-02-24 19:09:41 +01:00
thankyouverycool
3aa95dd4d5 LibGUI+Apps: Convert Statusbar Labels to Segments
Segments inherit from Button and let us add clickable widgets
to status bars. This patch also adds proportional, fixed and
autosized modes for segments and lets the status bar consume
all non-clickable segments for override text.
2022-02-24 19:09:41 +01:00
thankyouverycool
e113e3ccaa LibGfx: Return early when painting FrameShape::NoFrames 2022-02-24 19:09:41 +01:00
Andreas Kling
52651f41b0 Documentation: Start writing about "LibWeb: From loading to painting"
This document is meant to cover every significant step in the journey
from giving a page URL to LibWeb, and pixels showing up on screen.

It's by no means complete, but I wrote a fair chunk already, so I'll
commit at this stage and we can expand on it in-tree.
2022-02-24 18:45:37 +01:00
Timothy Flynn
21bd3a21bd LibWeb: Append only one line feed character in Document.writeln
There were a couple issues here:

1. The line feed should only be appended once, rather than one per
   string.
2. The new_strings list of strings was unused (we were creating the new
   list, then passing the old list to Document.write).
2022-02-24 18:12:19 +01:00
thankyouverycool
d94db1900e LibGUI+LibGfx: Defer to fonts when setting Editor line height
Fonts now provide their preferred line height based on maximum
height and requested line gap. TTFs provide a preferred line gap
from table metrics while BitmapFonts are hardcoded at the previous
default for now.
2022-02-24 18:09:22 +01:00
thankyouverycool
07910c12e3 LibGUI: Ensure ruler grows properly when using proportional fonts
Ruler needs to take into account spacing between glyphs for
proportional fonts as line count increases. This also replaces
the less accurate 'x' width estimate for widest character with
a '4'
2022-02-24 18:09:22 +01:00
Brian Gianforcaro
35b06ef1eb UserspaceEmulator: Fix syntax of generated profiles
While trying out `ue --profile` today, I received an invalid json
profile. After poking around at the file it looks like we never close
the `events: [..` array that we generate, and thus end up with an
invalid document.

The fix is straight forward, always emit the closing brace.
2022-02-24 16:12:19 +03:30
Nícolas F. R. A. Prado
eebdd86fbd ClipboardHistory: Add Time column
Add a Time column to ClipboardHistory that shows the time when each
item in the list was copied.
2022-02-24 08:47:55 +01:00
Peter Ross
9d94c85b6a Kernel: Use IO init method for Bochs emulated VGA adapter
In short: QEMU supports both Memory-Mapped-IO and classic IO methods
for controlling the emulated VGA device. Bochs and VirtualBox only
support the classic IO method. An excellent write up on the history of
these interfaces can be found here:
https://www.kraxel.org/blog/2018/10/qemu-vga-emulation-and-bochs-display

The IO method was how things were done originally in SerenityOS. Commit
6a728e2d76 introduced the MMIO method for
all devices, breaking Bochs and VirtualBox compatibility. Later in
commit 6a9dc5562d the classic IO method
was restored for VirtualBox graphics adapters.

QEMU and Bochs use the same PCI VID/DID (0x1234/0x1111) for the emulated
VGA adapter. To distinguish betwen QEMU and Bochs we use the PCI
revision ID field (0=Bochs, 2=QEMU).
2022-02-24 09:08:04 +02:00
Sam Atkins
09262e3b77 LibWeb: Actually query the orientation
I made a typo and was checking for "hover" twice.
2022-02-24 08:04:25 +01:00
Sam Atkins
114a7b357b LibWeb: Implement @media(overflow-inline)
I guess I got confused by this before, but it's actually the same as
overflow-block.
2022-02-24 08:04:25 +01:00
Sam Atkins
fd2ef43cb4 LibWeb: Implement <resolution> as a media feature type
This is the only dimension type besides `<length>` that is used in any
media queries in levels 4 or 5 right now. Others can be included
if/when they're needed.
2022-02-24 08:04:25 +01:00
Sam Atkins
53a3937c34 LibWeb: Allow Angle/Frequency/Resolution/Time values for CSS properties 2022-02-24 08:04:25 +01:00
Sam Atkins
5c8ea81d21 LibWeb: Parse Angle/Frequency/Resolution/Time types 2022-02-24 08:04:25 +01:00
Sam Atkins
f76a541819 LibWeb: Move length-unit-from-string code into Length
This means the units are defined in a single place instead of two.

Also removed the verify that we didn't produce a bogus % dimension token
in the Tokenizer, since this has never happened and the parser is not a
tokenizer test suite. :^)
2022-02-24 08:04:25 +01:00
Sam Atkins
608bfac2a9 LibWeb: Implement CSS Time class
This corresponds to `<time>` in the grammar.
2022-02-24 08:04:25 +01:00
Sam Atkins
0465abcfec LibWeb: Implement CSS Resolution class
This corresponds to `<resolution>` in the grammar.
2022-02-24 08:04:25 +01:00
Sam Atkins
bd79c303f6 LibWeb: Implement CSS Frequency class
This corresponds to `<frequency>` in the grammar.
2022-02-24 08:04:25 +01:00
Sam Atkins
355d1936f2 LibWeb: Implement CSS Angle class
This corresponds to `<angle>` in the grammar.
2022-02-24 08:04:25 +01:00
Sam Atkins
a07fed4e53 LibWeb: Account for Calculated in Length methods
We were ignoring this in a couple of places.
2022-02-24 08:04:25 +01:00
Sam Atkins
64f112c4ea LibWeb: Alphabetize LibWeb CMakeLists.txt 2022-02-24 08:04:25 +01:00
Liav A
2daaa48bab Meta: Remove SB16 driver from the features list in README.md
We no longer support this device, so just remove it from the kernel
features list in README.md file.
2022-02-24 07:26:45 +01:00
Liav A
a38a637f5c Kernel/Audio: Remove the SB16 driver
This driver is not tested and probably not used on any modern hardware
machine, because it is plugged into the ISA bus and not the PCI bus.
Also, the run script doesn't utilize this device anymore, making it more
hard to test this driver and to ensure it doesn't rot.
2022-02-24 07:26:45 +01:00
kperdlich
a3ab8dcecd Shell: Use an opaque color for SyntaxError
Use an opaque color for SyntaxError in
Syntax Highlighter to avoid transparent errors.
2022-02-23 21:56:16 +00:00
Linus Groh
2c1252b92e LibGUI/EmojiInputDialog: Skip multi code point emojis for now
These will require some tweaking here and elsewhere in LibGUI, to handle
both rendering of the emojis as single glyphs consistently, and faking
key events with multiple code points after selecting one.
2022-02-23 21:53:30 +00:00
Linus Groh
8b790c4ff8 LibGUI/EmojiInputDialog: Automatically calculate the dialog size
This was getting way too crowded again. Let's just fix the FIXME. :^)
2022-02-23 21:53:30 +00:00
Linus Groh
2e49368b28 Base: Add some regional indicator symbol emoji flags :^)
AQ, AT, CH, DE, DK, EU, FI, FR, GB, GR, HU, IL, IR, NL, NO, PL, RU, SE,
TR, UA, UN, US.

Picked by the location of various fellow Serenity contributors, and some
random ones.
2022-02-23 21:53:30 +00:00
Linus Groh
2faa9781cd Base: Add ZWJ sequence emoji flags :^)
Rainbow flag, Transgender flag, Pirate flag.
2022-02-23 21:53:30 +00:00
Linus Groh
c5c026890e LibGfx: Add basic variation selector and regional indicator support :^)
I'm sure there's a spec for this somewhere, but this is a first working
approximation.

Closes #3315.
2022-02-23 21:53:30 +00:00
Linus Groh
cab032f1ee LibGfx+LibGUI: Support multi code point emojis in text painting :^)
This necessitates switching from passing a single code point to the
callback to passing a non-const Utf8CodePointIterator instead.

Note that the text selection mechanisms in LibGUI and LibWeb don't
handle this properly yet; they still assume that each code point
renders as one glyph. Similarly, width calculations for text widths
don't either, so a single such an emoji will require space for more
than one glyph.

It also doesn't work in LibVT's TerminalWidget, where each code point
is handled and rendered separately, so LibGfx never gets a chance to
check if subsequent code points could result in a combined emoji.
2022-02-23 21:53:30 +00:00
Linus Groh
e1eb882b1c LibGfx: Add Emoji::emoji_for_code_point_iterator(Utf8CodePointIterator&)
In the common case of text rendering rather than getting the emoji
bitmap for a fixed number of code points, we don't know how many code
points make one emoji. As far as I can tell, the longest ones are up to
ten code points, so we try to consume all of them and do a lookup during
each iteration, and return the emoji for the longest chain of code
points. Quite basic and definitely room for improvement, but it works!
2022-02-23 21:53:30 +00:00
Linus Groh
514f3e9c74 LibGfx: Add Emoji::emoji_for_code_points(Span<u32> const&)
Not all emojis are just one code point, so the existing API is not
sufficient: Emoji::emoji_for_code_point(u32).
The file name for such emojis is simply each U+XXXX separated by an
underscore.
2022-02-23 21:53:30 +00:00
Linus Groh
1752f7720e AK: Add forward declaration for Utf8CodePointIterator 2022-02-23 21:53:30 +00:00
Linus Groh
b253bca807 AK: Add optional format string parameter to String{,Builder}::join()
Allow specifying a custom format string that's being used for each item
instead of hardcoding "{}".
2022-02-23 21:53:30 +00:00
Linus Groh
f8ff8c8dd6 AK: Add Traits<Span<T>>::hash() 2022-02-23 21:53:30 +00:00