Age | Commit message (Collapse) | Author |
|
This patch adds HTMLCanvasElement along with a LayoutCanvas object.
The DOM and layout parts are very similar to <img> elements.
The <canvas> element holds a Gfx::Bitmap which is sized according to
the "width" and "height" attributes on the element.
Calling .getContext("2d") on a <canvas> element gives you a context
object that draws into the underlying Gfx::Bitmap of the <canvas>.
The context weakly points to the <canvas> which allows it to outlive
the canvas element if needed.
This is really quite cool. :^)
|
|
|
|
|
|
This patch adds the EventTarget class and makes Node inherit from it.
You can register event listeners on an EventTarget, and when you call
dispatch_event() on it, the event listeners will get invoked.
An event listener is basically a wrapper around a JS::Function*.
This is pretty far from how DOM events should eventually work, but it's
a place to start and we'll build more on top of this. :^)
|
|
Services can now have their initial working directory
configured via `SystemServer.ini`.
This commit also configures Terminal's working directory
to be /home/anon
|
|
|
|
|
|
|
|
Weirdly enough, the "simple-scopes" test doesn't return undefined
anymore, at first I thought the scoping was somehow broken, turns out
the interpreter doesn't consider the returned y as the last evaluated
value anymore, possibly because it's undefined (?).
|
|
|
|
|
|
It is yet undecided how to name regional variants.
|
|
All Objects will now have ObjectPrototype as their prototype, unless
overridden.
|
|
This patch adds String.prototype.charAt() to demonstrate that prototype
property lookup works, and that you can call a prototype function on an
object, and it will do what you expect. :^)
|
|
This makes it easier to work with the german keyboard layout.
Some keys are left unset because their corresponding letters
aren't supported yet.
|
|
|
|
This was pleasantly simple! We don't have an ElementWrapper yet, so it
just returns a NodeWrapper, but it still basically works. :^)
|
|
This patch introduces the Wrapper and Wrappable classes.
Node now inherits from Wrappable, and can be wrapped in a GC-allocated
Bindings::NodeWrapper object. The only property we expose right now is
the very simple nodeName property.
When a Document's JS::Interpreter is first instantiated, we add a
"document" property with a DocumentWrapper object to the global object.
This is pretty cool! :^)
|
|
This patch begins integrating LibJS into LibWeb. Document holds the
JS::Interpreter for now, and it is created on demand when you first
call Document::interpreter().
We also add a simple "alert()" function to the global object.
|
|
|
|
Obey precedence and associativity rules when parsing expressions
with chained operators.
|
|
|
|
|
|
To make this work, also start passing Interpreter& to native functions.
|
|
This can be used to implement arbitrary functionality, callable from
JavaScript.
To make this work, I had to change the way CallExpression passes
arguments to the callee. Instead of a HashMap<String, Value>, we now
pass an ordered list of Argument { String name; Value value; }.
This patch includes a native "print(argument)" function. :^)
|
|
|
|
|
|
At last we can parse "hello friends".length :^)
|
|
Now that we have the beginnings of a parser, let's take the script to
run as a command-line argument and move all the test scripts into
/home/anon/js :^)
To run a script, simply use "js":
$ js my-script.js
To get an AST dump before execution, you can use "js -A"
|
|
Added a solitaire game. Currently there are graphics missing on some
of the cards, but the game is fully functional.
Press F12 to show the game-over animation manually.
|
|
Let's rename this to LibWeb since it aims to provide more parts of the
web platform than just HTML. :^)
|
|
LibCore's GZip is also moved into the Core namespace with this change.
|
|
|
|
Replaced GBP with a hash symbol, as unicode is not supported
|
|
|
|
|
|
This allows anon to shut down and reboot the system.
Fixes #775.
|
|
|
|
Simon Struthers drew a SerenityOS ladybug and since it's so cute,
I figured we could adopt it!
|
|
This feels a lot more consistent and Unixy:
create_shared_buffer() => shbuf_create()
share_buffer_with() => shbuf_allow_pid()
share_buffer_globally() => shbuf_allow_all()
get_shared_buffer() => shbuf_get()
release_shared_buffer() => shbuf_release()
seal_shared_buffer() => shbuf_seal()
get_shared_buffer_size() => shbuf_get_size()
Also, "shared_buffer_id" is shortened to "shbuf_id" all around.
|
|
I probably would've done INI config removal in another commit, but it
fit well here because I didn't want to pledge wpath for SystemMenu if I
didn't need to.
Frankly, that's something that I think should be done: allow ConfigFile
to be used read-only.
|
|
|
|
Only thing I don't like right now is the fact that we rely on the shell.
|
|
|
|
Fixes #1246.
|
|
|
|
|
|
|
|
|
|
|