Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/3e49db5b651a6c424ee0bbcc5012973566b635e3
...commit
http://git.netsurf-browser.org/netsurf.git/commit/3e49db5b651a6c424ee0bbcc5012973566b635e3
...tree
http://git.netsurf-browser.org/netsurf.git/tree/3e49db5b651a6c424ee0bbcc5012973566b635e3
The branch, dsilvers/eventtarget has been updated
via 3e49db5b651a6c424ee0bbcc5012973566b635e3 (commit)
from d7c7ec5d4ad55819d61f8576249865269e3c9672 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commit/?id=3e49db5b651a6c424ee0bbcc5012973566b635e3
commit 3e49db5b651a6c424ee0bbcc5012973566b635e3
Author: Daniel Silverstone <[email protected]>
Commit: Daniel Silverstone <[email protected]>
foldme; make sure we only call listeners if we're meant to
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index b0bcc8a..46ff584 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -947,13 +947,19 @@ handle_extras:
/* ... copy handler callback flags */
flags = (event_listener_flags)duk_get_int(ctx, -1);
duk_pop(ctx);
- /* TODO: So, should we run the event handler? */
+ /* ... copy handler callback */
+ if (((phase == DOM_CAPTURING_PHASE) && !(flags & ELF_CAPTURE))
||
+ ((phase != DOM_CAPTURING_PHASE) && (flags & ELF_CAPTURE))) {
+ duk_pop_2(ctx);
+ /* ... copy */
+ continue;
+ }
+ /* ... copy handler callback */
dukky_push_node(ctx, (dom_node *)targ);
/* ... copy handler callback node */
dukky_push_event(ctx, evt);
/* ... copy handler callback node event */
(void) nsu_getmonotonic_ms(&jsctx->exec_start_time);
- /* TODO: Maybe skip calling if not capture or at-target ? */
if (duk_pcall_method(ctx, 1) != 0) {
/* Failed to run the method */
/* ... copy handler err */
-----------------------------------------------------------------------
Summary of changes:
content/handlers/javascript/duktape/dukky.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/content/handlers/javascript/duktape/dukky.c
b/content/handlers/javascript/duktape/dukky.c
index b0bcc8a..46ff584 100644
--- a/content/handlers/javascript/duktape/dukky.c
+++ b/content/handlers/javascript/duktape/dukky.c
@@ -947,13 +947,19 @@ handle_extras:
/* ... copy handler callback flags */
flags = (event_listener_flags)duk_get_int(ctx, -1);
duk_pop(ctx);
- /* TODO: So, should we run the event handler? */
+ /* ... copy handler callback */
+ if (((phase == DOM_CAPTURING_PHASE) && !(flags & ELF_CAPTURE))
||
+ ((phase != DOM_CAPTURING_PHASE) && (flags & ELF_CAPTURE))) {
+ duk_pop_2(ctx);
+ /* ... copy */
+ continue;
+ }
+ /* ... copy handler callback */
dukky_push_node(ctx, (dom_node *)targ);
/* ... copy handler callback node */
dukky_push_event(ctx, evt);
/* ... copy handler callback node event */
(void) nsu_getmonotonic_ms(&jsctx->exec_start_time);
- /* TODO: Maybe skip calling if not capture or at-target ? */
if (duk_pcall_method(ctx, 1) != 0) {
/* Failed to run the method */
/* ... copy handler err */
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://listmaster.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org