summaryrefslogtreecommitdiff
path: root/Libraries
AgeCommit message (Collapse)Author
2020-06-21LibWeb: Generate ImageData bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Generate HTMLCanvasElement bindings from IDL :^)Andreas Kling
2020-06-21LibWeb: Generate HTMLImageElement bindings from IDL :^)Andreas Kling
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-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-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-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-20LibWeb: Add atob/btoa to WindowObjectJoel Puig Rubio
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-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.
2020-06-20LibC: Make sigprocmask error check more consistent with rest of this codeNico Weber
2020-06-19LibC: Implement file actions for posix_spawnNico Weber
2020-06-19LibC: Make spawn.h parse in C filesNico Weber
2020-06-19LibC: Add support for POSIX_SPAWN_RESETIDSNico Weber
This is possible now that seteuid() / setegid() are implemented.
2020-06-18Kernel+LibC: Remove setreuid() / setregid() againNico Weber
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.
2020-06-18Kernel+LibC: Implement seteuid() and friends!Nico Weber
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).
2020-06-18LibGUI: Add a new Window::is_maximized methodHüseyin ASLITÜRK
2020-06-18WavLoader: Search for DATA marker by reading single bytesTill Mayer
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.
2020-06-18LibGUI: Fix MessageBox width calculation not including the icon widthAndreas Kling