32 Commits

Author SHA1 Message Date
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
e3f9e2de4b Remove more mouse-specific code
This CL removes a bunch of unused mouse-related code, including the
MouseRelatedEvent base class.

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

Review URL: https://codereview.chromium.org/873963003
2015-01-24 11:18:35 -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
Elliott Sprehn
0275d42ac7 Add the <t> element and ignore whitespace outside it.
We now only preserve the whitespace inside a <t> element inside
the parser. This removes the known n^2 from reattaching whitespace
which should make parsing and appending nodes faster. I also
removed the dead WhitespaceMode code from the parser, and made
the dom-seralizer.sky auto indent the markup so the test output
would be readable.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/867963006
2015-01-23 16:50:00 -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
d7daaf4c7d Remove mouse events from Sky
We use pointer events now.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/870073003
2015-01-23 12:16:09 -08:00
Elliott Sprehn
0fcd743a64 Remove Element::textFromChildren().
Instead just use textContent() and teach HTMLStyleElement how to atomize
its children. I also added the optimization to Node::textContent so that
Text just returns its value instead of allocating a new buffer which
avoids malloc and copy when getting the textContent of text.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/864613002
2015-01-20 14:26:54 -08:00
Elliott Sprehn
4ddf1ce17a Fix the build.
TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/854803003
2015-01-16 18:48:17 -08:00
Elliott Sprehn
38c4d27f53 Remove custom element :unresolved.
Sky doesn't do upgrades and unknown elements become <error>
so this doesn't make sense.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/842033004
2015-01-16 17:50:18 -08:00
Adam Barth
b8df508de7 Add support for GestureEvents to Sky
We'll likely change the API over time, but this is a start.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/857533002
2015-01-16 15:42:01 -08:00
Elliott Sprehn
d28c27efe5 Simplify Node::textContent().
We can make it iterative, and use isTextNode() which is just a bitfield check.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/855733005
2015-01-16 15:35:03 -08:00
Ojan Vafai
9bb804cf93 Delete focused by mouse code.
This is effectively dead code since we never set the
focused by mouse bit.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/790673006
2015-01-12 17:46:49 -08:00
Elliott Sprehn
b8ae95165b Implement Node.ownerScope
The ownerScope property is equivalent to walking up the parentNode
pointers until you hit the top and returning that node if it's a
Document or ShadowRoot.

This means that the ownerScope of ShadowRoot and Document is always
itself, and the ownerScope of an Element that is not the descendant
of a ShadowRoot, and is not in the document is null.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/810793005
2014-12-17 16:05:15 -08:00
Elliott Sprehn
51b98aa289 Remove more Node API.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/772743004
2014-12-02 11:26:42 -08:00
Elliott Sprehn
dea3b116e6 Remove dead markup serialization code.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/771933002
2014-12-02 10:12:21 -08:00
Elliott Sprehn
253b5bed74 Only allow one shadowRoot.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/759663003
2014-11-26 13:54:14 -05:00
Eric Seidel
e0fd75b5ab Make absolute and sort all Sky headers
This caused us to lose our gn check certification. :(

Turns out gn check was just ignoring all the header
paths it didn't understand and so gn check passing
for sky wasn't meaning much.  I tried to straighten
out some of the mess in this CL, but its going to take
several more rounds of massaging before gn check
passes again.  On the bright side (almost) all of
our headers are absolute now.  Turns out my script
(attached to the bug) didn't notice ../ includes
but I'll fix that in the next patch.

R=abarth@chromium.org
BUG=435361

Review URL: https://codereview.chromium.org/746023002
2014-11-20 17:42:05 -08:00
Eric Seidel
55b5bc485d Sort headers
Fix (most) generated includes to have gen/ in their path.

This makes it easier to tell where files exist on disk.

Unfortunately I had to leave the old include path
in engine/BUILD.gn to support all the v8 includes
which were too many to deal with in this patch.

It's a little nasty to have the raw build directory
in our include path, but it produces nicer paths.

R=abarth@chromium.org
2014-11-19 12:33:42 -08:00
Adam Barth
b75be5c88b Fix contenteditable
You can now make elements editable using the contenteditable attribute.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/716223003
2014-11-12 14:37:41 -08:00
Elliott Sprehn
9c7987a6e1 Remove StyleInvalidator machinery.
We don't support descendant selectors, so switch everything back to
basic hash table lookups.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/712173002
2014-11-10 17:35:11 -08:00
Adam Barth
84faf899bc Remove nop ScriptWrappable::init calls
These calls don't do anything.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/706123005
2014-11-10 16:41:18 -08:00
Rafael Weinstein
c0ffe6fb23 remove updateTouchEventTargetRectsIfNeeded
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/713073003
2014-11-10 13:08:21 -08:00
Elliott Sprehn
e2a6aca882 Remove lots of Text APIs.
I also removed Node#normalize() which is Text related
and doesn't seem like something we need. Frameworks
can implement it if needed.

Remove most of the media stack.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/698213002
2014-11-03 22:34:23 -08:00
Scott Graham
ceac620f93 Fix more Windows compile errors
- Silence warnings in sky code (unnecessary return)
- Disable some warnings for bison-generated code
- Missing include for htons et al.
- Don't build xdisplaycheck on Windows.

R=jam@chromium.org

Review URL: https://codereview.chromium.org/697183003
2014-11-03 19:42:39 -08:00
Elliott Sprehn
c24fbd5cd2 Remove more API from Node and ContainerNode.
R=abarth@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/698123002
2014-11-03 14:55:19 -08:00
Elliott Sprehn
c0bf67d1f9 Remove interactive content and form related API from HTMLElement.
In particular this inlines the accessKeyAction, removes isInteractiveContent()
which was for special casing certain elements in event dispatch, and removes
eventParameterName() which was only needed for inline event handlers.

I also moved Node::commonAncestor into NodeRenderingTraversal, the only
callers of it passed NodeRenderingTraversal::parent as the second argument,
it didn't make sense to have this generic thing.

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

Review URL: https://codereview.chromium.org/693243002
2014-10-31 18:48:50 -07:00
Elliott Sprehn
5330701999 Remove Element#attributes.
We now implement getAttributes() such that it returns
a new set of Attr isntances on every call as well.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/697773002
2014-10-31 15:10:53 -07:00
Elliott Sprehn
c384b62ef1 Remove lots of dead virtuals from Element.
Mostly form related things we don't need now.

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

Review URL: https://codereview.chromium.org/694703002
2014-10-30 23:03:02 -04:00
Adam Barth
fc451b47eb Unfork Sky's trace events
This CL remove the body of Sky's TraceEvent.h in favor of the version in base.
There's still some more of the system to unwind before we can remove all the
other boilerplate.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/691663002
2014-10-30 09:39:46 -07:00
Eric Seidel
64b5cb61a1 Remove all oilpan transitional types
I used do-webcore-rename from Blink/WebKit
which is very good at doing this kind
of search-replace.

Also removed toRefPrtNativeArray after
conversion since it previously had two
separate flavors.  Both versions are no longer
used so I've removed the code until we
need one again.

https://www.irccloud.com/pastebin/5C16p5cE
is the diff I used to do-webcore-rename

TBR=abarth@chromium.org
2014-10-27 14:13:01 -07:00
Elliott Sprehn
725950ed7f Remove context menus.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/640143004
2014-10-23 17:10:06 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00