summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2020-06-21LibJS+LibWeb: Add JS::Object::inherits(class_name)Andreas Kling
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-21LibWeb: Add HTMLElement wrapperAndreas Kling
Expose the "title" attribute just to expose something. :^)
2020-06-21LibWeb: Add EventTarget.removeEventListener()Andreas Kling
2020-06-21LibWeb: Generate EventTarget bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Add Element.tagName and Element.classNameAndreas Kling
2020-06-21LibWeb: Generate Element bindings from IDL :^)Andreas Kling
Had to do a bunch more hacking on WrapperGenerator to support this. We now support attribute setters as well.
2020-06-21LibWeb: Update parser with more insertion modes :^)stelar7
Implements handling of InHeadNoScript, InSelectInTable, InTemplate, InFrameset, AfterFrameset, and AfterAfterFrameset.
2020-06-21Meta: default SUDO_UID and SUDO_GID to 0 in build-image-*.sh scriptsEmanuele Torre
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-21Build: rename `image` target => `qemu-image`Emanuele Torre
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-21Meta: get rid of sync.sh using the technique used in the previous commitEmanuele Torre
2020-06-21Meta: tweak build-image-grub.sh to allow running `make grub-image`..Emanuele Torre
without sudo.
2020-06-21LibGfx: Add BMP suite html filesMatthew Olsson
2020-06-21LibGfx: Add BMP loaderMatthew Olsson
Adds an *almost fully featured BMP loader to process .bmp files. Features: - All header formats are supported - Full RLE4/8/24 support - Color scaling (e.g. distributing a 5-bit color throughout the 8-bit color spectrum, so 5-bit white is still 0xffffff) - Full BITMASK/ALPHABITMASK support *Not included: - 1D Huffman compression. Good luck actually finding a bmp in the wild that uses this - Use of any field in the V4/V5 header. Color spaces? Endpoints? No thanks :) This loader was tested with the images at https://entropymine.com/jason/bmpsuite/bmpsuite/html/bmpsuite.html. This loader correctly displays 81 out of the 90 total images (for reference, firefox displays 64 correctly). Note that not rendering the images at the bottom is counted as displaying correctly.
2020-06-21LibWeb: Assume URLs ending in / serve html content :^)stelar7
2020-06-21LibWeb: Respect display:none on <input> elementsMaciej Sobaczewski
2020-06-21chown: Don't allow "invalid" uid/gid specs (#2596)Emanuele Torre
The usage message states that a uid/gid spec should be <uid[:gid]>. Let's not allow `anon:`, `anon:users:hello` and `:users` then.
2020-06-21LibWeb: Fix build after atob/btoa changesAndreas Kling
2020-06-21LibWeb: Expose Node.appendChild() to the webAndreas Kling
This is a very barebones implementation of appendChild() that doesn't take any of the idiosyncratic DOM behaviors into account yet. Also teach the wrapper generator how to turn an Interpreter argument into a Node&.
2020-06-21LibWeb: Expose Document.body to the webAndreas Kling
Also, make it return a HTMLElement since Document.body should actually return the frameset element in a frame-based document.
2020-06-21LibWeb: Expose Document.createElement() to the webAndreas Kling
2020-06-21LibWeb: Fix missing snake_case-ificiation of function parameter namesAndreas Kling
2020-06-21Meta: Tweak QtCreator .files sync script to include .idl filesAndreas Kling
2020-06-21LibWeb: Add Node.parentNode and Node.parentElement to DOM API :^)Andreas Kling
2020-06-21LibWeb+LibJS: Add a naive way to check if a wrapper "is" a certain typeAndreas Kling
Instead of only checking the class_name(), we now generate an is_foo() virtual in the wrapper generator. (It's currently something we override on Bindings::Wrapper, which is not really scalable.) Longer term we'll need to think up something smarter for verifying that one wrapper "is" another type of wrapper.
2020-06-21LibWeb: Start generating JS wrappers from (simplified) WebIDL :^)Andreas Kling
This patch introduces a hackish but functional IDL parser and uses it to generate the JS bindings for Node and Document. We'll see how far this simple parser takes us. The important thing right now is generating code, not being a perfect IDL parser. :^)
2020-06-21Kernel: Use map_typed() in HPET code and add a register access helperAndreas Kling
2020-06-20LibWeb: Add atob/btoa to WindowObjectJoel Puig Rubio
2020-06-20Kernel: Remove DMI decoder from the kernelAndreas Kling
As suggested by @supercomputer7, we can simply expose this as a blob and decode it in userspace instead. Fixes #2599.
2020-06-20LibWeb: Add some missing wrapper calls to base class initialize()Andreas Kling
This is easy to forget, but the problem will go away once we start to auto-generate this code.
2020-06-20LibJS: Make Interpreter::construct() take a GlobalObject&Andreas Kling
2020-06-20LibJS: Object::initialize() overrides must always call base classAndreas Kling
2020-06-20LibWeb: Give the DOM Window object a (weak) pointer to its JS wrapperAndreas Kling
2020-06-20LibWeb: JS wrappers need to call base class initialize()Andreas Kling
2020-06-20LibJS: NativeProperty get/put should take a GlobalObject&Andreas Kling
2020-06-20LibWeb: Split JS wrapper constructors into construct/initializeAndreas Kling
2020-06-20LibJS: Split more native object constructors into construct/initializeAndreas Kling
2020-06-20LibJS: Remove some Interpreter::global_object() calls in JSONObjectAndreas Kling
2020-06-20LibJS: Pass GlobalObject& to Reference get/putAndreas Kling
2020-06-20LibJS: Make Value::to_object() take a GlobalObject&Andreas Kling
2020-06-20LibJS: More Interpreter::global_object() removalAndreas Kling
Also let's settle on calling the operation of fetching the "this" value from the Interpreter and converting it to a specific Object pointer typed_this() since consistency is nice.
2020-06-20LibJS: Pass GlobalObject& when constructing an AccessorAndreas Kling
2020-06-20Base: Add some more characters to Katica and Csilla fontsLepkoQQ
2020-06-20Base: Fix slovenian keymapLepkoQQ
2020-06-20AK: Fix JsonParser double encoding multibyte utf-8 chararctersLepkoQQ
2020-06-20LibJS: Move native objects towards two-pass constructionAndreas Kling
To make sure that everything is set up correctly in objects before we start adding properties to them, we split cell allocation into 3 steps: 1. Allocate a cell of appropriate size from the Heap 2. Call the C++ constructor on the cell 3. Call initialize() on the constructed object The job of initialize() is to define all the initial properties. Doing it in a second pass guarantees that the Object has a valid Shape and can find its own GlobalObject.
2020-06-20LibJS: Pass GlobalObject& to native functions and property accessorsAndreas Kling
More work towards supporting multiple global objects. Native C++ code now get a GlobalObject& and don't have to ask the Interpreter for it. I've added macros for declaring and defining native callbacks since this was pretty tedious and this makes it easier next time we want to change any of these signatures.
2020-06-20LibJS: Remove some more use of Interpreter::global_object()Andreas Kling
Let's do some more work towards supporting multiple global objects.
2020-06-20LibC: In posix_spawn(), use _exit instead of exit on child errorNico Weber
posix_spawn() tries to present semantics as if no fork() is happening behind the scenes, so running arbitrary atexit handlers of the parent in the child seems like the wrong thing to do.
2020-06-20LibC: Add addchdir() / addfchdir() to posix_spawn file actionsNico Weber
This isn't in posix yet, but it is implemented on some platforms and it will be in a future version: https://www.austingroupbugs.net/view.php?id=1208
2020-06-20LibC: Add POSIX_SPAWN_SETSIGMASKNico Weber
This isn't in posix yet, but it is implemented on some platforms and it will be in a future version: https://www.austingroupbugs.net/view.php?id=1044 It seems useful, so add it.