This is all wasted effort in sky since we invalidate
the whole viewport on every frame. We'll probably eventually
add back in some invalidation, but it likely won't
be rect-based.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/840403003
This removes the client relationship between the sky::InspectorFrontend
and sky::InspectorBackend mojo interfaces. Instead, the two are now
unrelated (in the mojom) and just happen to be often used together.
The inspector service provides the InspectorFrontend interface to
connecting applications and optimistically tries to connect to the
InspectorBackend interface of applications that connect, in case they
want to receive messages. The front and back end interfaces are both
broadcast APIs, so no attempt is made to keep track of which binding
is which. If they did need to be correlated this could be easily
accomplished by allocating a new object to keep a
mojo::Binding<sky::InspectorFrontend> and the corresponding
sky::InspectorBackendPtr.
R=abarth@chromium.org, eseidel@chromium.org
Review URL: https://codereview.chromium.org/835463003
We now store the bits about what was matched inside the SelectorChecker
and map them to operations that mutate the style after matching the
selector. This eliminates the SelectorChecker::Mode.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/840163003
It's always zero in sky.
This was for sorting tree boundary crossing rules and rules in multiple
ShadowRoots on the same element. Neither of those things exist in Sky
so we can remove it.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/800483006
Style sharing didn't play nicely with elements getting
their display adjusted based off the parent's display.
We style share without doing adjusting, so we need to
avoid style sharing if adjusting would result in
a different style. Particularly, we need to make sure
that the display coercion would happen in the same way.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/839153002
Log an error whenever an element has an unknown attribute in a template.
This means you can't use generic attributes like Polymer, but we
probably want to discourage that anyway since attribute selectors should
be avoided for most things.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/845523004
This makes skydb pass a command_port to prompt.cc
as a commandline argument. I removed passing of the
url and instead pass the url via a separate /load command.
This has the nice side effect of guarenteeing that
the sky instance is up and ready to respond to commands
when skydb exits. It also prepares us for running
more than one copy of prompt.cc as jamesr requested
for both Release and Debug or for on both your android
device as well as your local machine.
R=abarth@chromium.org, jamesr@chromium.org
BUG=
Review URL: https://codereview.chromium.org/841113003
This CL makes the parser yield before non-import start tags if there are
outstanding imports. This will let use remove the upgrade path from custom
elements because we can require the registration to happen before the tree
building.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/814173005
Instead lets process the ruleset into the global lists in
the StyleResolver itself. I also combined the methods in
StyleResolver and removed the now dead AddRuleFlags
argument.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/838313002
This makes it much easier to work with a device where we
don't expect a persistent commandline session. Prompt no longer
actually makes a prompt but rather just runs an http server.
This is just a v1 patch. It doesn't work with android yet
and it isn't smart enough to allow you to run more than one
copy of prompt.cc at the same time (since you can't control
the port it listens on). If you have a second copy of
prompt runnning (or anything else bound to port 7777) it will
just crash.
We could make this a lot better, including splitting out the
pid-file tracking for sky_server into sky_server instead of
having skydb manage it.
R=ojan@chromium.org, abarth@chromium.org
BUG=
Review URL: https://codereview.chromium.org/840973002
This CL adds an icu_data application that vends ICU data to clients via shared
memory. We use a sha1hash to validate the integrity of the data. Currently,
this icu_data service is used on Android only. Desktop platforms load the ICU
data table from the file system, as they did before. See the mojo-dev
discussion for more background.
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/826093004
Prior to this change the magic sequence was '#!mojo:' and the url of the content handler app included mojo:. This works only for mojo: urls, but we want
other schemes. So, the magic sequence is now '#!mojo ' and 'mojo ' is not part of the resulting url.
R=aa@chromium.org
Review URL: https://codereview.chromium.org/821403003
We can combine matchAuthorRulesForShadowHost into
matchAuthorRules, and also combine the two matchUARules
methods.
collectScopedResolversForHostedShadowTrees and the Vector
of ScopedStyleResolvers was also not needed. Sky can only
ever have two resolvers, the one for your scope, and the
one for your host rules.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/836193003
Enable Sky applications to be written in terms of the Application,
Shell, ServiceProvider classes.
Add a shellProxyHandle() method to the Sky Internals class. It returns
a message pipe handle that the JS Shell class will assume ownership of.
BUG=
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/837283002
This way we get some broad pixel test coverage.
Do this by dumping the png from the flights app,
uploading it to google storage and then having
the reference file load the uploaded file.
This isn't a good long-term solution. Long-term
we should dump paint commands (or some other
textual representation) and/or make more targetted
reftests that don't need pngs. As such, the process
for doing this is painful and manual. If we decide
we want to have pixel tests properly, we'll want
to do something more automated obviously.
Also, turn on the discard_transparency bool when
encoding the pngs. Otherwise, the png is lossy
and none of this works.
R=esprehn@chromium.org
Review URL: https://codereview.chromium.org/836363003
This flag doesn't really make sense in sky, rules should
only match if they're from the same scope or are a :host
rule in the ShadowRoot on the element. Removing this also
eliminates the ScopeContainsLastMatchedElement flag. For
now we just check if the scope is null for the same
behavior, in the future we'll never let scope be null
and we'll just enforce the normal style scoping rules.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/833443003
turned into something that doesn't inherit from Element, since JS lets
you do that kind of thing after registration
Review URL: https://codereview.chromium.org/829113003
This patch is largely just a rename since updateLayoutIgnorePendingStylesheets()
didn't really do anything except call updateLayout() now as nothing was reading
the ignorePendingStyleSheets state, and no callers used the synchronous post
layout task option which was meant for plugins (which Sky doesn't have).
Placeholder styles were related and just add confusion since things pretend to
be display: none while <import>'s are loading. We should expose a real API for
avoiding FOUC instead of pumping frames with display: none elements when
imports are loading.
I had to skip the layout/continuations.sky test since it always crashes now
with an ASSERT failure about a bad cast (filed as bug 446739). The bug already
existed, this patch just makes that one test hit it.
BUG=446739
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/834693007
Just linearly search for keyframes in the set of stylesheets.
Components rarely have many sheets, and sheets rarely have many
keyframes so this should be quite fast. It's also much simpler
than having to collect all the keyframes from all the rulesets.
R=ojan@chromium.org, rafaelw@chromium.org
Review URL: https://codereview.chromium.org/839473005
This now means that using a class/id/attribute selector in one scope will
not cause style recalcs in other scopes in the page when something with
that feature changes.
It also removes an iteration over all the scopes that used to collect
features.
I also removed all the extra cases around adding/removing classes since
the general case can handle them.
In addition I removed the check for classStringHasClassName which looked
to see if the string was all whitespace. This check dated way back to
fixing an assert in code we don't even have anymore. Assertion fix aside
all the extra check optimized for was if you wrote class=" " with no
names, which will now cause an extra malloc of the SpaceSplitString::Data.
This seems super rare, it makes more sense to not scan the class string
every time the list of classes changes which is far more common than
setting a string of only whitespace.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/837883002
Sky doesn't really have many built in elements, we no longer support
<foo is="my-element">. This does mean you can't extend <import>,
<script> or <style>, but we'll figure that out later.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/831993005
1. If notifyTestComplete is called before the first paint,
give a clear assert instead of a confusing crash.
2. Add runAfterDisplay. This is a copy of the equivalent
file in Blink. Avoids the incorrect 100ms setTimeout. I had
thought there was a deeper bug here, but it appears to just
be the issue from #1 now that we properly pump frames
in testing mode by using a face Surfaces application.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/826343003
This is a proof of concept for replacing ui/views
code with Sky instead. erg says this will allow him
to delete 10s of thousands of LOC from mojo.
Mojo does not yet expose the current binary's URL:
https://docs.google.com/a/chromium.org/document/d/1AQ2y6ekzvbdaMF5WrUQmneyXJnke-MnYYL4Gz1AKDos
So I've worked around that by passing the url
of the binary via the helper script.
I discovered several bugs in the wm_flow code
including that it doesn't handle view resizes
(during embiggen). Related, I discovered that
every time a new window is made it drops the
connections to the embedded.cc app from the
previous window, since the ViewManagerDelegate
is incorrectly implemented as part of the
ApplicationDelegate on both app.cc and embedded.cc.
We'd need to split out a separate per-view object
in both of those apps to handle the
ViewManagerDelegate calls.
There are some changes to logging during loading
as well as the CopyToFile helper to have better
error reporting. I hit several issues early on trying
to get mojo to load the http: urls correctly, including
eventually running out of disk space on my /tmp
and mojo then silently failing to launch the app
(due to mojo never clearing its caches crbug.com/446302).
I had to re-write the mojo_demo.sh script in python
as well as split the sky_server handling code out of
skydb into a separate python module in order to cleanly
launch sky_server. We could use a separate server
if we wanted to but the primary benefit of sky_server
is that it sets up the proper url->disk mappings into
the generated file directories, etc.
BUG=443439
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/817573003
Specs: Make the StyleValueResolverSettings have a safer API for use in
chains of StyleValues.
Other sundry minor changes.
Review URL: https://codereview.chromium.org/836193002