Commit graph

1951 commits

Author SHA1 Message Date
Sam Atkins cbd28c9110 HexEditor: Add annotations system
Allow the user to highlight sections of the edited document, giving them
arbitrary background colors. These annotations can be created from a
selection, or by manually specifying the start and end offsets.
Annotations can be edited or deleted by right-clicking them.

Any color can be used for the background. Dark colors automatically make
the text white for easier readability. When creating a new annotation,
we use whatever color the user last picked as this is slightly more
likely to be the one they want.

Icons contributed by Cubic Love.

Co-authored-by: Cubic Love <7754483+cubiclove@users.noreply.github.com>
2024-01-14 13:45:02 +00:00
Bastiaan van der Plaat cde14901bc Ladybird+LibWeb: Add initial about:version internal page 2024-01-13 13:41:09 -05:00
Bastiaan van der Plaat 05c0640474 Ladybird+LibWeb: Add about scheme support for internal pages 2024-01-13 13:41:09 -05:00
Bastiaan van der Plaat c0acb2918b Ladybird: Rename new-tab.html file to newtab.html 2024-01-13 13:41:09 -05:00
Bastiaan van der Plaat e3ad75d073 Ladybird: Move and format directory and error template files 2024-01-13 13:41:09 -05:00
Timothy Flynn 00510e40d9 LibWeb: Convert the cookie test page to a text test 2024-01-10 23:26:40 +01:00
Cubic Love b812ccd5e8 Base: Improve 2048 Icon
Make the icon the same colors as the original game's icon. Give the
tile slightly rounded corners and subtle shading.
2024-01-07 16:27:39 +00:00
Daniel La Rocque 242d1d8eba LibWeb: Fail to parse cookie date when date does not exist
Previously, the cookie date validation did not validate days in the
context of the month and year, resulting in dates that do not exist to
be successfully parsed (e.g. February 31st). We now validate that the
day does not exceed the number of days for the given month and year,
taking leap years into account.
2024-01-07 08:01:58 -05:00
Bastiaan van der Plaat 52397d01bd LibWeb: Add textarea placeholder 2024-01-07 10:22:32 +01:00
Timothy Flynn d11c7a19da LibWebView: Properly decode Base64-encoded strings as UTF-8
In the UI process, we encode generated HTML as Base64 to avoid having to
deal with things like arbitrarily nested quotes. The HTML is encoded as
UTF-8, and the raw bytes of that encoding are transcoded to Base64.

In the Inspector process, we are decoding the Base64 string using atob,
which has awkward non-Unicode limitations. The resulting string is only
a byte string. We must further decode the bytes as UTF-8, which we do
using TextDecoder.
2024-01-02 22:09:25 +01:00
Bastiaan van der Plaat f8feca5d21 LibWeb: Use directory page when viewing a resource schemed directory URL 2023-12-27 10:54:07 -05:00
Bastiaan van der Plaat b39d99cf2f LibWeb: Use resource scheme for icons in internal pages 2023-12-27 10:54:07 -05:00
Andrew Kaster b10fee00eb LibWeb+WebWorker: Convert Workers to use MessagePorts for postMessage
This aligns Workers and Window and MessagePorts to all use the same
mechanism for transferring serialized messages across realms.

It also allows transferring more message ports into a worker.

Re-enable the Worker-echo test, as none of the MessagePort tests have
themselves been flaky, and those are now using the same underlying
implementation.
2023-12-25 12:09:11 +01:00
Timothy Flynn bacf3cede4 Ladybird+BrowserSettings: Load the NTP/home resource files with LibWeb 2023-12-24 14:09:23 +01:00
Bastiaan van der Plaat c30911ab10 LibWeb: Hide select chevron icon when appearance: none; 2023-12-23 10:12:36 +01:00
Bastiaan van der Plaat 0f37e0ee89 LibWeb: Add basic input range rendering 2023-12-21 13:17:51 +01:00
Torstennator b65e711929 LibGUI: Add DynamicWidgetContainter
Add a new widget "DynamicWidgetContainer" that is used to group it's
child widgets within an collapsable and detachable container. The
DynmnicWidgetContainer is able to persist it's view state if a config
domain has been provided. Having that set will allow the widget to
restore it's view state automatically.
2023-12-14 09:07:20 -07:00
Nicolas Ramz cd6c7f3fc4 LibGfx/ILBMLoader: Add support for PC DeluxePaint files 2023-12-13 10:39:13 +00:00
Timothy Flynn 41ffc69c9d LibWebView: Clear the Inspector DOM/accessibility trees upon reset
This prevents rendering stale trees while navigating to a new page. The
old non-WebView inspector widgets behaved this way.
2023-12-10 16:45:08 +01:00
Timothy Flynn 55ec1cbfb5 LibWebView: Allow editing empty DOM text nodes in the Inspector
When a DOM text node is empty, we currently render the node name (which
is "#text") in the Inspector. This is just to prevent displaying nothing
at all, which looks a bit off. However, the patch to allow editing text
fields neglected to allow editing these empty fields.

This patch attaches the original text data as a data attribute, much
like we do for DOM attributes. That is used as the editable text in the
inspector, and the empty text fields are now wrapped in an editable
span.
2023-12-10 09:44:34 +01:00
Timothy Flynn 42c0ac9352 LibWebView: Log the result of taking screenshots to Inspector's console
It probably isn't obvious that screenshots are saved to the user's
Downloads folder, so add a console message to inform them.
2023-12-10 09:44:34 +01:00
Bastiaan van der Plaat 466153e680 Ladybird+LibWeb: Add basic select element support 2023-12-09 22:06:20 +01:00
Timothy Flynn 8162dc5ee6 LibWeb+LibWebView+WebContent: Separate tag/attribute in Inspector menu
It was a bit short-sighted to combine the tag and attribute names into
one string when the Inspector requests a context menu. We will want both
values for some context menu actions. Send both names, as well as the
attribute value, when requesting the context menu.
2023-12-07 10:53:12 +01:00
Timothy Flynn 636ff33d60 LibWebView: Add an escape key handler for DOM-editing <input> fields
Little quality of life improvement I keep reaching for.
2023-12-06 13:04:50 +01:00
Timothy Flynn 0ddc2ea8c4 LibWebView: Add Inspector actions to be used as context menu callbacks
These allow for triggering an edit of a DOM node (as an alternative to
double-clicking), removing a DOM node, and adding/removing DOM node
attributes.
2023-12-06 13:04:50 +01:00
Timothy Flynn 2633ea8c79 LibWeb+LibWebView+WebContent: Add an Inspector IPC to open context menus
The Inspector will have context menu support to manipulate the DOM, e.g.
adding or removing nodes/attributes. This context menu will require some
detailed knowledge about what element in the Inspector has been clicked.
To support this, we intercept the `contextmenu` event and collect the
required information to be sent to the Inspector client over IPC.
2023-12-06 13:04:50 +01:00
Timothy Flynn 05c8d5ba57 Base+Ladybird: Move Ladybird-related HTML files to their own folder
Pages like the new tab page, error page, etc. all belong solely to
Ladybird, but are scattered across a couple of subfolders in Base. This
moves them all to Base/res/ladybird.
2023-12-04 19:46:35 -05:00
Bastiaan van der Plaat 2107ab823d LibWeb: Add basic HTML meter element support 2023-12-04 19:54:43 +00:00
Timothy Flynn 65a9eae142 LibWebView: Draw some knurling on the draggable Inspector separator 2023-12-04 13:58:20 +01:00
Timothy Flynn 6d743ce9e8 LibWebView: Allow editing the DOM through the Inspector WebView
This allows a limited amount of DOM manipulation through the Inspector.
Users may edit node tag names, text content, and attributes. To initiate
an edit, double-click the tag/text/attribute of interest.

To remove an attribute, begin editing the attribute and remove all of
its text. To add an attribute, begin editing an existing attribute and
add the new attribute's text before or after the existing attribute's
text. This isn't going to be the final UX, but works for now just as a
consequence of how attribute changes are implemented. A future patch
will add more explicit add/delete actions.
2023-12-04 01:33:57 +01:00
Timothy Flynn b9902fef36 LibWebView: Add a draggable separator between the two Inspector panes 2023-12-02 22:54:06 +01:00
Timothy Flynn d8a700d9be LibWebView: Implement a JavaScript console tab in the Inspector
This adds a JS console to the bottom section of the Inspector WebView.
Much of this code is based on the existing WebView::ConsoleClient, but
ported to fit the inspector model. That is, much of the code from that
class is now handled in the Inspector's JS.
2023-12-02 10:34:22 +01:00
Timothy Flynn a7ff65a0c6 LibWebView: Use querySelectorAll to find hoverable tree nodes
We don't need a live HTMLCollection here, so let's use querySelectorAll
to instead iterate over a static NodeList.
2023-11-30 14:08:53 +01:00
Timothy Flynn 030b90b79d LibWebView: Move the Inspector JS and CSS to independent files
These are much easier to work with in their own files with syntax
highlighting and other IDE-friendliness.
2023-11-30 14:08:53 +01:00
Andrew Kaster 1602663b9e LibWeb+WebWorker: Implement a first cut of post_message for Workers
This implementation completely ignores MessagePorts, and manually plumbs
data through LocalSockets.
2023-11-24 08:41:38 +01:00
Nicole 7ca4e4a967 Base: Add some emojis
Adds:
U+1F390 fully-qualified     # 🎐 E0.6 wind chime
U+1F54D fully-qualified     # 🕍 E1.0 synagogue
U+1F54B fully-qualified     # 🕋 E1.0 kaaba
U+1F95C fully-qualified     # 🥜 E3.0 peanuts
U+1F3E6 fully-qualified     # 🏦 E0.6 bank
U+1F690 fully-qualified     # 🚐 E1.0 minibus
2023-11-22 08:52:58 +00:00
Xexxa bd8b907f53 Base: Adjust emoji
🏂 - U+1F3C2 SNOWBOARDER
Reuse snow colour from U+1F3BF.

🍨 - U+1F368 ICE CREAM
Reuse ice cream colour from U+1F366.

🧨 - U+1F9E8 FIRECRACKER
Make the lit fuse reflect on the firecracker.

🤖 - U+1F916 ROBOT
🗑️ - U+1F5D1 WASTEBASKET
Make shadow more symmetrical.

💂 - U+1F482 GUARD
💂‍♂️ - U+1F482 U+200D U+2642 MAN GUARD
💂‍♀️ - U+1F482 U+200D U+2640 WOMAN GUARD
👸 - U+1F478 PRINCESS
Make colors more consistent with U+1F468_U+200D_U+1F9B1.

🐳 - U+1F433 SPOUTING WHALE
Reuse water colour from U+1F3C4_U+200D_U+2642, adjust foam color to
not be #FFFFFF.

🪿 - U+1FABF GOOSE
🍊 - U+1F34A TANGERINE
🍋 - U+1F34B LEMON
🍎 - U+1F34E RED APPLE
🍏 - U+1F34F GREEN APPLE
🎨 - U+1F3A8 ARTIST PALETTE
Add shadow.

🍐 - U+1F350 PEAR
Add shadow, remove unnecessary padding.

🕯️ - U+1F56F CANDLE
Make flame reflect on the candle, remove unnecessary padding.

🐣 - U+1F423 HATCHING CHICK
🍶 - U+1F376 SAKE
💺 - U+1F4BA SEAT
🖍️ - U+1F58D CRAYON
Remove unnecessary padding.
2023-11-21 20:16:06 -05:00
Bastiaan van der Plaat 1cdbfc2ff1 LibWeb: Add ol start and li value attributes support 2023-11-09 16:10:54 +01:00
Lucas CHOLLET 26a3be17c8 Userland: Register TIFF as a supported image file type
This includes both .tiff and .tif extensions.
2023-11-06 12:29:30 -07:00
Bastiaan van der Plaat 5a7f43ad38 Maps: Add favorites panel with favorite places management 2023-10-26 17:23:54 -06:00
Timothy Flynn a39eebeb74 LibWebView: Reject cookies whose domain is on the Public Suffix List 2023-10-26 11:06:49 +02:00
segfaultdev c93df9ead9 Base: Add & rename emoji
💁 - U+1F481 PERSON TIPPING HAND
💁‍♀️ - U+1F481 U+200D U+2640 WOMAN TIPPING HAND
💁‍♂️ - U+1F481 U+200D U+2642 MAN TIPPING HAND
💆 - U+1F486 PERSON GETTING MASSAGE
💆‍♀️ - U+1F486 U+200D U+2640 WOMAN GETTING MASSAGE
💆‍♂️ - U+1F486 U+200D U+2642 MAN GETTING MASSAGE
💇 - U+1F487 PERSON GETTING HAIRCUT
💇‍♀️ - U+1F487 U+200D U+2640 WOMAN GETTING HAIRCUT
💇‍♂️ - U+1F487 U+200D U+2642 MAN GETTING HAIRCUT
🙅 - U+1F645 PERSON GESTURING NO
🙅‍♀️ - U+1F645 U+200D U+2640 WOMAN GESTURING NO
🙅‍♂️ - U+1F645 U+200D U+2642 MAN GESTURING NO
🙆 - U+1F646 PERSON GESTURING OK
🙆‍♀️ - U+1F646 U+200D U+2640 WOMAN GESTURING OK
🙆‍♂️ - U+1F646 U+200D U+2642 MAN GESTURING OK
🙇 - U+1F647 PERSON BOWING
🙇‍♀️ - U+1F647 U+200D U+2640 WOMAN BOWING
🙇‍♂️ - U+1F647 U+200D U+2642 MAN BOWING
🙋 - U+1F64B PERSON RAISING HAND
🙋‍♀️ - U+1F64B U+200D U+2640 WOMAN RAISING HAND
🙋‍♂️ - U+1F64B U+200D U+2642 MAN RAISING HAN
2023-10-22 14:08:03 +01:00
segfaultdev c7baea5d29 Base: Add more emoji
🧑‍💻 - U+1F9D1 U+200D U+1F4BB TECHNOLOGIST
🧑‍💼 - U+1F9D1 U+200D U+1F4BC OFFICE WORKER
🧑‍🔧 - U+1F9D1 U+200D U+1F527 MECHANIC
🧑‍🔬 - U+1F9D1 U+200D U+1F52C SCIENTIST
🧑‍🚀 - U+1F9D1 U+200D U+1F680 ASTRONAUT
🧑‍🚒 - U+1F9D1 U+200D U+1F692 FIREFIGHTER
2023-10-22 14:08:03 +01:00
segfaultdev ea25865d89 Base: Add more emoji
👨‍⚕️ - U+1F468 U+200D U+2695 MAN HEALTH WORKER
👨‍⚖️ - U+1F468 U+200D U+2696 MAN JUDGE
👩‍⚕️ - U+1F469 U+200D U+2695 WOMAN HEALTH WORKER
👩‍⚖️ - U+1F469 U+200D U+2696 WOMAN JUDGE
👳 - U+1F473 PERSON WEARING TURBAN
👳‍♀️ - U+1F473 U+200D U+2640 WOMAN WEARING TURBAN
👳‍♂️ - U+1F473 U+200D U+2642 MAN WEARING TURBAN
🧑‍⚕️ - U+1F9D1 U+200D U+2695 HEALTH WORKER
🧑‍⚖️ - U+1F9D1 U+200D U+2696 JUDGE
2023-10-22 14:08:03 +01:00
segfaultdev c65f19186d Base: Add more emoji
👨 - U+1F468 MAN
👨‍🦰 - U+1F468 U+200D U+1F9B0 MAN RED HAIR
👨‍🦱 - U+1F468 U+200D U+1F9B1 MAN CURLY HAIR
👨‍🦲 - U+1F468 U+200D U+1F9B2 MAN BALD
👨‍🦳 - U+1F468 U+200D U+1F9B3 MAN WHITE HAIR
👩 - U+1F469 WOMAN
👩‍🦰 - U+1F469 U+200D U+1F9B0 WOMAN RED HAIR
👩‍🦱 - U+1F469 U+200D U+1F9B1 WOMAN CURLY HAIR
👩‍🦲 - U+1F469 U+200D U+1F9B2 WOMAN BALD
👩‍🦳 - U+1F469 U+200D U+1F9B3 WOMAN WHITE HAIR
👱 - U+1F471 PERSON BLOND HAIR
👱‍♀️ - U+1F471 U+200D U+2640 WOMAN BLOND HAIR
👱‍♂️ - U+1F471 U+200D U+2642 MAN BLOND HAIR
🧑 - U+1F9D1 PERSON
🧑‍🦰 - U+1F9D1 U+200D U+1F9B0 PERSON RED HAIR
🧑‍🦱 - U+1F9D1 U+200D U+1F9B1 PERSON CURLY HAIR
🧑‍🦲 - U+1F9D1 U+200D U+1F9B2 PERSON BALD
🧑‍🦳 - U+1F9D1 U+200D U+1F9B3 PERSON WHITE HAIR
2023-10-22 14:08:03 +01:00
segfaultdev eb07a08178 Base: Add more emoji
👨‍💻 - U+1F468 U+200D U+1F4BB MAN TECHNOLOGIST
👨‍💼 - U+1F468 U+200D U+1F4BC MAN OFFICE WORKER
👨‍🔧 - U+1F468 U+200D U+1F527 MAN MECHANIC
👨‍🔬 - U+1F468 U+200D U+1F52C MAN SCIENTIST
👨‍🚀 - U+1F468 U+200D U+1F680 MAN ASTRONAUT
👨‍🚒 - U+1F468 U+200D U+1F692 MAN FIREFIGHTER
👩‍💻 - U+1F469 U+200D U+1F4BB WOMAN TECHNOLOGIST
👩‍💼 - U+1F469 U+200D U+1F4BC WOMAN OFFICE WORKER
👩‍🔧 - U+1F469 U+200D U+1F527 WOMAN MECHANIC
👩‍🔬 - U+1F469 U+200D U+1F52C WOMAN SCIENTIST
👩‍🚀 - U+1F469 U+200D U+1F680 WOMAN ASTRONAUT
👩‍🚒 - U+1F469 U+200D U+1F692 WOMAN FIREFIGHTER
2023-10-22 14:08:03 +01:00
Bastiaan van der Plaat b640747116 LibWeb: Add canvas context2d roundRect 2023-10-20 07:20:29 +02:00
Cubic Love bd5296d6bb Base: Rename and update card backs
CobyCat has very kindly remastered their card backs to fit the new card
back dimensions of 72 x 102px with 3px rounded corners. This gives
cards 3px of inner border which looks much neater.

Also, all card names have been capitalized and the suffix '-deck'
removed to improve their appearance in GamesSettings.

Co-authored-by: Tom L <lemtom@users.noreply.github.com>
2023-10-15 07:25:20 +02:00
Gabriel Nava Marino f97c4d20fa Base: Add 201 Hangul syllables to font Katica Regular 10
Adds most commonly used Hangul syllables in range AC00–D7AF
https://www.unicode.org/charts/PDF/UAC00.pdf

U+AC00 U+AC01 U+AC04 U+AC1C U+AC70 U+AC74 U+AC83 U+AC8C U+ACA9
U+ACB0 U+ACBD U+ACC1 U+ACC4 U+ACE0 U+ACF5 U+ACFC U+AD00 U+AD50
U+AD6C U+AD6D U+ACE0 U+AD8C U+ADDC U+ADF8 U+ADFC U+AE08 U+AE30
U+B098 U+B0B4 U+B108 U+B140 U+B150 U+B155 U+B178 U+B204 U+B290
U+B294 U+B298 U+B2C8 U+B2E4 U+B2E8 U+B2EC U+B2F9 U+B300 U+B3C4
U+B3C5 U+B3D9 U+B418 U+B41C U+B420 U+B450 U+B4E0 U+B4E4 U+B4EC
U+B4F1 U+B530 U+B5A4 U+B610 U+B73B U+B77C U+B78C U+B791 U+B798
U+B7EC U+B825 U+B85C U+B85D U+B958 U+B974 U+B978 U+B97C U+B9AC
U+B9C8 U+B9CC U+B9D0 U+BA70 U+BA85 U+BAA8 U+BAA9 U+BB34 U+BB38
U+BB3C U+BBF8 U+BBFC U+BC0F U+BC14 U+BC18 U+BC1B U+BC1C U+BC29
U+BC30 U+BC95 U+BCC4 U+BCF4 U+BCF8 U+BD80 U+BD84 U+BE0C U+BE44
U+C0AC U+C0B0 U+C0C1 U+C0DD U+C11C U+C120 U+C131 U+C138 U+C18C
U+C18D U+C218 U+C2DC U+C2DD U+C2E0 U+C2E4 U+C2EC U+C2F6 U+C544
U+C548 U+C57C U+C57D U+C591 U+C5B4 U+C5B8 U+C5C4 U+C5C5 U+C5C6
U+C5D0 U+C5D8 U+C5EC U+C5F0 U+C600 U+C601 U+C608 U+C624 U+C640
U+C644 U+C694 U+C6B0 U+C6D0 U+C704 U+C720 U+C721 U+C73C U+C740
U+C744 U+C74C U+C758 U+C774 U+C778 U+C77C U+C788 U+C790 U+C791
U+C7A5 U+C7AC U+C801 U+C804 U+C815 U+C81C U+C870 U+C874 U+C885
U+C8C4 U+C8FC U+C900 U+C911 U+C99D U+C9C0 U+C9C1 U+C9C4 U+C9C8
U+CC28 U+CC38 U+CC9C U+CCB4 U+CD08 U+CE58 U+D07C U+D0C0 U+D0DC
U+D130 U+D1B5 U+D3B8 U+D3C9 U+D3EC U+D45C U+D544 U+D558 U+D559
U+D55C U+D560 U+D568 U+D569 U+D56D U+D574 U+D589 U+D604 U+D615
U+D638 U+D63C U+D654 U+D65C U+D68C U+D788

These cover about 78% of syllables in the top 1000 most common
Korean words as well as 94% of syllables in the Universal
Declaration of Human Rights.
2023-10-13 11:02:28 -06:00
Xexxa 61b6146d5e Base: Modify emoji
👨‍❤️‍👨 - U+1F468 U+200D U+2764 U+200D U+1F468
COUPLE WITH HEART: MAN, MAN
👩‍❤️‍👩 - U+1F469 U+200D U+2764 U+200D U+1F469
COUPLE WITH HEART: WOMAN, WOMAN
👨‍👨‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F466
FAMILY: MAN, MAN, BOY
👨‍👨‍👧 - U+1F468 U+200D U+1F468 U+200D U+1F467
FAMILY: MAN, MAN, GIRL
👨‍👨‍👧‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F467 U+200D U+1F466
FAMILY: MAN, MAN, GIRL, BOY
👨‍👨‍👦‍👦 - U+1F468 U+200D U+1F468 U+200D U+1F466 U+200D U+1F466
FAMILY: MAN, MAN, BOY, BOY
👨‍👨‍👧‍👧 - U+1F468 U+200D U+1F468 U+200D U+1F467 U+200D U+1F467
FAMILY: MAN, MAN, GIRL, GIRL
👩‍👩‍👦 - U+1F469 U+200D U+1F469 U+200D U+1F466
FAMILY: WOMAN, WOMAN, BOY
👩‍👩‍👧 - U+1F469 U+200D U+1F469 U+200D U+1F467
FAMILY: WOMAN, WOMAN, GIRL
👩‍👩‍👧‍👦 - U+1F469 U+200D U+1F469 U+200D U+1F467 U+200D U+1F466
FAMILY: WOMAN, WOMAN, GIRL, BOY
👩‍👩‍👦‍👦 - U+1F469 U+200D U+1F469 U+200D U+1F466 U+200D U+1F466
FAMILY: WOMAN, WOMAN, BOY, BOY
👩‍👩‍👧‍👧 - U+1F469 U+200D U+1F469 U+200D U+1F467 U+200D U+1F467
FAMILY: WOMAN, WOMAN, GIRL, GIRL
👨‍👦 - U+1F468 U+200D U+1F466
FAMILY: MAN, BOY
👨‍👦‍👦 - U+1F468 U+200D U+1F466 U+200D U+1F466
FAMILY: MAN, BOY, BOY
👨‍👧 - U+1F468 U+200D U+1F467
FAMILY: MAN, GIRL
👨‍👧‍👦 - U+1F468 U+200D U+1F467 U+200D U+1F466
FAMILY: MAN, GIRL, BOY
2023-10-07 15:40:47 -04:00