37534 Commits

Author SHA1 Message Date
Andreas Gampe
e91f4fd54e am 1503e1ff: am faf26d17: Minikin: Remove unused variables, fix init order
* commit '1503e1ff93656759019987cc51dd7cdab7b16c01':
  Minikin: Remove unused variables, fix init order
2014-12-04 20:44:11 +00: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
Andreas Gampe
1503e1ff93 am faf26d17: Minikin: Remove unused variables, fix init order
* commit 'faf26d176f220c5fa00c20085b764346c998405e':
  Minikin: Remove unused variables, fix init order
2014-12-04 19:52:12 +00:00
Raph Levien
c6b912e71c am def32a19: am 477b5d2c: Move coverage bitmap from FontCollection to FontFamily
* commit 'def32a19f92e966bbca35f5f05b6dabea8b1b4f3':
  Move coverage bitmap from FontCollection to FontFamily
2014-12-04 16:17:39 +00:00
Raph Levien
def32a19f9 am 477b5d2c: Move coverage bitmap from FontCollection to FontFamily
* commit '477b5d2cdbbc7c8115d5fcf441ea25cedc48d08c':
  Move coverage bitmap from FontCollection to FontFamily
2014-12-04 09:22:21 +00: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
Andreas Gampe
faf26d176f Minikin: Remove unused variables, fix init order
For build-system CFLAGS clean-up, fix unused variables.

Reorder initializer list to initialize in the order of member
declarations.

Change-Id: I64358b2dcf0e39d0f4e18fdc3473de867f84fcba
2014-12-03 14:20:11 -08:00
Adam Barth
3b80eca528 Update HACKING.md 2014-12-03 13:57:44 -08:00
Raph Levien
477b5d2cdb Move coverage bitmap from FontCollection to FontFamily
This will significantly reduce memory usage and also speed the creation
of new font families. In particular, the coverage bitmaps for the fonts
in the fallback stack will be computed once in the Zygote, rather than
separately in each app process.

Bug: 17756900
Change-Id: I66f5706bddd4658d78fe5b709f7251ca9d2ff4f8
2014-12-03 12:48:20 -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
Eric Seidel
d2e657319b Revert "Attempt to fix page-agent-get-resource-tree on the bot"
Didn't actually fix the bot:
http://build.chromium.org/p/client.mojo/builders/Mojo%20Linux/builds/321/steps/mojob%20test/logs/stdio
so there is no point in keeping this change.

This reverts commit 4e50a3cdf887a77adfb0adf5f4e5ebc42a2d99f7.

TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/742783003
2014-11-19 12:01:15 -08:00
Eric Seidel
0c2d6c92eb Attempt to fix page-agent-get-resource-tree on the bot
Unclear why it's failing since we don't have
output from the bot, but this seems like a reasonable guess.

TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/742813002
2014-11-19 11:54:16 -08:00
Elliot Glaysher
2df4773295 Dispatch key events to the currently focused window.
This fixes the browser demo. You can now enter text into the URL bar.

BUG=431047
R=sky@chromium.org

Review URL: https://codereview.chromium.org/737913002
2014-11-19 10:39:24 -08:00
Eric Seidel
717ee79a4b Make skydb chromoting aware
Presumably we should push this logic down into mojo
instead of hacking around this at the script level.

But at least this makes skydb work better for now.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/743603004
2014-11-19 09:46:43 -08:00
Adam Barth
3d0b7838ad Add a trivial test
As an experiment to see if it ever fails.

TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/725853003
2014-11-18 17:11:18 -08:00
Elliott Sprehn
1eb4350911 Clean up child checks in ContainerNode.
We can simplify the checks given that there's fewer node types now. This does
make the error messages from Range a little worse, but it's weird that Range
is doing its own error checking anyway.

I also took this as an opportunity to add a bunch of DOM tests.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/732203004
2014-11-18 16:49:48 -08:00
Eric Seidel
88fa228e45 Add support for Page.getResourceTree
Unfortunately we don't yet have a way to walk into
imports, so this only is the first-level of the
source tree, but this is a huge step forward.

You can now click to set breakpoints, however
setting breakpoints crashes sky.

I had to fix Console.log to flush stdout
so that I could actually debug my timing-out test.

Also had to fix Chai to dump differences for deepEqual.

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

Review URL: https://codereview.chromium.org/732413004
2014-11-18 15:53:13 -08:00
Eric Seidel
09f4d5e9ff Wire up more of the DebuggerAgent
The debugger can now correctly break on exceptions
and show the corresponding line in the inspector.

It correctly understands which scripts are internal
to sky and does not pause during them.

There is still a ton to make work here
(including stacktraces which I have not tested),
but basic functionality seems to work.

The current implementation is not smart enough to
unpause the inspector when the frontend disconnects.

BUG=434510,434513
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/727593004
2014-11-18 15:05:05 -08:00