83367 Commits

Author SHA1 Message Date
Adam Barth
f860dc6a44 Move exports from Document to Module
This CL moves the |exports| from Document to the new |Module| interface,
matching the spec. Also, the |module| object available to scripts is now really
an instance of |Module|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/703593003
2014-11-10 15:34:25 -08:00
Adam Barth
04122dbd21 Add Module and Application interfaces
These interfaces are currently unused by the engine, but they are
constructable.  See apis.md for details.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/697873007
2014-11-10 14:16:56 -08:00
Adam Barth
58030f3a78 Make Sky's test_perf actually test performance
This CL teaches test_perf how to walk the benchmarks directory to find the
benchmarks and how to actually run them. We're still not uploading results to
the server yet, however.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/710133002
2014-11-10 10:30:54 -08:00
Matt Perry
6b138596a4 Remove iframe.sky test. It's timing out on the bots.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/707283002
2014-11-07 17:25:17 -05:00
Matt Perry
506e8db179 Add iframe.sky test expectations for dump-as-render-tree.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/708163002
2014-11-07 17:14:15 -05:00
Matt Perry
130b9c84f0 Initial work on a new <view> element backed by a mojo::View.
This CL introduces an HTMLViewElement which, when inserted into a document,
causes a mojo::View to be created and navigated to the provided URL. No
compositing is done, but the view manager handles the rendering (as I
understand it).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/708903002
2014-11-07 14:34:07 -05:00
Rafael Weinstein
a5e5c906d0 Make import failures log errors
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/711513003
2014-11-06 15:46:42 -08:00
Eric Seidel
2a979ce147 Add back exit(0) until crbug.com/430581 can be resolved.
BUG=430581
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/693433005
2014-11-06 12:55:29 -08:00
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
Rafael Weinstein
4fd0160716 Add city-list example tests to sky
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/708633002
2014-11-05 17:58:57 -08: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
f1f2a12b97 Docs: Experimental 'button' widget, work in progress
Review URL: https://codereview.chromium.org/700023003
2014-11-04 17:27:58 -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
018e6ba3bb fix file-browser
R=eseidel@chromium.org, abarth
BUG=

Review URL: https://codereview.chromium.org/705683002
2014-11-04 15:21:57 -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
842d46667a 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
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
1da15583c5 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
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
61f4494e25 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
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
01f3d8fa67 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
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
44ac35308c 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
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
1befcbfe67 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
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
386a980a85 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
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
ca52266ce8 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
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
956d7b3efc 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
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