Commit graph

10652 commits

Author SHA1 Message Date
Andreas Kling
8a1dbe5483 Kernel: Silence some debug spam in Scheduler 2020-06-22 21:18:16 +02:00
Andreas Kling
9ce25bbf1d LibWeb: Generate CanvasRenderingContext2D bindings from IDL :^)
We're still missing optional argument support, so this implementation
doesn't support fill(), only fill(fill_rule).

Still it's really nice to get rid of so much hand-written wrapper code.
2020-06-22 19:07:25 +02:00
Hüseyin ASLITÜRK
f361d25ec8 Base: Test web page and images for PPM image file type 2020-06-22 18:11:22 +02:00
Hüseyin ASLITÜRK
326032b138 LibGfx: Add PPM image file type support 2020-06-22 18:11:22 +02:00
Hüseyin ASLITÜRK
97aca8f251 LibWeb: Add "image/x‑portable‑pixmap" mime type for pbm file extension 2020-06-22 18:11:22 +02:00
Hüseyin ASLITÜRK
7f30d933b5 Base: Add PPM file type to QuickShow file type list 2020-06-22 18:11:22 +02:00
Nico Weber
7f73f0300c Ports: Add ninja
- 1.8.2 for now, newer versions need high-res timestamp file APIs
  which serenity doesn't have yet
- pselect() instead of ppoll() for now, same reason (depends on #2609)
- no good default for -j yet (see nproc.patch)
- `-l` probably doesn't work yet (see loadavg.patch), but I've never
  used that anyways
- some minor include patches that I've also sent upstream

Other than that, this seems to work reasonably well. It currently
produces some spam on stdout from probably the shell.
2020-06-22 16:10:06 +02:00
Nico Weber
d23e655c83 LibC: Implement pselect
pselect() is similar() to select(), but it takes its timeout
as timespec instead of as timeval, and it takes an additional
sigmask parameter.

Change the sys$select parameters to match pselect() and implement
select() in terms of pselect().
2020-06-22 16:00:20 +02:00
Nico Weber
29f509a2a0 LibC: Add timespec functions to sys/time.h
And rewrite the timeval functions as inline functions.

Also add the non-standard but fairly common and useful
TIMEVAL_TO_TIMESPEC / TIMESPEC_TO_TIMEVAL functions.
2020-06-22 16:00:20 +02:00
Nico Weber
9256757b59 AK: Add timespec_add and timespec_sub 2020-06-22 16:00:20 +02:00
stelar7
9e18005c64 LibJS: expose some more math functions 2020-06-22 10:33:50 +02:00
stelar7
b97da17b90 LibM: Add some more math functions 2020-06-22 10:33:50 +02:00
Andreas Kling
07d976716f LibWeb: Remove most uses of the old HTML parser
The only remaining client of the old parser is the fragment parser used
by the Element.innerHTML setter. We'll need to implement a bit more
stuff in the new parser before we can switch that over.
2020-06-21 22:29:05 +02:00
Andreas Kling
c9d55e3b80 Userland: Use Web::PageView::load_html() in the "html" utility 2020-06-21 22:04:26 +02:00
Andreas Kling
2ba9e9b9c9 HackStudio: Use Web::PageView::load_html() for the documentation popup
Also simplify the way we change the background color a little bit.
2020-06-21 21:54:30 +02:00
Andreas Kling
1f97897b40 TextEditor: Use Web::PageView::load_html() for the markdown preview 2020-06-21 21:54:30 +02:00
Andreas Kling
1c54272b41 Help: Use Web::PageView::load_html()
Instead of invoking the HTML parser directly.
2020-06-21 21:54:30 +02:00
Andreas Kling
6e27efe6c6 LibWeb: Add PageView::load_html() for loading HTML directly
When you're using Web::PageView as a GUI widget, you'll often just have
a chunk of HTML you want to show. So let's have an API for that.
2020-06-21 21:54:30 +02:00
Andreas Kling
59537cf257 WebContent: Turn it into a MultiInstance service :^)
Port the WebContent service to the new MultiInstance mechanism that
Sergey added. This means that every new WebContentView gets its very
own segregated WebContent process.
2020-06-21 21:54:30 +02:00
Andreas Kling
ed351c7493 LibIPC: Add setters for overriding the client/server PID if needed
Since SO_PEERCRED can only tell us who originally accepted the socket
on the other side, we'll sometimes need to negotiate PID info manually.
2020-06-21 21:54:30 +02:00
Andreas Kling
6bc40b20b8 LibCore: Add API for taking over an accepted socket from SystemServer
Core::LocalSocket::take_over_accepted_socket_from_system_server() now
allows you to construct a Core::LocalSocket for a pre-accepted socket
when using SystemServer's new AcceptSocketConnections mode.
2020-06-21 21:54:30 +02:00
Andreas Kling
457a687050 Userland: Remove "ht" test utility
The new HTML parser is well integrated into Browser now and we don't
need a separate tool for testing it. :^)
2020-06-21 21:54:30 +02:00
Linus Groh
4684e9a80f Build: Support GENERATED_SOURCES in serenity_{bin,libc}() as well 2020-06-21 20:24:28 +02:00
Andreas Kling
dd7cd92de4 LibWeb: Fix two typo bugs in table parsing
These were flushed out by the earlier fix to "table scope". Without the
bad implementation of table scopes, ACID2 stopped parsing correctly.
2020-06-21 17:49:02 +02:00
Andreas Kling
15b5dfc794 LibWeb: A </table> inside <tbody> is not a parse error
This condition was backwards. Fixes parsing of google.com.
2020-06-21 17:42:00 +02:00
Andreas Kling
1c2b6b074e LibWeb: Fix misunderstood implementation of "table" and "select" scopes
These "stack of open elements" scopes are not supposed to include the
base list of element types.
2020-06-21 17:42:00 +02:00
Andreas Kling
966bc05fef LibWeb: Implement more of the foster parenting algorithm in the parser 2020-06-21 17:42:00 +02:00
Andreas Kling
213e2793bd LibWeb: Add Node.insertBefore(Node node, Node? child) 2020-06-21 17:42:00 +02:00
Paul Roukema
82a75bcf5f LibGfx: Prefer the largest image in the file when loading an ICO
Since the current image handling APIs don't provide a way to handle a
file which can contain multiple images, we just pick the largest one.
This gives the best chance of a good looking result.
2020-06-21 17:41:52 +02:00
Paul Roukema
b1e3f728a1 LibGfx: Add support for uncompressed/classic ICO files
This add support to the ICO file decoder for loading uncompressed bitmap icon files.
 It is limited to 32-bit color icons, no 4/8/16 bit or paletted formats yet.
 This is in addition to the PNG compressed ICO format support  added previously.
 With this we can now load the favicons for github, google and twitter.
2020-06-21 17:41:52 +02:00
Paul Roukema
140581d0c3 LibGfx: Initial support for ICO image files.
This adds support for loading the first image from ICO format images only if they are PNG encoded.
This is useful for loading favicons, which are sometimes PNGs with an ICO extension and sometimes actual ICO files.
In particular we can now load the favicon from new.ycombinator.com
2020-06-21 17:41:52 +02:00
Matthew Olsson
ce574d62f6
Meta: Add CLion directories to .gitignore (#2607) 2020-06-21 16:46:50 +02:00
Hüseyin ASLITÜRK
5d0734d9ea Base: Test web page and images for PBM image file type 2020-06-21 16:42:46 +02:00
Hüseyin ASLITÜRK
9ab82c0ee5 LibGfx: Add PBM image file type support 2020-06-21 16:42:46 +02:00
Hüseyin ASLITÜRK
41d5531624 LibWeb: Add "image/x‑portable‑bitmap" mime type for pbm file extension 2020-06-21 16:42:46 +02:00
Hüseyin ASLITÜRK
58c3356472 Base: Add pbm file type to QuickShow file type list 2020-06-21 16:42:46 +02:00
Hüseyin ASLITÜRK
671560a844 LibGUI: Bug fix on GUI::Image when image is nullptr
This bug cause to FilePicker crash when second image selected for preview. FilePicker sets bitmap to "nullptr" clear preview.
2020-06-21 16:42:46 +02:00
Andreas Kling
e1bd815a6a LibWeb: Generate Event and MouseEvent bindings from IDL :^)
We still have to hand-write a function to turn an Event& into a wrapper
but this is still a hue improvement. Eventually we'll find a way to
auto-generate that function as well.
2020-06-21 16:12:28 +02:00
Andreas Kling
dd29ff884f LibWeb: Generate ImageData bindings from IDL :^) 2020-06-21 15:57:10 +02:00
Andreas Kling
b959d06ace LibWeb: Generate HTMLCanvasElement bindings from IDL :^) 2020-06-21 15:37:13 +02:00
Andreas Kling
119dd2c541 LibWeb: Generate HTMLImageElement bindings from IDL :^) 2020-06-21 15:26:09 +02:00
Andreas Kling
af51dc105a LibJS+LibWeb: Add JS::Object::inherits(class_name)
To allow implementing the DOM class hierarchy in JS bindings, this
patch adds an inherits() function that can be used to ask an Object
if it inherits from a specific C++ class (by name).

The necessary overrides are baked into each Object subclass by the
new JS_OBJECT macro, which works similarly to C_OBJECT in LibCore.

Thanks to @Dexesttp for suggesting this approach. :^)
2020-06-21 15:15:52 +02:00
Andreas Kling
1914f52371 LibWeb: Add HTMLElement wrapper
Expose the "title" attribute just to expose something. :^)
2020-06-21 14:39:15 +02:00
Andreas Kling
244b243d22 LibWeb: Add EventTarget.removeEventListener() 2020-06-21 12:37:34 +02:00
Andreas Kling
d724a12732 LibWeb: Generate EventTarget bindings from IDL :^) 2020-06-21 12:31:42 +02:00
Andreas Kling
a014b2930e LibWeb: Add Element.tagName and Element.className 2020-06-21 12:01:13 +02:00
Andreas Kling
a64033e581 LibWeb: Generate Element bindings from IDL :^)
Had to do a bunch more hacking on WrapperGenerator to support this.
We now support attribute setters as well.
2020-06-21 11:39:32 +02:00
stelar7
5eb39a5f61 LibWeb: Update parser with more insertion modes :^)
Implements handling of InHeadNoScript, InSelectInTable, InTemplate,
InFrameset, AfterFrameset, and AfterAfterFrameset.
2020-06-21 10:13:31 +02:00
Emanuele Torre
8e24a17d0d Meta: default SUDO_UID and SUDO_GID to 0 in build-image-*.sh scripts
In the GNU coreutils version of chown, ":" is a valid argument
(the command will result in a no-op), but POSIX chown does not
consider that valid.

If the user who ran build-image-*.sh was root, SUDO_UID and SUDO_GID
would not be set and, if the version of chown installed on the system
did not allow passing just a ":" as argument, the script would fail.

Let's default the value of SUDO_UID and SUDO_GID to 0 just in case.
2020-06-21 10:13:04 +02:00
Emanuele Torre
22aa4cbf92 Build: rename image target => qemu-image
Also add a new `image` target which is just an alias to `qemu-image`.

This makes the CMakeLists.txt file more readable in my opinion.
2020-06-21 10:13:04 +02:00