10 Commits

Author SHA1 Message Date
Adam Barth
dff66fb1b7 Remove the concept of document.documentElement
Now documents can have many element children, all created equal.

R=esprehn@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/928393003
2015-02-17 16:20:07 -08:00
Adam Barth
36e9c3e46e Implement PointerEvent#dx
In this CL, the event handler keeps track of the delta from the previous
pointer position so authors don't have to.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/887793002
2015-01-29 13:23:45 -08:00
Adam Barth
c3fc9e9663 Add wheel support to sky-scrollable
This CL plumbs wheel events through Sky again and uses them in sky-scrollable.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/876853005
2015-01-27 09:58:22 -08:00
Adam Barth
5e68175437 Fix ASSERT in Sky when dragging outside the window on linux
We don't seem to receive mojo::EVENT_TYPE_MOUSE_EXITED when the mouse exits our
mojo::View. We should find out if that's a bug with the Mojo event system, but
for now this CL adds a fake cancel event the next time the mouse goes down to
at least keep the state machine on the right track.

BUG=https://github.com/domokit/mojo/issues/40
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/879543004
2015-01-26 10:53:51 -08:00
Adam Barth
07140ff848 Remove PlatformEvent
There aren't any more subclasses or uses. Also, remove PlatformEventController
and PlatformEventDispatcher, which are also dead code.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/870413002
2015-01-25 23:48:07 -08:00
Adam Barth
3ddae5ea36 Switch KeyboardEvents over to NewEventHandler
This CL moves KeyboardEvents from the old event model to NewEventHandler. This
CL keeps the basic structure of keydown, keypress, keyup events even though
that's a bit wacky. As with pointer and gesture events, this CL removes
PlatformKeyboardEvent in favor of just using WebKeyboardEvent. I've also made
WebKeyboardEvent align more closely with Mojo's keyboard event.

The CL does change one important aspect of key event handling: on the web the
"keyCode" property of KeyboardEvent changes its meaning depending on whether
the event is a keydown or a keypress event. For the former events, keyCode is
the "virtual" (i.e., windows) key code where for the latter events, keyCode is
the character code. To be more precise, I've renamed keyCode to virtualKeyCode
and I've given it a zero (unknown key code) value during keypress events.

R=ojan@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/872233002
2015-01-25 22:46:50 -08:00
Adam Barth
f923562fa0 Move GestureEvent to NewEventDispatcher
The Sky engine doesn't respond to gesture events itself. Instead, the framework
will listen for gestures and respond to them. That means moving GestureEvents
over to the NewEventDispatcher is relatively straightforward.

R=eseidel@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/874823002
2015-01-24 11:18:12 -08:00
Adam Barth
87c4a4863d Remove touch events from Sky
We use pointer events instead.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/868133003
2015-01-23 12:41:56 -08:00
Adam Barth
b361c4b6c3 Switch Sky to pointer events
This CL switches Sky to a pointer events model that unifies mouse and touch
with a common event model. This implementation is just enough to make the
example widgets work. The rest of the design is in the specs, which we hope to
converge with over time.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/866213004
2015-01-23 09:38:45 -08:00
Adam Barth
62b72f23c9 Add basic PointerEvent support in NewEventHandler
blink::EventHandler is really hairy and deals with a lot of complex cases that
don't matter for Sky. This CL starts a NewEventHandler and adds support for
PointerEvents there. The NewEventHandler will eventually replace EventHandler
once we've actually migrated over from Mouse+Touch events to PointerEvents.

R=esprehn@chromium.org, ojan@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/823873004
2015-01-22 12:54:29 -08:00