187 Commits

Author SHA1 Message Date
Benjamin Lerman
d1c92fa424 Change mojo url to always use mojo:foo instead of mojo://foo
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/701933004
2014-11-06 17:23:18 +01:00
Eric Seidel
f536c8d62b Teach sky_server how to use more threads and not drop requests
This is lame, but seems to fix the timeout problem
http://stackoverflow.com/questions/2685089/cherrypy-and-concurrency

Review URL: https://codereview.chromium.org/700213005
2014-11-05 15:25:35 -08:00
Eric Seidel
5c69487bf3 Bring skydebugger closer to clean-shutdown
This teaches the SkyDebugger prompt how to tell
the sky debugger (server) to shut down instead of
just calling exit(0).

This also teaches the WindowManagerApp (server) how
to tear down all of its connections itself instead
of depending on the pipes to do so (which would
crash when youd delete the WindowManagerApp as the
pipes could outlive it with WindowManagerImpl objects
containing raw pointers back to the WindowManagerApp).

Shutdown is not yet clean.  It errors out trying to
talk to the X11 server, but it's closer to clean
than it was prior to this change.  I may add back
and exit(0) to side-step shutdown until it can be
made fully clean.

R=jamesr@chromium.org, sky@chromium.org
BUG=430291, 430242

Review URL: https://codereview.chromium.org/695183003
2014-11-05 13:09:08 -08:00
Eric Seidel
8b9bb313f1 Switch test_sky to sky_server
Adam did this in:
https://codereview.chromium.org/699333002
But later reverted in:
https://codereview.chromium.org/692333007

The problem was that the path to sky_server
was being computed relative to the sky
directory instead of being absolute, so when
the bots tried to run test_sky from the root
mojo directory instead of mojo/sky they failed.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/704833002
2014-11-05 13:08:49 -08:00
Adam Barth
61f9361f67 Switch test_sky back to apache
This CL reverts my previous change because it didn't work on the bots.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/692333007
2014-11-04 17:30:25 -08:00
Hixie
204688b351 Docs: Experimental 'button' widget, work in progress
Review URL: https://codereview.chromium.org/700023003
2014-11-04 17:27:58 -08:00
Adam Barth
593a7cc231 Fix test_sky in release builds
This CL passes the configuration information from test_sky to sky_server so
that sky_server can find the correct output directory.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/705623003
2014-11-04 17:20:30 -08:00
Adam Barth
3d14b06ca9 Add a sketch of a test_perf script
This script isn't quite working, but it's valuable to checkpoint the work at
this point. I'm coordinating with the chromeperf.appspot.com folks to get the
server to accept the data.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/702603005
2014-11-04 16:45:43 -08:00
Adam Barth
100f37194c Switch test_sky from apache to sky_server
After this CL, test_sky uses the same server as skydb.

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

Review URL: https://codereview.chromium.org/699333002
2014-11-04 16:42:29 -08:00
Rafael Weinstein
79fb5e2c48 fix file-browser
R=eseidel@chromium.org, abarth
BUG=

Review URL: https://codereview.chromium.org/705683002
2014-11-04 15:21:57 -08:00
Hixie
f9981b1300 Docs: We renamed appendChild to append, so update this example which still uses the old name.
Review URL: https://codereview.chromium.org/685063006
2014-11-04 14:15:40 -08:00
Adam Barth
a4ed8ae0a8 Add a microbenchmark for simple block layout
R=eseidel@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/701813004
2014-11-04 13:35:03 -08:00
Hixie
0d3b8f4cc9 Docs: add an example that uses the current APIs to define an <element>
element; an example that uses that example to define some HTMLy
elements; and an example to use those HTMLy elements to display a
hello world doc. Highly incomplete WIP.

Review URL: https://codereview.chromium.org/698293003
2014-11-04 13:32:07 -08:00
Hixie
a0a988fadf Specs: define registerElement() a little differently, so that the code
that uses it looks nicer; this moves the complexity to places that
register elements without using 'class' (e.g. the internals of
frameworks that create elements for defining elements)

Review URL: https://codereview.chromium.org/699083005
2014-11-04 12:16:49 -08:00
Hixie
160363c274 Specs: define registerElement() more carefully; add an 'end tag
parsed' callback; pass the element's module to the constructor when
constructing a custom element (these are rather experimental changes
and we may want to go a different way on this stuff)

Review URL: https://codereview.chromium.org/701873004
2014-11-04 11:57:02 -08:00
Adam Barth
49e1436a68 tests
Address comments

Add a basic parser benchmark

This CL adds a basic benchmark for the parser. There isn't a direct way to
exercise the parser in Sky, so we use imports.

This CL also adds a load event to <import> to determine when the import is done
loading.

R=eseidel@chromium.org

parser benchmark wip
2014-11-04 11:00:32 -08:00
Elliott Sprehn
d1382e4d41 Remove DOMImplementation.
Expose a Document constructor instead. This also exposes that
the TemplateBinding library might need more control over the
registration context for custom elements. For now we make all
documents share the same registration context.

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

Review URL: https://codereview.chromium.org/697363002
2014-11-03 23:18:39 -08:00
Ojan Vafai
79ea19ffc7 Remove margin collapsing.
Margin collapsing is a document-oriented feature. For applications
it just causes confusion and slowness.

margins.sky has failure output because offsetTop is returning the
wrong values. That's not new with this patch though. When I look
at it visually in skydb, everything seems to be in the right place.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/700743002
2014-11-03 21:30:40 -08:00
Ojan Vafai
82fe742ec2 Add the check layout framework for tests.
Also add a test for margins.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/699113002
2014-11-03 20:46:32 -08:00
Adam Barth
0686c96cc5 Don't GC message pipes that have an in-flight request
In mojom, there's a notion of a request/response pair. This CL teaches the JS
bindings not to GC a message pipe after a request has been issued but before
the response has been received.

R=hansmuller@chromium.org

Review URL: https://codereview.chromium.org/696373003
2014-11-03 19:05:48 -08:00
Hixie
8193b29f3f Specs: Drop the concept of late-bound elements. An element can never be upgraded.
This has the following implications:

 - There's no createElement() function any more. If you want to create
   an element from script, you have to use its constructor.

 - There's no async element registration. The parser will block until
   all the imports are imported when you use a tag name of a custom
   element that hasn't been registered yet, in case one of the imports
   defines it.

 - If you try to construct a non-registered element in markup, it
   turns into an <error> element.

 - <div>, <span>, and <error> are new built-in elements.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/695423004
2014-11-03 16:52:47 -08:00
Adam Barth
f8ef5ecdcc Convert the directory listing to run on top of the platform
Previously we were using string concatenation to build up the directory
listing. Now we fetch some JSON from the server and use data binding to inflate
a directory listing.

This exmaple doesn't work yet because we're missing support for
template@repeat, but hopefully we'll get that soon.

Also, added support for setRequestHeader to XMLHttpRequest.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/688413005
2014-11-03 12:53:38 -08:00
Adam Barth
175f8fdfe8 Replace <link rel="import"> with <import>
This CL is just a search-and-replace.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/694423002
2014-11-03 12:34:57 -08:00
Adam Barth
5473994cea Basic implementation of <import>
This CL adds basic support for the <import> elements. We're using the same imports
machinery as <link rel="import">, which simplifies this patch substantially.

Currently we support both <link rel="import"> and <import>. Once this CL lands, I'll
update all the existing modules and then we can drop support for
<link rel="import">.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/681983005
2014-11-03 10:14:09 -08:00
Adam Barth
5e4631f922 Add --use-osmesa flag to skydb
This flag lets us run skydb under Chromoting.

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

Review URL: https://codereview.chromium.org/697943002
2014-11-03 09:33:34 -08:00
Hixie
d00fcdf621 Specs: make element registrations be per-module, define how they are
exported and reexported, rename 'interface' to 'class' in the IDL, add
constructors to all registered elements

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/695043002
2014-10-31 16:18:46 -07:00
Elliott Sprehn
35cd5fd3e2 Remove Element#attributes.
We now implement getAttributes() such that it returns
a new set of Attr isntances on every call as well.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/697773002
2014-10-31 15:10:53 -07:00
Adam Barth
80c734eefc Switch "html" Mojo modules to the Sky module system
These never really worked with HTML imports. This CL updates them to use a more
modern version of the Sky module system so we can delete the old this.exports
pattern.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/697723003
2014-10-31 14:46:40 -07:00
Adam Barth
d11c879659 Make clicking links work in SkyDB
Now the SkyDebugger implements NavigatorHost and actually navigates the
mojo::View. This CL pulled a big refactor of sky/tools/debugger to separate out
MojoMain from debugger.cc.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690363002
2014-10-31 13:17:15 -07:00
Viet-Trung Luu
60314d529b mojom: Remove braces from module statements and make them come first.
So, instead of:

import "bar.mojom";
module foo {
  ...
}

You'll do:

module foo;
import "bar.mojom";
...

(Note that the grammar in the parser doesn't capture the ordering
constraint. It's hard to do so while keeping the grammar LR(1) AFAICT.
So instead we enforce the ordering "manually".)

Also delete mojo/spy/PRESUBMIT.py since it's broken. We'll delete
mojo/spy separately.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/687793004
2014-10-31 12:59:52 -07:00
Eric Seidel
4899c54110 Fix urls under /sky to work again
Turns out that the /sky mapping to the gen
directory was interfering with our new pattern
of mapping the actual /sky directory.

So now we use a more restrictive mapping pattern
of only mapping /sky/services, similar for
/mojo/services and /mojo/public.

Fixed an exception of not finding _sky_server
when a custom sky_server was already running.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/692163002
2014-10-31 11:46:02 -07:00
Adam Barth
5e8e6e226e Add instructions for building Release to HACKING.md
R=ojan@chromium.org, eseidel@chromium.org

Review URL: https://codereview.chromium.org/693163003
2014-10-31 11:44:03 -07:00
Eric Seidel
3d7beea154 Attempt to make skydb more user-friendly
Automatically shut-down the sky_server when quitting.
Always start the skyserver at the mojo-root
instead of the parent directory to the path.
Log when starting a sky_server outside the mojo root.
Re-use already running sky_servers when possible.

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

Review URL: https://codereview.chromium.org/679333005
2014-10-31 10:32:31 -07:00
Hixie
3687a4515b Specs: Simplify the platform by only having one shadow tree per element.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/694613002
2014-10-31 10:16:37 -07:00
Eric Seidel
2c27800c53 Add support for directory listings in sky_server.
Unfortunate these aren't very useful since we
can't actually click on links, nor do navigations
work anyway...

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/690133002
2014-10-30 15:38:30 -07:00
Eric Seidel
b0120fd284 Make it possible to change the viewport size
This makes it possible to change the viewport size
which mojo is using.  The sky debugger uses this new
API to set the viewport to something closer to mobile
instead of 800x600 ancient desktop size. :)

Still the (800, 600) constant is prevelant throughout
mojo (just search for it) and mojo does not seem to
fully update when the viewport size changes, so we actually
only see 320x600 pixels instead of 320x640 in
sky debugger after this change.

Mostly this change is about validating that this is the
correct way to plumb this information.

R=sky@chromium.org

Review URL: https://codereview.chromium.org/692693002
2014-10-30 14:20:45 -07:00
Adam Barth
dc0521fb43 Add support for Element#getAttributes
As described in //sky/specs/apis.md

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/691893002
2014-10-30 13:55:59 -07:00
Adam Barth
681ec14ced Use module.exports rather than this.exports
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/687263005
2014-10-29 15:21:28 -07:00
Eric Seidel
aa58f474f5 Add a very minimal CSSAgent
Also fixed the exception caused by IndexedDB being
missing.  It was there, just not used by inspector.sky.

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

Review URL: https://codereview.chromium.org/662523003
2014-10-29 14:14:06 -07:00
Adam Barth
a93fd66157 Fix line numbers in JavaScript stack traces
Instead of calling the function constructor to compile script in Sky, we now
concatenate strings. This has the advantage of making the line numbers
generated in error messages correct but the disadvantage of being a hack. I've
filed https://code.google.com/p/v8/issues/detail?id=3624 to request a proper
API for this purpose.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/688033003
2014-10-29 14:00:57 -07:00
Hixie
676f8185ad Docs: call superclass constructors in radio.sky example
Review URL: https://codereview.chromium.org/689763003
2014-10-29 13:45:20 -07:00
Hixie
3c9e2c9dd2 Docs: Update radio.sky to use the specced API for shadow roots
Review URL: https://codereview.chromium.org/692563003
2014-10-29 13:10:33 -07:00
Adam Barth
f1aae9495a Add a basic XMLHttpRequest implementation
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/690803002
2014-10-29 12:48:16 -07:00
Eric Seidel
3d85f63717 Slight simplification to prompt code
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/678833004
2014-10-29 12:15:34 -07:00
Eric Seidel
535672268c Don't show sky_server logs to the skydb console
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/692593004
2014-10-29 11:03:54 -07:00
Elliott Sprehn
c7fa9658d6 Mark hixie's tests as Skip so they don't spam the console.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/687893003
2014-10-28 19:36:12 -07:00
Hixie
4305216cf9 This CL provides a bunch of new parser tests, and updates the
TestExpectations file to skip the ones that fail or crash. It also
updates the TestExpectations parser to support URLs pointing to the
mojo repo's issue tracker.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/685593006
2014-10-28 18:58:18 -07:00
Adam Barth
c56ab49799 Add inspect command to skydb
This CL adds an "inspect" command to skydb that injects the inspector module
into the page and prints some instructions for opening the inspector.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690433004
2014-10-28 17:08:25 -07:00
Adam Barth
0335886abf Move framework/inspector/server to services/inspector
Moving the inspector WebSocket proxy server out of the framework directory
simplifies the mappings for the HTTP servers.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/687673004
2014-10-28 15:38:23 -07:00
Adam Barth
4c5a9b1775 Don't crash when importing a module that doesn't export
Instead of crashing, we should use the value "undefined". There's some question
as to whether we should default to the document, but we can resolve that later.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690483002
2014-10-28 14:13:31 -07:00