226 Commits

Author SHA1 Message Date
Hixie
00a2de6490 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
ef24228598 Remove <meta>
We're not using this element.

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

Review URL: https://codereview.chromium.org/699023002
2014-11-03 16:51:31 -08:00
Elliott Sprehn
c24fbd5cd2 Remove more API from Node and ContainerNode.
R=abarth@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/698123002
2014-11-03 14:55:19 -08:00
Hixie
5bc8ae496a Specs: Explain the parser a bit better. Make the output of registerElement() something you can pass to registerElement().
Review URL: https://codereview.chromium.org/705443002
2014-11-03 14:08:12 -08:00
Adam Barth
6002422526 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
512c4591a6 Remove HTMLLinkElement
Please use <import> instead.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/696413002
2014-11-03 12:51:24 -08:00
Rafael Weinstein
3eb5be249e Remove ArrayFuzzer from observe.sky test (was timing out).
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/695413003
2014-11-03 12:49:41 -08:00
Ojan Vafai
ab8e1f98d5 Remove more support for floats from RenderBlockFlow.
This doesn't change any behavior. Floats were already removed.
This is just removing effectively noop code.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/692563004
2014-11-03 12:40:09 -08:00
Adam Barth
4240a776a4 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
Hixie
2a6e5c6b29 Specs: Add a URL field to the Module and Application objects. Note
that this makes the constructor for Module now have three arguments.
They're all non-optional which is why I didn't turn it into a
dictionary, but maybe it's time to start thinking about that. And
maybe URL should be optional.

Review URL: https://codereview.chromium.org/700603002
2014-11-03 11:07:58 -08:00
Rafael Weinstein
40ce06f206 Added tests for observe.sky
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/694323003
2014-11-03 10:41:34 -08:00
Adam Barth
d07561b6cf Fix SkyElement
Adam broke this when trying to refactor it. This CL is just a partial revert of his
CL.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/689243003
2014-11-03 10:15:38 -08:00
Adam Barth
8323fb1e88 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
2e3d0ab74c 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
Elliott Sprehn
c0bf67d1f9 Remove interactive content and form related API from HTMLElement.
In particular this inlines the accessKeyAction, removes isInteractiveContent()
which was for special casing certain elements in event dispatch, and removes
eventParameterName() which was only needed for inline event handlers.

I also moved Node::commonAncestor into NodeRenderingTraversal, the only
callers of it passed NodeRenderingTraversal::parent as the second argument,
it didn't make sense to have this generic thing.

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

Review URL: https://codereview.chromium.org/693243002
2014-10-31 18:48:50 -07:00
Hixie
22d5eed1dd fix the complexity comments for attribute APIs
Review URL: https://codereview.chromium.org/696783003
2014-10-31 17:20:18 -07:00
Elliott Sprehn
ca3b2661ef Remove a lot of API surface from Element.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/696903002
2014-10-31 16:48:20 -07:00
Hixie
0fadb1e50c Specs: default arguments
Review URL: https://codereview.chromium.org/694843003
2014-10-31 16:45:20 -07:00
Ojan Vafai
ed0c01cdca Remove CSS Grid Layout and grid media queries.
The two are unrelated, but it was easier to just grep for grid
and remove them all. Aside from the media query change, there
isn't any change in behavior since grid was behind a flag.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/689853003
2014-10-31 16:40:03 -07:00
Hixie
f1b8900dbf 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
5330701999 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
e1c150ffca Drop support for this.exports
Please use module.exports instead. As far as I know, all code in the repo has
been converted over to the new style.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/698543006
2014-10-31 15:02:45 -07:00
Adam Barth
0b40ab943e Clean up SkyElement
There's no reason to wrap this script in an anonymous function. Sky modules
already run inside their own scope.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/692253002
2014-10-31 14:58:38 -07:00
Adam Barth
03114dfa7e 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
Rafael Weinstein
11130c9880 Minor tweaks to sky/framework/README.md 2014-10-31 14:41:52 -07:00
Rafael Weinstein
7f221ff756 add README.md
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/695963003
2014-10-31 14:37:32 -07:00
Eric Seidel
509999eccd Add a PRESUBMIT for gn check, currently only for //sky/*
Also fixed //sky/* to pass gn check again.

This makes all of our previous DEPS header checking
obsolete and those can be removed now.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/697733002
2014-10-31 14:25:33 -07:00
Hixie
95c3a249f7 Specs: Clarify currentScript behaviour
Review URL: https://codereview.chromium.org/693933003
2014-10-31 13:30:11 -07:00
Adam Barth
9a2441ce9e 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
d707787423 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
Ojan Vafai
7d3feb3952 Remove line breaking to avoid window.
Now that we don't have multi-column or pagination, this
is dead code. This also means we don't need to call
layoutBlockFlow in a loop.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/697713002
2014-10-31 12:41:40 -07:00
Rafael Weinstein
8279e8603b Add initial SkyElement & city-list example
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/698653002
2014-10-31 12:29:42 -07:00
Eric Seidel
d47c4829fe 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
ae147c589d 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
Adam Barth
e18d99a0f3 Make clicks on <a> request a navigation
Currently our window manager isn't listening for these requests, but it would
work if we loaded sky in wm_flow or example_window_manager.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/695803003
2014-10-31 11:27:44 -07:00
Ojan Vafai
20dd8466c7 Remove border-fit.
This just lets you size an element to it's content. We should
do this in a more generic way or let you override layout
and do it yourself.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/698613002
2014-10-31 10:59:40 -07:00
Adam Barth
97565a73db Introduce blink::ServiceProvider
This CL is a warmup for making hyperlinks actually work. ServiceProvider lets
the embedder inject a bundle of services that are specific to the embedding
context (e.g., NavigatorHost). Services that are independent to the embedding
context can be injected via blink::Platform.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/696733003
2014-10-31 10:54:03 -07:00
Eric Seidel
c125156a8c 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
Benjamin Lerman
35d410ab00 mojo: Update content handler API
WIP

R=aa@chromium.org, abarth@chromium.org, hansmuller@chromium.org

Review URL: https://codereview.chromium.org/687273002
2014-10-31 18:23:10 +01:00
Hixie
67a3adff88 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
Elliott Sprehn
cf29897cbc Devirtualize a bunch of Element.
These methods have no sublcass implementations now.

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

Review URL: https://codereview.chromium.org/694443003
2014-10-30 23:13:08 -04:00
Elliott Sprehn
c384b62ef1 Remove lots of dead virtuals from Element.
Mostly form related things we don't need now.

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

Review URL: https://codereview.chromium.org/694703002
2014-10-30 23:03:02 -04:00
Elliott Sprehn
dfbf806148 Remove HasPendingResources flag.
This was an SVG-ism we don't need.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/694683002
2014-10-30 22:46:51 -04:00
Ojan Vafai
80efab4680 Remove straggling bits of listboxes.
Also remove some straggling bits of textareas along the way.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/653993007
2014-10-30 16:46:17 -07:00
Eric Seidel
428f45774c 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
Elliott Sprehn
cf5d82f390 Don't hit ASSERT_NOT_REACHED() when adding a scroll listener. 2014-10-30 15:23:04 -07:00
Ojan Vafai
31c4826beb Remove createsAnonymousWrapper. It's dead code.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/696493003
2014-10-30 14:41:47 -07:00
Eric Seidel
84064defab 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
cb61ad4cf4 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
4be2d764fa Remove Platform::parseDataURL
We only use this data URL parser to pre-cache images loaded from data URLs.
It's not clear we need that optimization in this system. If we do want it, we
can just call the data URL parser directly.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/691623003
2014-10-30 09:41:31 -07:00