Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
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. :^)
|
|
Expose the "title" attribute just to expose something. :^)
|
|
|
|
|
|
|
|
Had to do a bunch more hacking on WrapperGenerator to support this.
We now support attribute setters as well.
|
|
Implements handling of InHeadNoScript, InSelectInTable, InTemplate,
InFrameset, AfterFrameset, and AfterAfterFrameset.
|
|
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.
|
|
|
|
|
|
|
|
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&.
|
|
Also, make it return a HTMLElement since Document.body should actually
return the frameset element in a frame-based document.
|
|
|
|
|
|
|
|
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.
|
|
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. :^)
|
|
|
|
This is easy to forget, but the problem will go away once we start to
auto-generate this code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
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.
|
|
Let's do some more work towards supporting multiple global objects.
|
|
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.
|
|
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
|
|
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.
|
|
|
|
|
|
|
|
This is possible now that seteuid() / setegid() are implemented.
|
|
It looks like they're considered a bad idea, so let's not add
them before we need them. I figured it's good to have them in
git history if we ever do need them though, hence the add/remove
dance.
|
|
Add seteuid()/setegid() under _POSIX_SAVED_IDS semantics,
which also requires adding suid and sgid to Process, and
changing setuid()/setgid() to honor these semantics.
The exact semantics aren't specified by POSIX and differ
between different Unix implementations. This patch makes
serenity follow FreeBSD. The 2002 USENIX paper
"Setuid Demystified" explains the differences well.
In addition to seteuid() and setegid() this also adds
setreuid()/setregid() and setresuid()/setresgid(), and
the accessors getresuid()/getresgid().
Also reorder uid/euid functions so that they are the
same order everywhere (namely, the order that
geteuid()/getuid() already have).
|
|
|
|
Previously 4 bytes at once were read and compared to the string
"DATA". This worked when the DATA marker was aligned on a 32-bit
boundary relative to the start of the file. However, this is not
guranteed to always be the case, and for some files the loader
would just keep searching for the marker.
|
|
|