911 Commits

Author SHA1 Message Date
Elliott Sprehn
ff2cde060f Remove more properties from the global Window.
StyleMedia seems to have been removed from the web too, and self is a
legacy-ism we don't want. I also removed the global find() which is a
document feature.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/872143004
2015-01-26 15:12:04 -08:00
Elliott Sprehn
865790aca0 Remove the EventFactory machinery.
This leaves behind some python bits with the event_factory name, but
that proved difficult to remove right now. This at least simplifies the
code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/879743004
2015-01-26 15:11:44 -08:00
Elliott Sprehn
8760fdb944 Remove the global event property.
Sky doesn't have inline event handlers so this is just slowing down
event dispatch. I also simplified the event dispatch code a little.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/873983005
2015-01-26 13:55:29 -08:00
Elliott Sprehn
ed2912af0b Remove PseudoId.
Sky doesn't have pseudo elements (::before, ::after, etc.)

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/883443003
2015-01-26 13:51:56 -08:00
Elliott Sprehn
2988fb5ad2 Remove ElementFlags system.
Tab index is the only thing using it now, we can do something more
explicit. I also simplified the tab index code a little bit.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/871203005
2015-01-26 13:29:52 -08:00
Adam Barth
7ded81cc4f Add a basic sky-scrollable element that scrolls
We still need to polish sky-scrollable, but it basically works.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/875953004
2015-01-26 13:29:38 -08:00
Eric Seidel
9f0f8f500c Make it possible to pass a default url to sky_debugger
sky_debugger will load the default url in every view that it's
asked to embed.  Think of the default_url as being like the
home-page in a conventional browser.

I also fixed prompt.cc to not terminate the entire mojo
environment when it can't start itself, but rather just
quit its own application.

With this patch I'm able to hack up mojo_shell to be able
to have a sensible default behavior when clicked from
the Android homescreen, but I'll land those hacks in a
separate change.

TBR=abarth@chromium.org
BUG=451620

Review URL: https://codereview.chromium.org/875183002
2015-01-26 13:19:06 -08:00
Elliott Sprehn
3d4800ed0c Move the CustomElementDefinition from ElementRareData to Element.
In Sky almost every element is a custom element, so this just bloats all
elements by having it in the rare data structure.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/880593003
2015-01-26 13:14:55 -08:00
Elliott Sprehn
c7c5328338 Remove InputMethodContext.
We'll probably want a really different API in sky, and this just makes
ElementRareData bigger for now and isn't hooked up to anything.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/880663002
2015-01-26 13:12:08 -08:00
Elliott Sprehn
86f47baf88 Remove even more @keyframes related code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/876433002
2015-01-26 11:38:20 -08:00
Elliott Sprehn
30c38af903 module.exports should default to an empty object.
Per the spec in modules.md the exports property should default to an
empty object. We lazy allocate it so that modules that just replace it
don't create the empty object and then throw it away.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/872043003
2015-01-26 11:38:04 -08:00
Elliott Sprehn
44686c5f02 Remove hasInlineTransform bit.
We used to use this as a hint for compositing layers, but we don't have
layers anymore so we can remove it.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/869393002
2015-01-26 11:37:51 -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
ee003d6a43 Move city-list data into a separate module
This way other scrolling demos can share the data.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/876763002
2015-01-26 09:41:25 -08:00
Adam Barth
0941e40854 Remove WebCompositorSupport
This interface was used to integrate with cc. Now that we no longer integrate
with cc, we don't need it.

In this CL, I've left WebLayer and its related classes even though there is no
longer a way to instantiate them. I'll remove them in a future CL.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/874633003
2015-01-26 09:21:59 -08:00
Adam Barth
c51ca09e15 Move sky-box,-button,-checkbox,-radio out of their directories
Instead of having a separate directory for every Sky element, we should just
put them in the general framework directory. Once the framework is more
complicated, we'll probably want to organize it a bit better, but for now there
aren't enough files to justify having so many directories.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/874303003
2015-01-26 09:20:25 -08:00
Adam Barth
f5815acf79 Add a build-time flag for enabling Dart in Sky
We're interested in experimenting with using the DartVM in Sky. This build-time
flag will let us add Dart bindings without disrupting other working going on in
Sky.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/875103002
2015-01-26 08:57:54 -08:00
Adam Barth
da75d15a1b Merge HTMLDocument into Document
HTMLDocument is the same as Document. We can merge them.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/871383002
2015-01-25 23:48:53 -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
Ojan Vafai
2d8bc531eb Remove GraphicsContext annotations.
It's all dead code. This is a first step
towards getting rid of paint phases.
Also delete some related dead classes.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/870393002
2015-01-25 19:52:29 -08:00
Adam Barth
6b4c686c8b Remove unused testing files in Sky
R=ojan@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/870223002
2015-01-24 11:18:49 -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
Adam Barth
aaa8e08ba2 Remove window.history
Instead, Sky content should use navigator.mojom.

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

Review URL: https://codereview.chromium.org/873973002
2015-01-24 00:59:40 -08:00
Adam Barth
00bd0f0988 Remove ProgressEvent and ResourceProgressEvent
These are unused.

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

Review URL: https://codereview.chromium.org/866623003
2015-01-24 00:59:04 -08:00
Adam Barth
95cbc86ade Sky shouldn't crash on device rotate
There were two problems (both fixed in this CL):

1) When we were resized by the view manager, we forgot to deflate by the
   device-pixel-ratio when converting to engine types. That caused use to
   allocate a backing texture that was 9x what we needed.

2) When the surfaces system returned textures to us for re-use, we'd put them
   into the cache even if they were the old size. That caused us to thrash the
   texture cache. In this CL, we make the size of the textures in the cache
   explicit.

R=eseidel@chromium.org
BUG=449001

Review URL: https://codereview.chromium.org/868263002
2015-01-23 21:20:14 -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
Eric Seidel
e3d08b1dab Teach mojo_cache_linker how to use a cache
Many of the .so files in out/Debug are hundreds
of megabytes in size.  md5sum can take seconds
to churn through them all, so I've added
a small caching layer which makes this script
take no time in the common case.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/865463004
2015-01-23 16:42:18 -08:00
Hixie
5f4d591690 Specs: Change event model to support default return values. Change
pointer event model to use registration of interested parties per
pointer rather than a capture model.

Review URL: https://codereview.chromium.org/873803003
2015-01-23 16:41:11 -08:00
Hixie
4c02ecd331 Fix help text in skydb
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/871083002
2015-01-23 16:25:30 -08:00
Eric Seidel
ea8c3f0212 Fix skydb --gdb to always have symbols
This replaces my previous --gdb work:
https://codereview.chromium.org/848013004/

And obsoletes my build-id based attempt:
https://codereview.chromium.org/788903011

Context:
mojo_shell downloads arbitrary binaries from
urls copying them to temp files before calling
dlopen.  Because the names it used were random
this broke gdb, pprof, etc. tools which wanted
to make address -> symbol translations based
on the library load path.

The major thing this change does is move away
from the previous method of watching the logs
of mojo_shell for 'Caching %url as %file...'
messages or the /tmp/mojo_shell.%pid.map
file to having mojo_shell use a priori knowable
names for all of its library loads.  Thus
we can similarly build a directory of correctly
named symboled binaries corresponding to the
expected load names of libraries.

This change does this in 3 pieces:

1.  Introduces the concept of 'app ids' (which
are currently just the md5 of the distributed app
binary) and teaches dynamic_application_loader to
rename all apps to APP_ID.mojo before loading them.
This has the nice side-effect of always loading
an app with a dlopen/library name which is both
unique to the application as well as predictable.

2.  Re-writes the mojo_cache_linker script to
no longer watch stdin/adb logcat for 'caching...'
messages and instead build a links directory
based on pre-determined app_ids (md5s) linking
back to the symboled binaries.

3.  Remove a bunch of the former mojo_cache_linker
calling code which is no longer needed now that
the library_names of loaded application .so's are
predictable before launching mojo_shell

I'm happy to make app_ids fancier, originally I
was going to use ELF's build-id's directly:
https://codereview.chromium.org/788903011
but unfortunately gdbserver does not know
how to do a build-id lookup on the serverside:
https://groups.google.com/a/google.com/forum/#!topic/gdb-discuss/Fd0R-gFaqXk

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

Review URL: https://codereview.chromium.org/866383004
2015-01-23 15:18:21 -08:00
Elliott Sprehn
1d994fbaf0 Remove lots of @keyframes related code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/872893002
2015-01-23 13:24:09 -08:00
Adam Barth
37f9f11ef7 Remove CompositingReasons.h
This file is not referenced.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/869023006
2015-01-23 12:49:50 -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
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
Hixie
a5ad025c79 Docs: Update formatting of skydb help
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/875513002
2015-01-23 09:35:11 -08:00
Benjamin Lerman
f8e27c4a18 Focus Views on touch events.
R=erg@chromium.org, abarth@chromium.org

Review URL: https://codereview.chromium.org/869543002
2015-01-23 10:34:55 +01:00
Elliott Sprehn
c9a152c464 Remove @keyframe parsing.
We still have the code internally, but the parser won't create
StyleRuleKeyframes anymore.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/871773003
2015-01-22 20:48:22 -08:00
Elliott Sprehn
ca9d4f1ab2 Consolidate callers to scheduleVisualUpdate.
Make everyone call through Document::scheduleVisualUpdate(). I also
removed some dead composited selection code that used this.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/865383003
2015-01-22 18:47:23 -08:00
Adam Barth
2c0b2f7ff9 Remove UseCounter
We'll eventually add this back but sometime in the future when we actually have
users.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/867903002
2015-01-22 18:26:55 -08:00
Adam Barth
265330e912 Remove some dead code in WebFrame
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/866813005
2015-01-22 18:26:26 -08:00
Adam Barth
3d511d7612 Remove TouchDisambiguation and WindowFocusAllowedIndicator
TouchDisambiguation is dead code. WindowFocusAllowedIndicator doesn't make any
sense because you're always allowed to focus.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/866283003
2015-01-22 18:25:27 -08:00
Elliott Sprehn
9612dcf25f Don't set expression attributes before they're bound.
We were cloning elements with all the attributes that contained
expressions like attrName="{{ foo }}" which meant we'd go through the
reflection process converting that value and also call the
attrNameChanged() callback and the attributeChanged() with the braced
string which the element didn't really want to know about.

After this patch we create a "clone source node" which is a copy of the
original element without the attributes that have the expressions and
use that when cloning, then we assign the properties using data binding
later.

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

Review URL: https://codereview.chromium.org/868973002
2015-01-22 17:04:10 -08:00
Hixie
85322f13b3 Specs: Gestures Mark III -- handle how to have a gesture claim that it
is the real gesture, even if another is still a candidate; enumerate a
bunch of gestures; allow for event coallescing; allow for events that
get sent before picking a gesture

Review URL: https://codereview.chromium.org/872523002
2015-01-22 16:52:39 -08:00
Adam Barth
473a700f02 Remove unused "Web" interfaces
These are all dead code.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/867093002
2015-01-22 16:08:26 -08:00
Adam Barth
63d7184715 Remove user gesture tracking
The developer has full control of Sky. We don't need to track whether something
was caused by a user gesture.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/868933003
2015-01-22 16:01:31 -08:00
Adam Barth
6354a8c53d Remove PageWidgetDelegate
There's only one page widget delegate: WebView.

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

Review URL: https://codereview.chromium.org/871643003
2015-01-22 15:31:29 -08:00
Adam Barth
68475c7f7c Remove more unused code in WebViewImpl
R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/866733007
2015-01-22 15:31:07 -08:00