979 Commits

Author SHA1 Message Date
Hixie
08043dbe6d Specs: Define when pointer events fire; stub for keyboard events
Review URL: https://codereview.chromium.org/892633004
2015-01-30 10:03:26 -08:00
Adam Barth
e962904c7a Remove TRACE_EVENT indirection through blink::Platform
Normal trace events already go directly to base. This CL removes the remaining
trace events that were still indirected through blink::Platform. These were
just the half-finished inspector timeline trace events, which currently aren't
actually hooked up to anything.

This CL also removes the redunant "convertable to trace format" wrappers and
moves their one remaining use over to just using the version in base directly.

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

Review URL: https://codereview.chromium.org/889823002
2015-01-30 08:47:46 -08:00
Adam Barth
65a50f6c81 Remove unused trace sampling states
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/893503002
2015-01-29 22:08:19 -08:00
Adam Barth
fa57fe2819 WTF should get time from base directly
There's no reason to bounce through several indirections to get the current
time.  We can just call into base directly now.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/887883002
2015-01-29 22:08:02 -08:00
Adam Barth
05137682c6 Don't spam the log for gesture events
We don't convert all the gesture events to WebInputEvents. We don't need to
spam the log about it.

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

Review URL: https://codereview.chromium.org/877733004
2015-01-29 22:07:39 -08:00
Adam Barth
60ede21534 Add fling support to sky-drawer
For some reason, the fling looks correct when we don't divide by the device
pixel ratio when converting from mojo::Event to blink::WebInputEvent. Maybe the
gesture detector is confused somehow about physical / logical pixels?

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

Review URL: https://codereview.chromium.org/885213002
2015-01-29 22:07:13 -08:00
Ojan Vafai
194360db4f Inline two methods with only one caller.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/886923003
2015-01-29 21:02:16 -08:00
Ojan Vafai
030073714c Removed a bunch of unneeded paint phase checks.
We only have two paint phases now, so we don't
need to do as many checks. Also, remove some
early returns that are not possible to hit since
the earlier code checks that phase already.

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

Review URL: https://codereview.chromium.org/891573002
2015-01-29 18:57:06 -08:00
Ojan Vafai
1332495e6d Remove PaintPhaseSelection.
This is just a mechanical removal. No logic changes
beyond removing the PaintPhaseSelection checks.
Most of these are just early returns to avoid doing
unnecessary work if we're only painting selections.
But now that we paint selections during the foreground
paint phase, we no longer need the early returns since
we're going to paint everything anyways.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/886933002
2015-01-29 17:18:25 -08:00
Adam Barth
910cd08c89 Recognize gestures from mice
After this CL, we first convert from mojo::Event to blink::WebInputEvent before
feeding the event to the gesture recognizer. That means we process touch and
mouse events in the same way (because they are both represented as pointer
events). As a result, we now recognize scroll and fling gestures from mice.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/888773002
2015-01-29 15:41:04 -08:00
Adam Barth
77e5182631 Move gesture recognition from WindowManagerApp to Sky
In order to have a high-quality gesture system, we need to know many details
about the fine-grained structure of applications. For example, different parts
of the view might be interested in recognizing different gestures and when you
recognize a certain gesture depends on the set of possible gestures.

This CL is a first step towards implementing
https://github.com/domokit/mojo/blob/master/sky/specs/gestures.md by moving the
gesture recognition into Sky where finer-grained information will be available.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/868463010
2015-01-29 14:52:15 -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
Eric Seidel
be00ee1268 Replace usage of md5 with sha256 for generation of mojo app ids.
Before we start adding more uses of mojo app ids we should use
to a non-broken hash function. :)

What was holding me back before was I wasn't aware of us having an
incremental hash api other than base/md5.h (others in base only operate
on the full input data), however it turns out that the crypto/ library
has one in crypto/secure_hash.h.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/868253006
2015-01-29 12:59:48 -08:00
Eric Seidel
30798815f5 Rename SkyDebugger to KioskWM and move to /services
Already other applications use sky's simple window
manager (mojo:sky_debugger) as a full-screen window
manager.  This moves this to /services and removes
all sky references from it.

As a part of this I've removed inspector support
from skydb.  It was already broken and will need
to be re-thought to not involve calls into
this new window manager.

I'm also flipping the relationship between prompt.cc
and debugger.cc for skydb.  Skydb will tell mojo_shell
to start sky_debugger_prompt instead of sky_debugger.

I'm also renaming sky_debugger_prompt to be
sky_debugger.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/883983004
2015-01-29 11:25:58 -08:00
Adam Barth
16c4b41391 This CL adds an "appish" example to the Sky examples, including a drawer widget.
R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/886723002
2015-01-29 11:21:39 -08:00
Ojan Vafai
f8411b4218 Simplify paint phase boolean logic.
Now that we only have three paint phases left,
we can simplify some of it to make it more
explicit that the special cases are all just for
PaintPhaseMask.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/886483006
2015-01-28 22:17:18 -08:00
Ojan Vafai
9ce3ec9139 Add a selection and outline to flights-app.
This is just to get basic paint coverage of selections
and outlines on positioned elements.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/886683002
2015-01-28 21:48:28 -08:00
Elliott Sprehn
fa70bea051 Remove CustomElementDescriptor.
In Sky we only need the localName of an element to describe
what it is. Remove this abstraction which is just a thin wrapper
around AtomicString.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/885713004
2015-01-28 20:46:24 -08:00
Ojan Vafai
bdc24bf049 Remove painting roots.
These appear to have been for ensuring that you
only paint elements in a given subtree. It's not clear
to me exactly how you get to painting an element that
is not rooted at the RenderLayer you started with.
I think it's just not possible in Sky anymore.
This code was added in 2004 for drag images, which
we no longer support.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/882223005
2015-01-28 19:53:44 -08:00
Scott Violet
e98fd07ffb Fixes crash in HTMLIFrameElement and exposes HTMLIFrameElement::src
HTMLIFrameElement was adding the observer in navigateView. If the same
HTMLIFrameElement navigated multiple times HTMLIFrameElement would
attach itself as an observer more than once. ObserverList doesn't like
this.

Also adds src as an attribute of HTMLIFrameElement so that I can do:
iframe.src = xxx
in script

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/885783002
2015-01-28 19:47:26 -08:00
Ojan Vafai
218c5f98dc Remove optional arguments.
These are never excluded. Make that explicit.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/882143004
2015-01-28 18:54:51 -08:00
Rafael Weinstein
1265ead597 Fix city-list example after changes to scrolling.
Note that this patch only includes support for the wheel event.
I'll follow-up with a patch for scrolling/fling when I have a setup
on which I can verify that working.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/875473004
2015-01-28 16:56:25 -08:00
Ojan Vafai
43a0d55697 Remove LayerPaintPhase.
Only LayerPaintPhaseAll was used.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/880263006
2015-01-28 16:33:35 -08:00
Adam Barth
8e8036ab84 Make skydb --gdb work a bit better on Android
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/878163005
2015-01-28 15:30:31 -08:00
Eric Seidel
09c29db6b0 Plumb ViewportMetrics change notifications around the world and back.
This fixes the race which is seen where mojo_shell will sometimes
launch with the wrong viewport metrics since the DisplayManager
will happily respond to GetViewportMetrics with default values
before the NativeViewport has fully booted and told it what the
actual values are.

I considered making DisplayManager hang until the NativeViewport
was ready, but I decided that it does make sense for the
ViewportMetrics (device pixel ratio, mostly) to change for a
view if it were to move between displays (as exists on desktop
OSes today).

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

Review URL: https://codereview.chromium.org/880743002
2015-01-28 13:43:31 -08:00
Hixie
722daacffb Specs: Rename ui.md to pointer.md so I can put the keyboard stuff in a different file
Review URL: https://codereview.chromium.org/886593003
2015-01-28 13:18:52 -08:00
Hixie
083499e089 Specs: Some notes on combining simultaneous animations of the same property
Review URL: https://codereview.chromium.org/888453002
2015-01-28 13:15:45 -08:00
Hans Muller
acdacb9214 Upgrade Sky's use of the JS bindings
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/875713003
2015-01-28 11:27:33 -08:00
Eric Seidel
7f9d02fc75 Add a very basic deploy script for mojo.
We could do something much more sophisticated for deploy in the future.

Also add #!mojo:sky_viewer to .sky file demos

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/885653006
2015-01-28 11:00:52 -08:00
Elliot Glaysher
ad852a56be Roll Chrome into Mojo.
Update from https://crrev.com/313321

This roll is to pick up a fix which prevents -Wl,--as-needed being used
in Release ASAN builds.

This also has some manual changes to mojo only code to fix interface
changes from chromium (mainly, changes in skia interfaces, and changes
in cc). It updates a cc patch, which started failing to apply I also
added patch files to deal with the upstream move of mojo to
third_party/mojo/.

BUG=452105
TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/885443002
2015-01-28 10:47:32 -08:00
Tony Gentilcore
6682573cb4 Set execute permissions on sky_server after download.
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/886543004
2015-01-28 10:26:06 -08:00
Ojan Vafai
b4c4004f56 Merge outline paint phases into the foreground phase.
Mostly just mechanical changes. The one surprising bit
is that RenderLayer no longer needs to explictly paint
outlines. I tested manually that before this patch,
the paintOutline call in RenderLayer was needed for
outlines on positioned elements and that after this
patch it's not.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/878023002
2015-01-27 17:45:04 -08:00
Adam Barth
63b6ffb281 Normalize import paths for Sky modules
This CL simplifies the sky_server to only map the build directory into /gen,
which will make the deploy script simpler. This CL updates all the imports to
use the /gen prefix when referring to generated files.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/881093003
2015-01-27 17:04:40 -08:00
Eric Seidel
bf64f39c29 Remove skydb dependency on build/android/pylib
I also fixed skydb to use --args-for sky_debugger to
automatically issue the load from 'start' even when
the --gdb option is present.

I tried to invoke gdb_attach directly from within start_command
but that seemed to cause some strangeness with my zsh shell
where it would automatically suspend gdb.  So I'll revisit
that change in the next patch.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/880143002
2015-01-27 15:56:23 -08:00
Adam Barth
3c04836a54 Remove "ForcedLayer" from Sky
No one uses this mechanism.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/877213003
2015-01-27 15:22:15 -08:00
Adam Barth
f4618c1bb2 Remove RenderLayer::m_lostGroupedMapping
No one touches this state.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/881123002
2015-01-27 15:21:24 -08:00
Adam Barth
54809a8877 Remove more scrolling code from Sky
None of this code does anything anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/878303002
2015-01-27 15:20:14 -08:00
Adam Barth
242402c943 Merge pull request #26 from domenic/patch-1
Don't create redundant promises
2015-01-27 14:40:59 -08:00
Adam Barth
645a6a9d12 Remove dead code related to compositing from Sky
R=esprehn@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/865153004
2015-01-27 14:38:56 -08:00
Adam Barth
d5e67f963c Split skydb trace into start_tracing and stop_tracing
Now stop_tracing writes the response to a file instead of spamming the trace data to stdout.

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

Review URL: https://codereview.chromium.org/878283002
2015-01-27 13:58:29 -08:00
Hixie
4690f10d33 Specs: Yet Another Gesture Model (mark IV). This one handles
double-tap gestures, gestures being negotiated between different
levels of the ancestor chain, and gestures starting half-way through a
drag (but still not while hovered). Also, hopefully slightly more
usable API.

Review URL: https://codereview.chromium.org/880963005
2015-01-27 13:39:45 -08:00
Domenic Denicola
1dd62846b2 Don't create redundant promises
Just use promise chaining
2015-01-27 15:43:56 -05:00
Adam Barth
c33c565f8b Remove ScrollableArea and Scrollbar
This code is unused.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/879993004
2015-01-27 12:08:24 -08:00
Ryan Macnak
f7abc9050d Import Dart bindings as of Blink r188698. This merely copies the files over and does not attach anything.
(The merge base is r180365, roughly three weeks behind where Sky forked from Blink at r181355.)

sky/engine/bindings-dart was third_party/WebKit/Source/bindings/

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/875013003
2015-01-27 11:13:58 -08:00
Adam Barth
a251a157a7 The scrollbar in sky-scrollable should fade in and out
Also, move the vbar after the scrollable div so that it draws on top.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/879003002
2015-01-27 11:11:49 -08:00
Adam Barth
8ec2a9f496 spinning-square.sky doesn't spin
The semantics of requestAnimationFrame and scheduleVisualUpdate are slightly
different. If you're inside a requestAnimationFrame, then calling
requestAnimationFrame should schedule you for next frame. However, if you're
inside a requestAnimationFrame and you scheduleVisualUpdate, that's a noop
because we've already got a visual update pending. When we merge the codepaths,
we broke requestAnimationFrame because it became a noop when called inside a
request animation frame.

We really ought to split up the two roles of requestAnimationFrame (run before
the frame boundary and run once per frame).

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

Review URL: https://codereview.chromium.org/880013003
2015-01-27 11:01:28 -08:00
Adam Barth
4f1ad264d9 Make it possible to navigate <iframes>
Also, add support for exposing services to <iframes>. This worked before but
now that [Client=...] is gone we need to create another message pipe.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/882723003
2015-01-27 10:35:52 -08:00
Adam Barth
7087239480 Rebaseline tests after removing RenderLayerScrollableArea 2015-01-27 10:25:45 -08:00
Adam Barth
4e74d9df30 Remove RenderLayerScrollableArea
This CL is a first step towards removing the scrolling machinery from the
engine. Notice that we pay a tax for scrolling in RenderBlockFlow::layout.

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

Review URL: https://codereview.chromium.org/877043002
2015-01-27 09:58: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