782 Commits

Author SHA1 Message Date
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
Ojan Vafai
22bc13f2cf Delete canInvalidatePaintDuringPerformLayout.
It doesn't do anything anymore.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850763007
2015-01-14 13:31:33 -08:00
Ojan Vafai
3e26389e5d Delete PaintInvalidationState. It's unused.
Delete selection paint invalidation code.

There is a slight change in behavior in FrameSelection::revealSelection.
If you have a non-collapsed selection, then we'll center the start
of the selection instead of the whole selection in some cases. There's
a ton of callers of this code, so it's hard to be sure if any of this
actually changes behavior for sky. In manual testing, I couldn't find
any scenarios where there was a difference. Almost universally,
when we call revealSelection, we have a CaretSelection. The only
case I could think of where we have a RangeSelection is when
modifying an off-screen selection (e.g. shift+right), but in that case
we pass the RevealExtent option, so this patch doesn't change behavior
there.

Removing that caller makes all the rest of this rect computing
code into dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/823123003
2015-01-14 13:25:49 -08:00
Ojan Vafai
5f718d3e63 Delete selection paint invalidation code.
There is a slight change in behavior in FrameSelection::revealSelection.
If you have a non-collapsed selection, then we'll center the start
of the selection instead of the whole selection in some cases. There's
a ton of callers of this code, so it's hard to be sure if any of this
actually changes behavior for sky. In manual testing, I couldn't find
any scenarios where there was a difference. Almost universally,
when we call revealSelection, we have a CaretSelection. The only
case I could think of where we have a RangeSelection is when
modifying an off-screen selection (e.g. shift+right), but in that case
we pass the RevealExtent option, so this patch doesn't change behavior
there.

Removing that caller makes all the rest of this rect computing
code into dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/847303003
2015-01-14 13:25:16 -08:00
Elliot Glaysher
36e9807890 It is time.
Remove all of ui/views, ui/aura/, ui/compositor, ui/ozone,
and a whole bunch of dead code.

This is part one of multiple patches. This removes the
toplevel directories, and some utility files. Further
patches will deep dive to do surgery on the build system,
the resource bundles, et cetera.

BUG=443439
R=sky@chromium.org

Review URL: https://codereview.chromium.org/851853002
2015-01-14 12:56:27 -08:00
Tony Gentilcore
8c6f9a4a57 Fix inspector unittests.
BUG=
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/821643007
2015-01-14 11:32:24 -08:00
Ojan Vafai
d441d00961 Delete some dead ScrollAlignment code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/796623004
2015-01-14 11:14:53 -08:00
Elliott Sprehn
6f8568037a Move @font-face logic from ScopedStyleResolver to StyleEngine.
R=abarth@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/851873002
2015-01-14 11:07:22 -08:00
Ojan Vafai
3c91916589 Remove the PaintInvalidation DocumentLifeCycle states.
We no longer have paint invalidation.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/847393003
2015-01-14 11:03:51 -08:00
James Robinson
a88056c0b1 Use local ids for Surfaces APIs that can only apply to local surfaces
Surfaces identifiers have a local and a namespace component. The
namespace is particular to a connection. The local component is up to
the endpoint of the connection to manage. In contexts where a surface
that may be from anywhere is referenced, a fully qualified ID with both
the local and namespace component is needed in order to be unambiguous.
In contexts that can only apply to local surfaces only the local id is
needed.

This updates the mojo.Surface APIs that can only refer to local IDs to
only take the local component. In particular creating, destroying, or
submitting a frame can only refer to surfaces created on that connection.
References to surfaces within a frame may refer to local or foreign
surfaces so they use fully qualified IDs.

This also skips the SurfacesService indirection since many applications
can perform useful operations on a mojo.Surface interface such as create
surfaces and submit frames without knowing their ID namespace. The
namespace component is needed only to pass fully qualified IDs to other
actors that may wish to reference the produced frame.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/826423008
2015-01-14 10:25:31 -08:00
Tony Gentilcore
889bc4b2e6 Fix running skydb under chromoting.
Looks like a variable rename was missed.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/815143004
2015-01-13 18:50:52 -08:00
Tony Gentilcore
3cce869dd5 Convert the inspector framework to use ES6 classes.
BUG=
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/837933003
2015-01-13 18:49:43 -08:00
Elliott Sprehn
e71cf28f76 Merge StyleSheetCollection into ScopedStyleResolver.
There's no reason to keep two identical lists of the sheets
and have this separate object. I also moved the updating
logic out of StyleResolver and into ScopedStyleResolver
which makes more sense. There's still some weirdness since
some global state still exists in the StyleResolver, but
that's something we can fix in future patches.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/852703002
2015-01-13 18:37:00 -08:00
Elliott Sprehn
3528612650 All documents should have a RegistrationContext.
There's no reason to have a concept of a document with no
registration context.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/841873006
2015-01-13 17:00:51 -08:00
Adam Barth
389fe3d4be Remove outdated hack from flights-app
We don't need this hack anymore.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/853593002
2015-01-13 16:41:20 -08:00
Elliott Sprehn
66f96ff9bf Remove embedder custom elements.
In Sky there's no concept of embedder custom elements with
different naming rules. Lets remove this machinery.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/838463004
2015-01-13 16:27:56 -08:00
Elliott Sprehn
f90f735f9b Remove extension check from CustomElementRegistry.
We only have the main world, we don't need this check.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/788773006
2015-01-13 16:01:49 -08:00
Elliott Sprehn
6a9084c3ee Remove custom element upgrades.
This removes the upgrade candidate machinery so now if an
element is created before it's registered it'll never get
turned into the correct type. created() callbacks and the
correct wrappers being created can stil happen async though
because certain operations are not safe to run script inside
of (ex. the parser or editing).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/843063005
2015-01-13 16:01:26 -08:00
Adam Barth
45f59e29a6 Convert mojo gesture events into WebGestureEvents
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/850823003
2015-01-13 15:23:15 -08:00
Eric Seidel
211b09bc3b Fix tools/android_stack_parser/stack and use it in skydb
This adds a skydb print_crash command which will dump the
symbolicated stack trace of all crashes found in adb logcat
output from the android device.

R=qsr@chromium.org

Review URL: https://codereview.chromium.org/787803006
2015-01-13 15:03:49 -08:00
Elliott Sprehn
d8f1313e81 Always set affected by bits in ElementRuleCollector.
We need to always set these bits, not just if the selector
matched otherwise :hover and friends won't ever match.

BUG=448465
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/852643002
2015-01-13 14:11:02 -08:00
Eric Seidel
84e63f80e7 Make skydb start url error out nicely
Both erg and abarth hit this lack-of-help this morning.

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

Review URL: https://codereview.chromium.org/790793011
2015-01-13 13:18:10 -08:00
Eric Seidel
4b9b3110b3 Teach 'stop' command how to kill the running Android process
Also fixed --use-osmesa to be desktop only.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/849923002
2015-01-13 13:16:30 -08:00
Eric Seidel
c90d35c336 Make --gdb work again by using gdbserver
--gdb now starts gdbserver and I've added a new
command gdb_attach which knows how to launch gdb
and connect to the launched gdbserver

This doesn't quite work on android yet, but it's very close.

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

Review URL: https://codereview.chromium.org/808053006
2015-01-13 12:16:30 -08:00
Elliott Sprehn
1eb36b8721 Remove RuleSet::viewportDependentMediaQueryResults.
Sky doesn't support @media rules, <style> elements must use
the media attribute which instead stores the media query
info on the CSSStyleSheet instead.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850463003
2015-01-13 11:34:14 -08:00
Hixie
9e6f594a73 Examples: move markAsLaidOut() to just before the return, so the asserts work
Specs: introduce layoutDescendants() to avoid work when a layout
manager is unaffected by its childrens' intrinsic dimensions
Examples: update for layoutDescendants() change
Specs: add "lifetime" to resolver settings so that a transition can
avoid having to dirty every consumer of the property every frame when
it only needs to update the objects that are changing that frame
Specs: expose the parents on AbstractStyleDeclarationList subclasses
Specs: fix documentation around autoreap
Specs: fix definition of setProperty()
Specs: clean up the dimension-related logic of layout managers

Review URL: https://codereview.chromium.org/850593003
2015-01-13 11:25:24 -08:00
Elliott Sprehn
a5d3fcd3d4 Remove some dead code.
These methods have no callers. I also added a TODO
to actually clear the font cache properly.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/816423004
2015-01-12 23:33:11 -08:00
Elliott Sprehn
60748a6f94 Remove StyleEngine::usesFirstLineRules().
It always returns false, and Sky doesn't support first
line rules.

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

Review URL: https://codereview.chromium.org/847053002
2015-01-12 23:32:28 -08:00
Elliott Sprehn
90ca29a436 Remove Document::shouldScheduleLayout.
All it does is call isActive() now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/853433002
2015-01-12 23:32:13 -08:00
Elliott Sprehn
43a9629b49 Remove isRenderingReady.
All this method did was check if imports were loaded, and sky's parser
will wait on imports anyway, so there's no reason to block rendering
on imports as they'll likely be at the top of the document and stop
the rest of the page from being appended or rendered.

Sky apps will probably also want more control over rendering and not
want the old school web style of incremental rendering.

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

Review URL: https://codereview.chromium.org/835273006
2015-01-12 22:11:01 -08:00
Elliott Sprehn
c4ecc2236b Remove didRemoveAllPendingStylesheet.
Nothing calls this now, and sky has no concept of pending stylesheets.

TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/849773002
2015-01-12 20:33:20 -08:00
Elliott Sprehn
0a258c1921 Allow on-* event handlers on <sky-element>.
Now instead of calling addEventListener inside the created() callback you just
add on-{eventName} attributes to the <sky-element> around your element
definition. The attribute defines what method on your element to call when the
event with {eventName} is dispatched through your element.

Implementing this required refactoring how sky-element.sky stored information
from each registered element. Now instead of storing just a map of templates
we store a map of ElementRegistration objects which have metadata about the
element. Future patches will combine this system with the element registration
system in sky-binder.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/845283003
2015-01-12 18:25:22 -08:00
Elliott Sprehn
689b91c36d Replace sheet change methods with styleResolverChanged.
Unlike blink in sky we just want to mark tree scopes dirty. We can
remove these methods, the dirty tree scope tracking we'll add in
the future will take care of this.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/836893003
2015-01-12 18:23:55 -08:00
Elliott Sprehn
7fd0df2238 Remove tracking of pending sheets.
I was going to remove all this anyway since we don't need it in sky, all sheets
are local and there's no concept of a pending sheet now.

I also removed the dirty bit I added to StyleSheetCollection. The bit
is not correct and is preventing us from correctly processing sheets and
invalidating style. I'll add it back later when I understand how to add
the dirty bit correctly.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/846183002
2015-01-12 18:15:23 -08:00
Ojan Vafai
f97bad962e Get rid of the full invalidation bool on FrameView.
It doesn't do anything anymore. Also, delete some now
dead paint invalidation code in RenderObject.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/849763002
2015-01-12 18:14:27 -08:00
Ojan Vafai
a044a6d074 Get rid of the *AndFullPaintInvalidation methods.
They now do the same thing as the non-AdnFullPaintInvalidation
versions.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/840483004
2015-01-12 17:51:19 -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
Ojan Vafai
1729b054e2 Delete dead painting code around m_pendingSheetLayout.
m_pendingSheetLayout is never set to a non-default value.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/837633003
2015-01-12 17:15:26 -08:00
Ojan Vafai
544a24a448 Delete RenderSelectionInfo and other selection rect paint invalidation code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/851593002
2015-01-12 17:08:36 -08:00
Hans Muller
cf522e3ed8 Mojo JS Bindings: add show_image example
Add a simple example based on the window and view managers.

The skydb app can now handle apps that want to embed another view.

Corrected a problem in unique module name generation. An otherwise unique module name could be shadowed by a parameter name (service_provider in ViewManagerService Embed). Appended a "$" suffix to module names to avoid the collision.

BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/845103004
2015-01-12 16:35:35 -08:00
Adam Barth
d072eba5a4 Add support for touch events to sky_viewer
This CL adds conversion routines for touch events to sky_viewer so that Mojo
touch events actually show up in the platform.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/847873003
2015-01-12 15:18:16 -08:00
Eric Seidel
f9ca896516 Make --gdb explain that it doesn't work right now
I'm not quite sure how to solve this especially considering
android.  I likely should use 'gdbserve' but I was not able
to get that to work reliably.

At least this makes it less confusing that --gdb doesn't
just silently fail.

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

Review URL: https://codereview.chromium.org/850533004
2015-01-12 15:17:40 -08:00