Commit graph

2022 commits

Author SHA1 Message Date
Gasim Gasimzada 785180dd45 LibJS+WebContent: Implement console.table
- Expose table from console object
- Add new Table log level
- Create a JS object that represents table rows and columns
- Print table as HTML using WebContentConsoleClient
2024-08-22 09:08:50 +01:00
Timothy Flynn 2dbf846ff8 LibWebView: Include the document doctype in the exported Inspector HTML 2024-08-20 12:24:56 -04:00
Timothy Flynn 3ec5c1941f LibWeb+LibWebView: Add a button to the Inspector to export its contents
When working on the Inspector's HTML, it's often kind of tricky to debug
when an element is styled / positioned incorrectly. We don't have a way
to inspect the Inspector itself.

This adds a button to the Inspector to export its HTML/CSS/JS contents
to the downloads directory. This allows for more easily testing changes,
especially by opening the exported HTML in another browser's dev tools.

We will ultimately likely remove this button (or make it hidden) by the
time we are production-ready. But it's quite useful for now.
2024-08-20 09:28:25 +02:00
Timothy Flynn cde7c91c54 LibWebView: De-duplicate some Inspector CSS rule blocks
After the refactor to use CSS variables for dark-mode colors in commit
ae25146b89, we had duplicated blocks for
some CSS rules. This patch just unites them into one block.
2024-08-20 09:28:25 +02:00
Tobias Christiansen c3e69f2fc6 Inspector: Add "Fonts" tab
This adds another tab to the bottom tabs providing information
regarding the fonts computed for the currently selected DOM node.
2024-08-09 18:58:04 +01:00
Tobias Christiansen ae25146b89 Inspector: Clean up theming CSS with variables
The media queries for the different themes were all over the place,
they got consolidated in one place specifying all the colors. :^)
2024-08-09 18:58:04 +01:00
Sam Atkins 9738070676 Base: Make it clear that the chonky quotation marks do in fact work now 2024-08-07 16:14:49 +02:00
Timothy Flynn 96bb8fe944 UI/Qt: Add a debug menu item to dump RequestServer connection info 2024-08-03 15:53:07 -04:00
Timothy Flynn 5c73a31b4f LibWebView: Use an overflow-x value of 'auto' for Inspector containers
The Inspector looks a bit nicer if we don't paint the horizontal scroll
bars unless we need to.
2024-08-02 12:21:22 -04:00
Timothy Flynn d2c775b0ca LibWebView: Improve scrolling of Inspector content containers
Currently, the feel of scrolling containers in the Inspector is a bit
awkward. We make the entire split-view container scrollable, then we
absolutely position the tab control buttons to force them to not scroll.
The result is that the scroll bar is painted over the tab controls, and
the tab content that we actually want to scroll has to scroll under the
tab controls. This never looked quite right.

It was basically:

    <div tab-container> <!-- Scrollable -->
        <div tab-controls /> <!-- Pinned to not be scrollable -->
        <div tab-content /> <!-- The part we actually want to scroll -->
    </div>

This patch moves the "scrollability" to just the tab content. We then
don't need to go out of our way to ensure only the content is actually
scrollable.

So we now have:

    <div tab-container> <!-- Not scrollable -->
        <div tab-controls /> <!-- Not pinned, uses normal layout -->
        <div tab-content /> <!-- Scrollable -->
    </div>
2024-08-02 12:21:22 -04:00
Sam Atkins 113b4da1df LibWebView: Sort vendor-prefixed properties last in the inspector
Previously, the legacy `-webkit-foo` properties would all be top of the
list, when they are generally not useful to inspect. Instead, put them
at the bottom, so that users can still see them if they want to, but
they're not in the way.
2024-08-02 08:51:52 -04:00
Timothy Flynn 4795b9206c LibWebView: Prevent displaying two scroll bars in the inspector console
We currently display scroll bars for the JS console and its parent tab
container. We want the console output to be separately scrollable from
the tab content, but since both containers are scrollable, we end up
with nested scroll bars. This also makes actually scrolling feel pretty
awkward.

Prevent this by making the tab container non-scrollable when the JS
console is shown.
2024-07-21 19:31:35 +02:00
circl e59048e90f LibWebView: Add keyboard navigation to the Inspector 2024-07-18 07:09:50 -06:00
circl a443f50807 Base: Move config files out of home/anon and into default-config 2024-07-17 09:57:46 -06:00
Jamie Mansfield 34cd0cfa2e Base: Support dark mode in error page 2024-07-09 11:21:07 +02:00
Jamie Mansfield 45fabea0c2 Base: Support dark mode in directory page 2024-07-09 11:21:07 +02:00
Jamie Mansfield 21c5373456 Base: Support dark mode in version page 2024-07-09 11:21:07 +02:00
Jamie Mansfield 27f3305b87 Base: Use % for keys in templates
The previous character used, @, conflicted with CSS. % is used by other
templating engines, and doesn't conflict with language features (e.g.
media queries).
2024-07-09 11:21:07 +02:00
Jamie Mansfield fe551d3eff Base: Update to new project logo
This removes the existing 16x16 and 32x32 app icons with 48x48 and
128x128 versions, as the new logo is not well suited to such small
resolutions.
2024-07-09 11:21:07 +02:00
Andreas Kling 34cd98a607 Base: Remove image format test suites
We don't need to lug around all these image files now that we'll be
using 3rd party libraries for image format support anyway.
2024-07-07 13:46:01 +02:00
circl b83e82c32c LibWeb: Pass network error message to generated error page 2024-07-05 15:08:13 -06:00
Timothy Flynn 94a0b941f7 Base: Replace the new tab page with a dark mode friendly blank page
about:blank in most other browsers has a white background regardless of
dark mode. So rather than messing with that, remove the contents of the
NTP for now, and set a dark background-color in dark mode.
2024-07-04 11:55:45 +02:00
circl 63fa32416d Base: Move test-webm.webm out of /home/anon 2024-06-24 09:45:41 -06:00
Andreas Kling b7f8d7aec5 LibGfx: Remove TGA image format support
This format is not supported by other browsers.
2024-06-17 21:57:35 +02:00
Andreas Kling 681a2ac14e LibGfx: Remove support for the various "portable" image formats
These formats are not supported by other browsers.
2024-06-17 21:57:35 +02:00
Andreas Kling 7141319a7c LibGfx: Remove DDS image format support
This format is not supported by other browsers.
2024-06-17 21:57:35 +02:00
Hexeption 7ac6fd2746 LibWeb: Added HTMLLinkElement.as Tests 2024-06-13 07:58:11 +02:00
Hexeption 2f4668edce LibWeb: Added HTMLLinkElement.as 2024-06-13 07:58:11 +02:00
Andrew Kaster 6f387577c5 CMake+Base: Remove LiberationMono and rules copying it to build
This was only used by the pdf and MacPDF applications.
2024-06-06 12:51:14 -06:00
Andreas Kling cd84d23afa Base+Tests+Ladybird: Remove bitmap fonts 2024-06-04 18:45:30 +02:00
Andrew Kaster dd1fbd3513 Meta: Remove SerenityOS components not needed for Ladybird 2024-06-03 10:53:53 +02:00
theonlyasdk 6da1d5eb57 Demos: Add sleep option to CatDog
Now you can put your CatDog to sleep while
you're at work :)
2024-05-14 15:45:33 -06:00
Xexxa bda914868b Base: Add more emoji
🫩 - U+1FAE9 FACE WITH BAGS UNDER EYES
🫟 - U+1FADF SPLATTER
🪉 - U+1FA89 HARP
🫆 - U+1FAC6 FINGERPRINT
🫜 - U+1FADC ROOT VEGETABLE
🪾 - U+1FABE LEAFLESS TREE
🪏 - U+1FA8F SHOVEL
🇨🇶 - U+1F1E8_U+1F1F6 CQ SARK
2024-05-14 16:16:20 -04:00
Xexxa a9269afa05 Base: Add more emoji
🤽 - U+1F93D PERSON PLAYING WATER POLO
🤽‍♂️ - U+1F93D U+200D U+2642 MAN PLAYING WATER POLO
🤽‍♀️ - U+1F93D U+200D U+2640 WOMAN PLAYING WATER POLO
🦨 - U+1F9A8 SKUNK
2024-05-11 17:09:14 -06:00
theonlyasdk efc88c73fa Ladybird: Add Wikipedia search button in newtab.html 2024-05-07 11:46:03 -04:00
Andrew Kaster 77e890b15e Meta+Documentation+Ports: Move from C++20 to C++23
Now that oss-fuzz is on a clang commit > the 17.x release candidates,
we can start looking at some shiny new features to enable.
2024-05-06 11:46:28 -06:00
Timothy Flynn 4b51a36044 Browser: Add support for a singleton chrome process
This partially supports the WebView::ChromeProcess mechanics. New
windows aren't totally supported and will just open a new tab for now.

When launched via the Browser's AppFile (either through quick launch or
the desktop shortcut), a new window will be requested.
2024-04-30 17:43:14 -06:00
circl 3c58126771 Base: Adjust transparent border of the question icon
While this makes little visual difference, it is now pixel-perfectly
equal to the information icon.
2024-04-23 15:45:09 +02:00
circl c872fdd46d Base: Remove white pixels from warning icon
This is cleaner, and was likely the intended appearance.
2024-04-23 15:45:09 +02:00
circl 5639ff5f97 Screenshot: Add graphical frontend to shot
Co-authored-by: cubiclove <7754483+cubiclove@users.noreply.github.com>
2024-04-17 11:25:40 -06:00
Tim Ledbetter 8892c25520 Base: Return the correct value for fib(0) in Wasm example
Previously, using `wasm-decompile` to decompile the Wasm bytecode on
the `wasm.html` example page gave this output:

```
export function fib(a:int):int {
  if (a < 2) { return 1 }
  return fib(a - 2) + fib(a - 1);
}
```

With this change the bytecode now decompiles to:

```
export function fib(a:int):int {
  if (a <= 0) { return 0 }
  if (a == 1) { return 1 }
  return fib(a - 2) + fib(a - 1);
}
```

This means that the example page now prints the correct answer of 55 to
the console for `fib(10)`. Previously, `fib(10)` returned 89.

I also used `wasm-opt -Oz`, which removed an unnecessary `return`
instruction, saving 1 byte!
2024-04-11 01:17:20 +02:00
Bastiaan van der Plaat 1475c1810f LibWeb: Add support for select options disabled state 2024-04-08 17:24:48 -04:00
Bastiaan van der Plaat 4408581ee0 LibWeb: Refactor SelectItem to allow selecting options without value
Currently the `<select>` dropdown IPC uses the option value attr to
find which option is selected. This won't work when options don't
have values or when multiple options have the same value. Also the
`SelectItem` contained so weird recursive structures that are
impossible to create with HTML. So I refactored `SelectItem` as a
variant, and gave the options a unique id. The id is send back to
`HTMLSelectElement` so it can find out exactly which option element
is selected.
2024-04-08 17:24:48 -04:00
Torben Virtmann 6207405f3d Base: Add and Rework Emoji
- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB

Base: Add and Rework Emoji

- 🛳 - U+1F6F3 PASSENGER SHIP

- 🕷️ - U+1F577 SPIDER
- 🕸️ - U+1F578 SPIDER WEB
2024-04-06 13:40:45 -04:00
Nico Weber 1ab28276f6 LibGfx: Add the start of a JPEG2000 loader
JPEG2000 is the last image format used in PDF filters that we
don't have a loader for. Let's change that.

This adds all the scaffolding, but no actual implementation yet.
2024-03-25 20:35:00 +01:00
Torben Virtmann 50ae3ca659 Base: Add Emoji 2024-03-21 21:28:12 +00:00
Xexxa 541161d5e0 Base: Add more emoji
🏴󠁢󠁱󠁢󠁯󠁿 - U+1F3F4 U+E0062 U+E0071 U+E0062 U+E006F U+E007F
BQ-BO Bonaire
🏴󠁢󠁱󠁳󠁡󠁿 - U+1F3F4 U+E0062 U+E0071 U+E0073 U+E0061 U+E007F
BQ-SA Saba
🏴󠁢󠁱󠁳󠁥󠁿 - U+1F3F4 U+E0062 U+E0071 U+E0073 U+E0065 U+E007F
BQ-SE Sint Eustatius
🏴󠁫󠁲󠀱󠀱󠁿 - U+1F3F4 U+E006B U+E0072 U+E0031 U+E0031 U+E007F
KR-11 Seoul
🏴󠁫󠁲󠀲󠀹󠁿 - U+1F3F4 U+E006B U+E0072 U+E0032 U+E0039 U+E007F
KR-29 Gwangju City
🏴󠁫󠁲󠀳󠀰󠁿 - U+1F3F4 U+E006B U+E0072 U+E0033 U+E0030 U+E007F
KR-30 Daejeon
🏴󠁫󠁲󠀴󠀱󠁿 - U+1F3F4 U+E006B U+E0072 U+E0034 U+E0031 U+E007F
KR-41 Gyeonggi
🏴󠁫󠁲󠀴󠀴󠁿 - U+1F3F4 U+E006B U+E0072 U+E0034 U+E0034 U+E007F
KR-44 South Chungcheong
🏴󠁫󠁲󠀴󠀶󠁿 - U+1F3F4 U+E006B U+E0072 U+E0034 U+E0036 U+E007F
KR-46 South Jeolla
🏴󠁫󠁲󠀴󠀸󠁿 - U+1F3F4 U+E006B U+E0072 U+E0034 U+E0038 U+E007F
KR-48 South Gyeongsang
🏴󠁫󠁲󠀴󠀹󠁿 - U+1F3F4 U+E006B U+E0072 U+E0034 U+E0039 U+E007F
KR-49 Jeju
🏴󠁮󠁬󠁢󠁱󠀱󠁿 - U+1F3F4 U+E006E U+E006C U+E0062 U+E0071 U+E0031 U+E007F
NL-BQ1 Bonaire
🏴󠁮󠁬󠁢󠁱󠀲󠁿 - U+1F3F4 U+E006E U+E006C U+E0062 U+E0071 U+E0032 U+E007F
NL-BQ2 Saba
🏴󠁮󠁬󠁢󠁱󠀳󠁿 - U+1F3F4 U+E006E U+E006C U+E0062 U+E0071 U+E0033 U+E007F
NL-BQ3 Sint Eustatius
🏴󠁮󠁬󠁤󠁲󠁿 - U+1F3F4 U+E006E U+E006C U+E0064 U+E0072 U+E007F
NL-DR Drenthe
🏴󠁮󠁬󠁦󠁬󠁿 - U+1F3F4 U+E006E U+E006C U+E0066 U+E006C U+E007F
NL-FL Flevoland
🏴󠁮󠁬󠁦󠁲󠁿 - U+1F3F4 U+E006E U+E006C U+E0066 U+E0072 U+E007F
NL-FR Friesland
🏴󠁮󠁬󠁧󠁥󠁿 - U+1F3F4 U+E006E U+E006C U+E0067 U+E0065 U+E007F
NL-GE Gelderland
🏴󠁮󠁬󠁧󠁲󠁿 - U+1F3F4 U+E006E U+E006C U+E0067 U+E0072 U+E007F
NL-GR Groningen
🏴󠁮󠁬󠁬󠁩󠁿 - U+1F3F4 U+E006E U+E006C U+E006C U+E0069 U+E007F
NL-LI Limburg
🏴󠁮󠁬󠁮󠁢󠁿 - U+1F3F4 U+E006E U+E006C U+E006E U+E0062 U+E007F
NL-NB North Brabant
🏴󠁮󠁬󠁮󠁨󠁿 - U+1F3F4 U+E006E U+E006C U+E006E U+E0068 U+E007F
NL-NH North Holland
🏴󠁮󠁬󠁯󠁶󠁿 - U+1F3F4 U+E006E U+E006C U+E006F U+E0076 U+E007F
NL-OV Overijssel
🏴󠁮󠁬󠁵󠁴󠁿 - U+1F3F4 U+E006E U+E006C U+E0075 U+E0074 U+E007F
NL-UT Utrecht
🏴󠁮󠁬󠁺󠁥󠁿 - U+1F3F4 U+E006E U+E006C U+E007A U+E0065 U+E007F
NL-ZE Zeeland
🏴󠁮󠁬󠁺󠁨󠁿 - U+1F3F4 U+E006E U+E006C U+E007A U+E0068 U+E007F
NL-ZH South Holland
🏴󠁵󠁳󠁡󠁬󠁿 - U+1F3F4 U+E0075 U+E0073 U+E0061 U+E006C U+E007F
US-AL Alabama
🏴󠁵󠁳󠁡󠁺󠁿 - U+1F3F4 U+E0075 U+E0073 U+E0061 U+E007A U+E007F
US-AZ Arizona
🏴󠁵󠁳󠁴󠁸󠁿 - U+1F3F4 U+E0075 U+E0073 U+E0074 U+E0078 U+E007F
US-TX Texas
👨‍🔬 - U+1F468 U+200D U+1F52C MAN SCIENTIST
🧤 - U+1F9E4 GLOVES
🧥 - U+1F9E5 COAT
2024-03-19 06:51:04 -04:00
Cubic Love 3bec616893 Base+ImageViewer: Add new icons for ImageViewer
Add ImageViewer application icons (16 and 32px) and matching image
filetype icons.
2024-03-12 08:08:19 +00:00
Nico Weber 58838db445 LibGfx: Add the start of a JBIG2 loader
JBIG2 is infamous for two things:

1. It's used in xerox scanners were it falsifies scanned numbers:

https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning

2. It was allegedly used in an iOS zero day, in a very cool way:

https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html

Needless to say, we need support for it in Serenity. (...because it's
used in PDF files.)

This adds all the scaffolding, but no actual implementation yet.

It's enough for `file` to print the mime type of .jb2 files, but `image`
can't do anything with the files yet.
2024-03-09 16:01:22 +01:00
Pixel Brush 2c327a67bc Base: Remake Default Snake Sprites 2024-03-07 11:34:37 -05:00