823 Commits

Author SHA1 Message Date
Adam Barth
e4ade99b70 Move WebInputEvent from public/web to public/platform
Moving WebInputEvent into public/platform lets us refer to it directly in core, which will let us remove the PlatformFooEvent classes.

The final pipeline will be:
1) mojo::InputEvent (IPC type, device pixels)
2) blink::WebInputEvent (platform abstraction, logical pixels)
3) blink::Event (DOM type, logical pixels)

If mojo::InputEvent used logical pixels, it would probably be easier to just
use mojo::InputEvent as the platform abstraction, but instead we use the
mojo-to-blink conversion to translate between device and logical pixels, like
we do everywhere else in Sky.

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

Review URL: https://codereview.chromium.org/860593003
2015-01-19 18:39:39 -08:00
Adam Barth
730d37dce1 Fix the build
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/846643005
2015-01-17 01:02:52 -08:00
Ojan Vafai
100094dbf3 Delete document marker related invalidation code.
I believe this doesn't change behavior, but it's hard
to know since we don't have spellchecking hooked up.
Also, delete setToolTip. This is for tooltips on spelling
markers. We don't support tooltips.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/830273006
2015-01-16 20:01:02 -08:00
Ojan Vafai
607fb5f42e Delete dead invalidate function.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/826873003
2015-01-16 19:55:57 -08:00
Elliott Sprehn
992eaea546 Remove attrs sky doesn't support.
This removes the attributes sky doesn't intend to support. It
removes references to the attrs, but leaves behind a lot of
plumbing that will be cleaned up in the future. This at least
removes the API surface.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/855803002
2015-01-16 19:42:52 -08:00
Elliott Sprehn
1b2ab0c6db Don't queue mutation records when attributes don't change value.
There's no reason to queue records when an attribute didn't really
change value.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/840223006
2015-01-16 19:21:28 -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
543049dd5c Remove viewportDefiningElement.
This was used for quirky scrollbar behavior on the web related to
which element defined in the viewport (body, html, etc.). In Sky we plan to
allow multiple elements as direct children of the Document so we need to get
rid of checks like this. The good news is this already does nothing in sky
because the root never has scrollbars automatically.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/858713002
2015-01-16 18:35:12 -08:00
Ojan Vafai
af37dc8fde Delete some noop and dead scrollbar code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/856443005
2015-01-16 18:15:11 -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
Elliott Sprehn
9bb2664b06 Get rid of ensureStyleResolver().
It doesn't have side effects anymore, and active documents always
have a StyleResolver.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/838003008
2015-01-16 17:49:32 -08:00
Ojan Vafai
d591ca1f14 Delete a bunch of noop paint invalidation code.
This deletes invalidateRect and all it's callers.
There are no logic changes, just deletes.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/842113005
2015-01-16 17:42:47 -08:00
Ojan Vafai
0f117ce13f Removed unused paintInvalidationRect member.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/854963002
2015-01-16 17:39:52 -08:00
Ojan Vafai
6ea92165d0 Merge diffNeedsFullLayout methods.
Now that we don't have paint invalidation, the distinction
is meaningless.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/851203003
2015-01-16 17:38:40 -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
Adam Barth
f1cbcfa80b Add PointerEvent interface to Sky
Currently this interface is constructable from script but isn't used internally
by the engine.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/846783003
2015-01-16 15:35:59 -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
Elliott Sprehn
5e18888a0b Be more strict about attributes in sky-binder.
Instead of making all the built in attributes be global we match them to the
elements they actually apply to. I also removed a bunch of attributes that no
longer work in Sky (but haven't been removed from HTMLAttributeNames.in) yet,
or which we plan to remove.

I also removed the title property from HTMLElement. The <sky-box> widget forgot
to declare its title attribute and no error was generated because of the title
property existing on all elements. Sky doesn't have this so lets remove the API
now and clean up the C++ later.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/807243003
2015-01-16 14:41:07 -08:00
Elliott Sprehn
9650c274b6 Fix <sky-input> data binding when editing deletes the last char.
contenteditable would remove the Text node inside the
editable area which would mean setting the value attr
of the <sky-input> would stop updating the editable
area.

Instead we add the text back if editing removed it.

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

Review URL: https://codereview.chromium.org/788953006
2015-01-16 14:39:03 -08:00
Eric Seidel
97ae8b44bd Add very basic support for symboled debugging on android
This only barely works.  We pull down system libraries
once before we attach.  The libraries we pull from
the device do not have debug symbols, but have enough
that we have decent callstacks.  We launch a background
process to repeatedly update a cache directory with
symlinks into our build directory corresponding to the cache
names used on the device, however gdb doesn't watch
the solib-search-path directories to notice the links
as we add them.

Better solutions would be to add support for pulling
down full android symboled system images and using those
instead of pulling libraries off the device as well as
figure out how to get android binaries to support
build-id so that we can present a directory of build-id
associated libraries to gdb on boot and have it to build-id
based lookups of libraries instead of our current broken
watch-logs-and-add-symlinks approach.

If you know what you're doing with this you can actually
make debugging work on the device.  It's not particularly
user friendly yet, but we'll work on it.

I added a build_dir member to skypy.paths.Paths
as a temporary measure before we move off of skypy's
paths and onto mopy's paths.  This helped eliminate
problems with using a relative path in args.build_dir
as is common.

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

Review URL: https://codereview.chromium.org/855663003
2015-01-16 13:39:20 -08:00
Eric Seidel
74a45026ac Make --gdb work for android
This mostly works.  I haven't yet set up pulling down the
system binaries from the device to the host so that symbols
appear correctly, but I'll do that in the next patch.

One of the crazy things this patch adds it a script
to watch for loads on adb logcat and set up mappings
from the cache library names to the symboled binaries
in the out directory.  Presumably other scripts may
want to share this functionality so I've made it its
own script.

Better would be to have mojo_shell spit out a file
including the cache mapping information and we could
watch that file instead of logcat, but this works
for now.

R=qsr@chromium.org
BUG=

Review URL: https://codereview.chromium.org/848013004
2015-01-16 11:28:31 -08:00
Adam Barth
0545f369f0 Populate details of Mojo gesture events
We compute these details in the gesture recognizer, but previously we weren't
including this information in the actual mojo::Event. This CL also decodes this
information into WebInputEvents for Sky.

R=erg@chromium.org

Review URL: https://codereview.chromium.org/788953007
2015-01-16 11:04:04 -08:00
Elliott Sprehn
1a689dc1a5 Reuse the DOM in the <fps-counter>.
Instead of storing primitive values which makes the data
binding system throw away DOM each time we update each slot
lets just use objects and shift + pop. This means very little
data binding churn.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/802153004
2015-01-15 22:02:35 -08:00
Elliott Sprehn
8291177a0c Combine element registries from sky-binder and sky-element.
We now have an element-registry.sky module that exposes API to register
elements with attributes and event handlers. Right now it's an API on
the module itself, eventually the module will export an ElementRegistry
object since we'll need one per module once the custom element registry
is one per module.

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

Review URL: https://codereview.chromium.org/856693002
2015-01-15 20:31:32 -08:00
Ojan Vafai
554ccd0de1 Deflake flights-app.sky.
We need to wait for the images to load.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/817853006
2015-01-15 17:40:48 -08:00
Elliott Sprehn
fb18e53311 Require a type for SkyElement attributes.
Instead of defaulting to string require a specific type.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/858453002
2015-01-15 17:34:26 -08:00
Elliott Sprehn
f607133c18 Turn on harmony arrays and regexp.
adamk@ says these are pretty stable.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/845403009
2015-01-15 17:12:17 -08:00
Ojan Vafai
4256d4a224 Remove background obscuration checks.
This is an optimization to avoid painting backgrounds
that are obscured. It's a lot of complexity that it's
not clear we'll need given that we're using a GL backend.
Also, we can add it back in more easily/efficiently in the future
once we have a display list architecture.

This also means we can remove the needsPaintInvalidation
dirty bit and some opacity information on filters.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/856563006
2015-01-15 17:11:44 -08:00
Adam Barth
381a6d49e3 Add pprof support to skydb
After this CL, we're able to capture pprof profiles, but we're not quite able
to symbolize them properly.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/854833004
2015-01-15 16:34:16 -08:00
Adam Barth
48af5b3c8f Make tracing work on Android
Previously, the trace coordinator would try to write a trace to the file
system, but it is awkward to write to the file system on Android. Instead, we
now stream the trace data to a data pipe. The Sky debugger consumes that data
pipe and sends it to the host via the command HTTP server.

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

Review URL: https://codereview.chromium.org/853943005
2015-01-15 16:32:16 -08:00
Adam Barth
c312fcbaa4 Trace RenderLayer::paint
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/851473005
2015-01-15 15:18:02 -08:00
Elliott Sprehn
5ef6774cd9 Add two way data binding.
All reflected attributes two way bind on SkyElement, so now doing
<sky-element name="sky-input" attributes="value:string"> is enough
to get two way binding on the value attribute so users doing
<sky-input value="{{ inputValue }}"> will get the inputValue property
updated as the user types.

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

Review URL: https://codereview.chromium.org/850383002
2015-01-15 15:03:44 -08:00
Elliott Sprehn
8f1c3bacfc Trim the deps of StyleResolver.h
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/794783003
2015-01-15 13:11:10 -08:00
Ojan Vafai
6d49e56b24 Simplify the paint invalidation bits.
The only thing they're used for now is to clear the
background obscuration state on RenderBox. They're
also used in RenderLayerModelObject::styleWillChange,
but that usage seems like a huge premature optimization.
Unfortunately, the RenderBox one walks up the ancestor
chain, so it's likely a necessary performance optimization.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/851033002
2015-01-15 13:02:00 -08:00
Adam Barth
8a07e541a2 Fix fips-counter in touch-demo.sky
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/813133010
2015-01-15 11:11:38 -08:00
Adam Barth
1ae192ac2e The Sky compositor should recycle textures
Previously, we were creating a new texture for every frame. Using tracing on a
Nexus 5, that appears to cost about 6ms per frame on the GPU thread. After this
CL, we keep a cache of recently used textures and only allocate a new one when
either (1) we don't have one free or (2) our size requirements have changed.

If our size requirements change, we dump the whole texture cache. In the
future, we'll probably need something fancier if we ever need more than one
size texture per frame.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/845963006
2015-01-15 11:09:56 -08:00
Adam Barth
81e3233e3e Add a trace event for running microtasks
Otherwise there are mysterious gaps in the trace.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/853883005
2015-01-15 10:28:11 -08:00
Ojan Vafai
eb68343228 Remove deferredfiltersenabled settings.
I have no idea what this setting does, but I just mechanically
removed it since it's always set to true.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/848243002
2015-01-14 18:58:27 -08:00
Ojan Vafai
3b4eb72066 Delete unused paint invalidation function.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/856453002
2015-01-14 18:48:43 -08:00
Eric Seidel
5bca16603d Make skydb stop actually clear the pid file
TBR=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/849053006
2015-01-14 16:29:09 -08:00
Ojan Vafai
21f4801613 Remove some unused paint invalidation members from RenderObject.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/854563005
2015-01-14 16:22:08 -08:00
Ojan Vafai
99f75b810d Inline paintInvalidationOrMarkForLayout.
The name doesn't really match what it does at all.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/854573003
2015-01-14 16:18:39 -08:00
Hixie
36c0a428a3 Specs: Text nodes can also be distributed, so getDestinationInsertionPoints() needs to be on Node, not Element.
Review URL: https://codereview.chromium.org/836433003
2015-01-14 16:16:42 -08:00
Adam Barth
46e84ffb40 Add a fps-counter widget to some Sky demos
This CL makes some Sky demos more interesting and adds an fps-widget to see how
fast they run.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/803283006
2015-01-14 15:50:59 -08:00
Colin Blundell
545269f16e Make more services' public interfaces flexible wrt location in repo.
This CL introduces a new pattern for making services' public interfaces
flexible wrt location in the repo. A mojom target can now add import_dirs.
Each service target adds an import dir of the parent directory of
"<service>/public" and specifies its imports relative to that directory.
This CL covers the interfaces for geometry, gpu, input_events, and
native_viewport.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/839903002
2015-01-15 00:25:51 +01:00
Ojan Vafai
d563e42443 Unprefix -webkit-filter and add a pixel test for it.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850103003
2015-01-14 15:14:46 -08:00
James Robinson
be2f656ab1 Pass ServiceProvider and ServiceProvider& params in Connect
In preperation for removing the Client annotation from ServiceProvider
this passes a second parameter of type ServiceProvider in the shell and
application Connect calls. In this patch the type signatures are updated
but the second parameter is basically unused. The intention is that the
first parameter |services| will be used for the connecting application to
request services from the connected application (as it does currently)
and the second parameter |exported_services| be used for the connecting
application to provide services to the connected application. We have
very few services exported in the second direction today - I'll update
them to use the second parameter in a follow-up patch.

R=darin@chromium.org

Review URL: https://codereview.chromium.org/845593003
2015-01-14 14:33:07 -08:00
Adam Barth
1dee21f363 Sky events should be in dips rather than ddpxs
Mojo events are in physical pixels but Sky works in logical pixels. This CL
changes the code that converts from Mojo events to Sky events to scale by the
device_pixel ratio.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/854603004
2015-01-14 13:50:01 -08:00
Ojan Vafai
8e3f746bad Remove assorted dead paint invalidation code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850763008
2015-01-14 13:46:39 -08:00
Adam Barth
e89b1dda15 lowlevel/img.sky flaky crashes
We don't need to pump pending speculations if we don't have any.

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

Review URL: https://codereview.chromium.org/852043003
2015-01-14 13:32:21 -08:00