187 Commits

Author SHA1 Message Date
Colin Blundell
f813fdb8da Revert "Add image_diff from the chromium repo."
This reverts commit ac5097e515ce8237ead2c89bc61dc914cb75313b.

Reason for revert:

Breaks compile on the ASan bot (e.g., http://build.chromium.org/p/client.mojo/builders/Mojo%20Linux%20ASan/builds/95/steps/mojob%20build/logs/stdio).

TBR=ojan

Review URL: https://codereview.chromium.org/800773002
2014-12-12 08:07:49 +01:00
Ojan Vafai
6e6e45e76b Add image_diff from the chromium repo.
This is needed for reference tests so we can diff images.
This is just a straight copy of the image diff in the
chromium repo.

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

Review URL: https://codereview.chromium.org/801443002
2014-12-11 15:21:29 -08:00
Colin Blundell
ff86bae542 Restructure public side of navigation service.
This CL goes from this:
  //mojo/services/public/interfaces/navigation

to this:
  //mojo/services/navigation/public/interfaces

This CL also makes the Mojo-side changes necessary to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/796783002
2014-12-11 08:49:15 +01:00
Colin Blundell
556f6f4bf4 Restructure public side of input_events service.
This CL goes from this:
  //mojo/services/public/interfaces/input_events

to this:
  //mojo/services/input_events/public/interfaces

This CL also makes the Mojo-side changes necessary to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/788353002
2014-12-10 22:50:57 +01:00
Rafael Weinstein
1850b45556 Enable/Unprefix Animations & Transitions, add basic tests
This patch remove the Web Animations & CSS Animation runtime flags (and enables both). Removes prefixed Aninamations & Transitions and adds some basic tests & test support API.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/760183003
2014-12-10 10:38:34 -08:00
Colin Blundell
7e969d1e78 Restructure public side of geometry service.
This CL goes from this:
  //mojo/services/public/cpp/geometry
  //mojo/services/public/interfaces/geometry

to this:
  //mojo/services/geometry/public/cpp
  //mojo/services/geometry/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/790213002
2014-12-10 17:56:39 +01:00
Colin Blundell
2d8ed6f04a Restructure public side of network service.
This CL goes from this:
  //mojo/services/public/cpp/network
  //mojo/services/public/interfaces/network

to this:
  //mojo/services/network/public/cpp
  //mojo/services/network/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/789243002
2014-12-10 16:28:40 +01:00
Colin Blundell
669eef3086 Restructure public side of surfaces service.
This CL goes from this:
  //mojo/services/public/cpp/surfaces
  //mojo/services/public/interfaces/surfaces

to this:
  //mojo/services/surfaces/public/cpp
  //mojo/services/surfaces/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium.

TBR=beng

Review URL: https://codereview.chromium.org/792813002
2014-12-10 14:43:23 +01:00
Colin Blundell
2c34fe1ad9 Restructure public side of view_manager service.
This CL goes from this:
//mojo/services/public/cpp/view_manager
//mojo/services/public/interfaces/view_manager

to this:
//mojo/services/view_manager/public/cpp
//mojo/services/view_manager/public/interfaces

This CL also makes the Mojo-side changes required to roll this change into
Chromium (for both view_manager and window_manager, which was converted in an
earlier CL but for which these updates were not made):
- Updates rev_sdk.py to pull over the new directory
- Updates //mojo/services/public/mojo_services_public.gyp

TBR=beng

Review URL: https://codereview.chromium.org/790623003
2014-12-10 14:16:27 +01:00
Elliott Sprehn
fc6b820dd7 Add clear() to Element.classList.
We should support a fast way to remove all classes through the
classList instead of having to call removeAttribute() directly.

BUG=440529
R=ojan@chromium.org, rafaelw@chromium.org

Review URL: https://codereview.chromium.org/788093003
2014-12-09 17:56:41 -08:00
Rafael Weinstein
08b367be54 Fix id/class collection from stylesheets
BUG=438036
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/785313002
2014-12-09 15:05:42 -08:00
James Robinson
b33ce1e3a0 Put code in //services/window_manager in namespace window_manager
R=sky@chromium.org

Review URL: https://codereview.chromium.org/788453002
2014-12-08 12:08:55 -08:00
Eric Seidel
a90d431d45 Fix the sky build instructions
Sky can't really build on its own.  We were previously
using the 'sky' build target for this but it didn't
fully anticipate all of our dependencies.  The most
recent break was when James removed /mojo/shell
from mojo.

Instead of sky listing out each and every service
which it depends on, we should just get used to
building root like other mojo developers.

Thankfully there is already a helpful tool
for this called mojob.py.  I've updated our
readme to reflect this, and removed the mojo
dependency on the sky build group.

The purpose of the sky build group is to expose
all of the sky build targets up to the root level
BUILD.gn (which only depends on /sky), not to
be an independently buildable target.

R=jamesr@chromium.org, jamesr
BUG=

Review URL: https://codereview.chromium.org/764023007
2014-12-05 15:46:07 -08:00
Ojan Vafai
33b63fdd1a Convert sky_server over to a go-based http server.
We keep seeing timeouts on the bots that seem to be due
to cherrypy dropping requests on the floor, which in turn
causes imports to stall, which causes the test to time out.
In local testing, I was able to reproduce the timeouts
and wasn't able to do so with the go-based server.

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

Review URL: https://codereview.chromium.org/746373002
2014-12-04 16:10:09 -08:00
Ojan Vafai
6805c64649 Get rid of background-clip:text and PaintBehaviorForceBlackText.
http://blog.ericzhang.com/punch-through-text-masks-with-css-and-html5/
shows that you can achieve the similar effects using canvas. This
doesn't need to be built into the core engine. It's OK for this
to require more than a line of CSS to achieve.

Unfortunately, the test included this this patch doesn't actually
show that I didn't break anything because background-image
is broken. I got the test from
47e0d126e8%5E%21/#F4

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/756183004
2014-12-04 12:15:39 -08:00
James Robinson
154141549d Simplify the thunk targets since we don't support apps as components
Since we don't support using the component build to produce mojo apps,
we can simplify the build targets in a few ways:

*) every mojo_native_application must depend on the c system thunks,
so just make that part of the template instead of requiring the dep
*) there's no such thing as depending on gles2 headers from a component,
so delete the forwarding group.

Most targets that want to use the gles2 headers in a mojo context
want to depend on an implementation through the thunks, so
//mojo/public/c/gles2 does just that. A smaller number of targets (such
as the implementation of the thunks) want to just depend on the headers
but not an impl, so they can depend on //mojo/public/c/gles2:headers.
The //mojo/public/gles target isn't that useful since the only thing we
expose is a set of C entry points.

We can probably also simplify the c system targets, but that's trickier
due to more extensive use from the chromium side.

BUG=438701
R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/780733002
2014-12-03 16:25:09 -08:00
Adam Barth
3b80eca528 Update HACKING.md 2014-12-03 13:57:44 -08:00
Ojan Vafai
d8fbaa8bda Remove PaintLayerPaintingChildClippingMaskPhase.
It's never set. It was added in
7176977ba5%5E%21/#F21

The test cases from that patch seem to pass.
Included one in this patch.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/772193004
2014-12-02 20:12:23 -08:00
Rafael Weinstein
253d078c89 Fix Animations, Remove Compostior Animations.
This patch (re)hooks up animations so they start and removes the infrastructure required by blink to synchronize the compositor and main threads.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/772673002
2014-12-02 14:37:55 -08:00
James Robinson
25f8a50ffe Move window_manager service implementation to //services
R=erg@chromium.org

Review URL: https://codereview.chromium.org/765753003
2014-12-02 10:52:00 -08:00
Elliott Sprehn
42cd8f2ed4 Use a JS markup serializer.
This makes MarkupAccumulator and all related code into dead code.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/771093002
2014-12-02 10:09:35 -08:00
Elliott Sprehn
96595e6d60 Add tests for changing classList.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/776493002
2014-12-02 10:05:28 -08:00
Adam Barth
c95f06ca84 Use source_set rather than static_library
According to jamesr, static_library is almost never what we want because we
just configure static libraries to be thin archives anyway.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/766053007
2014-12-01 23:51:06 -08:00
James Robinson
c01b5913ce Add tracing service and make the shell+sky_viewer+services talk to it
This adds a tracing service that can aggregate tracing data from
multiple sources and write a json file out to disk that trace-viewer can
understand. This also teaches the shell, sky_viewer, and various other
services how to register themselves with the tracing service and provide
tracing data on demand. Finally, this teaches the skydb prompt to tell
the tracing service to start/stop tracing when the 'trace' command is
issued.

The tracing service exposes two APIs, a collector interface and a
coordinator interface. The collector interface allows different entities
to register themselves as being capable of producing tracing data. The
coordinator interface allows asking the service to collect data from
all registered sources and flushing the collected data to disk.

The service keeps track of all open connections to registered sources
and broadcasts a request for data whenever the coordinator's Start
method is called, then aggregates all data send back into a single
trace file. In this patch, the tracing service simply gives all sources
1 second to return data then flushes to disk. Ideally it would keep
track of how many requests it sent out and give each source a certain
amount of time to respond but this is simple and works for most cases.

The tracing service can talk to any source that is capable of producing
data that the trace-viewer can handle, which is a broad set, but in
practice many programs will want to use //base/debug's tracing to
produce trace data. This adds code at //mojo/common:tracing_impl that
registers a collector hooked up to //base/debug's tracing system. This
can be dropped in to the mojo::ApplicationDelegate::Initialize()
implementation for most services and applications to easily enable
base tracing. Programs that don't use //base, or that want to register
additional data sources that can talk to trace viewer (perhaps providing
data that's more easily available from another thread, say) may want
to create additional connections to the tracing service.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/769963004
2014-12-01 16:31:03 -08:00
Ojan Vafai
fd8d079479 Make fixed-width elements not center by default.
e223e0c6d51f027196a2597b556641328a65d4b5 accidentally
sent all elements down the margin:auto codepath.
The patch incorrectly removed just the
"&& containingBlockStyle->textAlign() == WEBKIT_CENTER"
instead of the whole clause.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/760143002
2014-11-26 16:39:41 -08:00
Elliott Sprehn
b6303c5d69 Only allow one shadowRoot.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/759663003
2014-11-26 13:54:14 -05:00
Adam Barth
a0c48f7369 Remove event targeting hack
Mojo's event targeting system has evolved to the point were we don't need this
ugly hack anymore.

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

Review URL: https://codereview.chromium.org/762443002
2014-11-26 09:00:04 -08:00
James Robinson
2cc9b542a0 Move tracing_impl code to mojo/common
This moves the tracing code and mojoms from sky/viewer/services/ to
mojo/common/ in anticipation of refactoring these to be more widely
usable. This doesn't actually change behaviors yet.

BUG=436639
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/751303003
2014-11-25 16:23:42 -08:00
Adam Barth
fbe2359eec Fix DCHECK(gr_texture) when running test_sky
We shouldn't bother trying to draw a 0x0 sky::Layer. It makes Ganesh unhappy.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/759763002
2014-11-25 12:11:59 -08:00
Adam Barth
7e05650376 Fix several leaks in the Sky compositor
When tearing down the Sky compostior, we need to destroy the GL context and all
the textures in the resource manager.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/761503004
2014-11-25 12:11:05 -08:00
Adam Barth
c7a656aca9 Surfaces should acknowledge frame submissions
Previously, there was no way for clients of the surfaces service to
appropriately rate-limit their frame submissions. We tried using the "return
resources" signal to rate-limit, but that's really a measure of how quickly
you're submitting new resources rather than how quickly the system is putting
up frames.

Currently, only the Sky compositor listens to this signal. Using this signal,
we're able to run sky/examples/spinning-square.sky in sync with the surfaces
service (that is, submitting exactly one frames every 17ms).

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/756673004
2014-11-24 16:21:53 -08:00
Adam Barth
448bfbe9e5 Add some trace events to Sky compositor
This CL adds some basic trace events to the Sky compositor so we can see what's
going on.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/757643002
2014-11-24 09:54:28 -08:00
Adam Barth
a1b7d730ce Fix race condition in test
The |done| function comes from |it| not |describe|. Previously, we were just
ending the test right away.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/754463003
2014-11-21 16:08:31 -08:00
Rafael Weinstein
96eb53d4ef setChildrenInline wasn't doing anything and childrenInlien always deferred to isRenderParagraph.
Also, add a test from the original webkit patch that called setChildrenInline in layoutBlock

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/748943002
2014-11-21 15:16:58 -08:00
Adam Barth
e1136c44d1 Add a basic example of a spinning square
This example will let us test basic animation performance.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/748853004
2014-11-21 13:27:09 -08:00
Adam Barth
f219a84961 Enable the Sky compositor again
This CL fixes two bugs:

1) We need to enter the Ganesh context in order to destroy the GrContext.

2) We had a race condition whereby we'd try to upload a frame to a surface that
   didn't yet exist. This CL fixes that race by adding a state to LayerHost to
   wait for the surface to be created before trying to upload to it.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/753643002
2014-11-21 12:15:30 -08:00
Ojan Vafai
eda246d9f3 Fix text-overflow:ellipsis.
This regressed in 3db9471ae80bd492f2a346113d2323ba8eee0c09.

Accidentally sent some code down the override by sending the
top LayoutUnit instead of the left/right LayoutUnit. The
root problem was bad overloading, which is also fixed in
this patch. Inlined the overloaded method since one of
the calls was only called from one place.

The new test demonstrates the ellipsizing, but that doesn't
show through in the render tree dump. We don't get real
test coverage here until we either start doing pixel tests
or start exposing ellipsis in the render tree dumps.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/751483002
2014-11-21 11:26:05 -08:00
Adam Barth
8009a70eea Enable the Sky compositor
Turns out we need to reset the context before switching back to drawing with
Ganesh (i.e., call resetContext on the GrContext) to clean out whatever state we've
changed in the GL context. Now the city-list and the flights-app demos work.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/752653002
2014-11-21 09:57:47 -08:00
Hixie
ebbe64aeb6 Docs: fix the hitTest() logic for display:toolbar since it doesn't use size 0x0 for its hidden children
Review URL: https://codereview.chromium.org/741313002
2014-11-20 15:50:43 -08:00
Hixie
8475cd5871 Specs: Simplify the paint model. Now you are not responsible for
actually telling your child to paint, you just say where it would
paint. The platform then takes care of making sure all the dirty nodes
have their paint() methods called.

Review URL: https://codereview.chromium.org/744843003
2014-11-20 15:30:30 -08:00
Adam Barth
e71cc7d2b3 Teach skydb about --release and --debug
Previously, skydb could be used only for Debug builds. As part of working on
graphics performance, I'd like to use it for release builds as well. This CL
teaches it to use the same configuration arguments as sky_server, test_sky, and
test_perf.

The downside of this CL is that you'll need to supply --debug in the common
case of working with a debug build.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/746473003
2014-11-20 14:39:55 -08:00
Adam Barth
0beeadcfe7 Use the scheduler to drive the Sky compositor
This CL lets us put up more than one frame by using the scheduler to schedule
the next frame.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/744753003
2014-11-20 14:13:36 -08:00
Adam Barth
410ea2c8a0 Add a simple compositor for Sky
Currently we're only able to put up one frame and we can have only one layer, but
this is enough to draw a green circle in a sample app. A future CL will wire this
up to Sky and add support for drawing a second frame.

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

Review URL: https://codereview.chromium.org/740923002
2014-11-20 14:10:40 -08:00
Hixie
72edfdbe67 Specs: update the layout and paint schemes to match discussions better
Review URL: https://codereview.chromium.org/745863002
2014-11-20 13:58:53 -08:00
Scott Violet
00886da677 Makes views be initially hidden
This better matches what other toolkits do and lets the client
configure the view before we attempt to show something for it.

BUG=434429
TEST=covered by test
R=erg@chromium.org

Review URL: https://codereview.chromium.org/745743002
2014-11-20 13:04:25 -08:00
Elliott Sprehn
2017aace78 Enable ES6 classes.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/742183002
2014-11-20 10:55:28 -08:00
Matt Perry
cbd9230c05 Unrevert "Sky: When an iframe element is removed, delete its mojo View."
This reverts commit acec66c735d6a40d3da3e0e9a6ee5f278bdfe043.

Scott thinks he fixed the crash.

BUG=434555
TBR=sky@chromium.org

Review URL: https://codereview.chromium.org/740383002
2014-11-20 11:13:16 -05:00
Eric Seidel
5afca934fe Fix typo in TestExpectations
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/741823002
2014-11-19 13:04:33 -08:00
Matt Perry
773fd8805f Revert "Sky: When an iframe element is removed, delete its mojo View."
This reverts commit 45991a3752e6a6298901eba36e7bf4cdec4d263c.

It was causing flaky crashes on the bots.

TBR=esprehn@chromium.org
BUG=434555

Review URL: https://codereview.chromium.org/740773002
2014-11-19 15:13:28 -05:00
Eric Seidel
fd93230fee Mark page-get-resource-tree as flaky
At least until we can get results from the bot
to understand why it's failing there.

BUG=434822
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/739293002
2014-11-19 12:12:25 -08:00