37998 Commits

Author SHA1 Message Date
Adam Barth
193b416232 SkyShell should implement the rest of dart:sky.internals
R=ianh@google.com

Review URL: https://codereview.chromium.org/1199243003.
2015-06-23 09:49:03 -07:00
Adam Barth
d86ee245ef Silence some analyzer warnings
These warnings were added in the previous CL because we started added a URL
mapping for dart:mojo.internal.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1207453003.
2015-06-23 08:19:54 -07:00
Adam Barth
1b162a56dc Move internals.dart out of Sky SDK
This file doesn't belong in the SDK because it is an implementation detail of
the Sky engine. Instead, this CL moves the code for dart:sky.internals into the
snapshot. This CL is a step towards merging dart:sky.internals with dart:sky,
which also resides in the snapshot.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1200953007.
2015-06-23 07:44:28 -07:00
Adam Barth
be5a54bc4f Make sky/tools/packager build on Mac
This CL removes all C++11 library features from sky/tools/packager because we
can't use C++11 library features on Mac.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1198313004.
2015-06-23 07:41:52 -07:00
Adam Barth
9c97ffd89c Expose the asset_bundle service in SkyShell
The plan is to use this service for game assets and offline assets.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1193763004.
2015-06-22 21:32:48 -07:00
Collin Jackson
900cb7feeb Add Material light and dark themes to Sky widgets
R=ianh@google.com, hixie

Review URL: https://codereview.chromium.org/1204523002.
2015-06-22 17:14:27 -07:00
Eric Seidel
6e87bac4c5 Make the buttons on home.dart fill the screen width again
R=ianh@google.com

Review URL: https://codereview.chromium.org/1197203004.
2015-06-22 17:13:47 -07:00
Eric Seidel
45c57ada22 Replace Sector Layout demo with widgets/sector.dart
The widgets flavor is slightly fancier.

R=ianh@google.com, jackson@google.com

Review URL: https://codereview.chromium.org/1196353002.
2015-06-22 15:56:41 -07:00
Hixie
8e82f76119 Add more details to how to debug with gdb.
TBR=eseidel

Review URL: https://codereview.chromium.org/1196223004.
2015-06-22 15:01:13 -07:00
Hixie
4c23f55bc4 Fix mojodb to use the new sky_server API also.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1199063002.
2015-06-22 14:28:41 -07:00
Hixie
a760718570 Update README.md and HACKING.md and resulting yak shave.
Update sky_server:
 - update its help string to admit that it wants the package path as well.
 - be quiet by default, since it makes the build chatty.
 - have a -v for verbose mode, for people who like it chatty.
 - have a default port of 8000, since that's what everyone used.
 - have a -p option to set the port, for people who don't use the default.
 - remove its mapping for gen/, since a TODO told me to.
 - remove the dependency on the build configuration, since it's no longer used.
 - teach it about .dart files.
 - rename sky_server/README to README.md, for consistency with other READMEs.
Update shelldb to speak the new sky_server protocol.
Update tests/services/iframe-embed-vmc.sky since the sky_server change broke the hack it was using.
Update skyserver.py to speak the new sky_server protocol.
Make webkitpy use SkyServer instead of spawning sky_server itself, since a TODO told me to.
Teach webkitpy about dart files.
Teach test_perf about dart files. (untested)
Teach sky_tool about main.dart, main.sky is deprecated. (untested)

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1200993002.
2015-06-22 13:39:16 -07:00
Eric Seidel
6e9c30bfd8 Remove home.sky, update home.dart
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1204483002.
2015-06-22 13:13:27 -07:00
Hixie
e7696e23a3 Factor out the analyzer part of shelldb so we can reuse it in tests.
This also introduces a new set_build_dir command to shelldb so you can
set the build directory without starting sky.

R=abarth@chromium.org, abarth, eseidel

Review URL: https://codereview.chromium.org/1193733004.
2015-06-18 16:54:52 -07:00
Hans Muller
a38f8b65ac StyledText is just a convenient way to specify a
tree of InlineStyle and InlineText elements.
StyledText builds an Inline that renders the tree.

For example this StyledText object:

  new StyledText(["FOO", [boldLargerStyle, [greenStyle "BAR"], "BAZ"] BORF]);

Renders the same way the following HTML would,
assuming that TextStyles boldLargerStyle and
greenStyle were defined.

<style>
div {
  display: inline;
}
</style>
<p>
  <div>
    FOO
    <div style="font-weight:bold; font-size:larger">
      <div style="color:green">
        BAR
      </div>
      BAZ
    </div>
    BORF
  </div>
</p>

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1194693002.
2015-06-18 14:35:11 -07:00
Hixie
d44912aa00 Rename editing2/ and theme2/ to editing/ and theme/.
Flesh out a README.md file for the SDK.
Make the stocks app test wait for the app to be mounted, to catch some more errors, like typos in the mount callback.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182053012.
2015-06-18 12:44:10 -07:00
Adam Barth
35c33aeb08 Don't crash if you call document.createText(null)
Fixes #165.

R=jackson@google.com, jackson@chromium.org

Review URL: https://codereview.chromium.org/1196463002.
2015-06-18 12:17:05 -07:00
Adam Barth
694c57b76c Demonstrate that we don't crash on a bogus import
Fixes #167

R=ianh@google.com

Review URL: https://codereview.chromium.org/1193713002.
2015-06-18 12:13:31 -07:00
Matt Perry
64a2530c44 Add a Paint::toString() method to describe our Paint objects.
Add a test for RenderDecoratedBox sets up the Paint object correctly.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1185423003.
2015-06-18 13:47:28 -04:00
Adam Barth
548c2b873b If Color constructor is passed a value > 0xFFFFFFFF, Sky crashes
We now ensure the color is <= 0xFFFFFFFF.

Fixes #245

R=ianh@google.com

Review URL: https://codereview.chromium.org/1179413008.
2015-06-18 10:32:26 -07:00
Hixie
6ccd43f39b Rename AppView to SkyBinding.
Move app/view.dart to rendering/sky_binding.dart since it's part of the RenderObject API, really (it knows about RenderView intimately).
The tests pass. I didn't check every last example.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1183913006.
2015-06-17 17:07:31 -07:00
Hixie
05e99c74d3 Add a test for the sector app.
This also moves the test for stocks into a new tests/examples/
directory, where we can put tests that test the examples.

TBR=abarth

Review URL: https://codereview.chromium.org/1182223004.
2015-06-17 15:44:20 -07:00
Hixie
98b91daaa7 Clean up the tests to be more maintainable.
- removes the unit testing framework from tests that don't use it
- use 'async' where that makes the code less convoluted

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1192003003.
2015-06-17 15:10:06 -07:00
Hixie
7de9c4b795 Clean up how we remove nodes from the render tree, and make sure we reinsert them in the right place.
Fixes weird behaviours when the old and new children of TagNodes can't be synced.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1182463006.
2015-06-17 13:56:06 -07:00
Adam Barth
b18583f0af Settings menu item in stock2 doesn't work
The underlying problem is that we lacked a RenderObjectWrapper for the
RenderView, which meant we couldn't handle changing the RenderObject that was
the root of the RenderView. This CL introduces a RenderViewWrapper and uses it
in a new AppContainer widget root. This change allows us to make App a
non-magical Component that is inserted into the AppContainer in the newly
introduced runApp function.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1184823006.
2015-06-17 12:36:56 -07:00
Hans Muller
b7bc781a72 Fix a typo in Dialog
If action: was specified, content: was added twice.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1188303002.
2015-06-17 10:06:44 -07:00
Chinmay Garde
5c1d903644 Add temporary workaround for boringssl attempting to access the auxillary vector
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1185813005.
2015-06-16 17:16:04 -07:00
Adam Barth
f1193d37bd Add a basic Dialog
The dialog will need many more features to be complete, but this class is a
basic skeleton of what we'll need.

R=jackson@google.com, jackson@chromium.org

Review URL: https://codereview.chromium.org/1189893002.
2015-06-16 17:11:23 -07:00
Adam Barth
3fa0816576 Add some basic tests for the material buttons
Specifically, RaisedButton, FlatButton, and FloatingActionButton. These just
test that these classes work in their default configurations.

R=ianh@google.com, jackson@chromium.org

Review URL: https://codereview.chromium.org/1193453005.
2015-06-16 17:02:58 -07:00
Chinmay Garde
c0b4ef6b14 iOS: Wire up all gesture types in input_event.mojom
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1183833004.
2015-06-16 13:17:17 -07:00
Chinmay Garde
b5e905668b Fix offscreen rendering on iOS by not assuming that the default window bound framebuffer is 0
BUG=
R=iansf@google.com

Review URL: https://codereview.chromium.org/1183213007.
2015-06-16 09:51:34 -07:00
Hixie
d89214f5ed Create an example app that demonstrates interactive coordination of an fn tree and a raw RenderObject tree.
Sector changes:
- implement the intrinsic sizing box API on RenderBoxToRenderSectorAdapter
- remove some debug print statements
- fix getIntrinsicDimensions() on RenderSolidColor to return true values
- factor out the default demo

RenderObject changes:
- BoxConstraints.isInfinite() now returns true only if both dimensions are infinite

fn changes:
- implement UINodeToRenderBoxAdapter
- rename RenderObjectToUINodeAdapter to RenderBoxToUINodeAdapter

Tests:
- add a test for sector layout
- make TestRenderView support being run without the unit test framework

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175423007.
2015-06-16 09:28:59 -07:00
Adam Barth
8887090320 Update Dart dependency and patch dart_controller to account for non-backwards compatible API update
Patch originally by chinmaygarde.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1185233002.
2015-06-15 18:34:27 -07:00
Hixie
6db8f15d3c Remove RenderSizedBox.
Make old users of RenderSizedBox use RenderConstrainedBox.
Change the semantics of BoxDecoration.apply* to actually apply the provided constraints to the current constraints, rather than the previous behaviour of merging them neutrally.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1189603003.
2015-06-15 15:51:56 -07:00
Chinmay Garde
1f1946c798 Fix iOS builds after ShellView refactor on Android
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1188633002.
2015-06-15 15:10:48 -07:00
Adam Barth
a00acffecd Don't build sky_packager on Mac hosts
sky_packager requires C++11 and the Mac host toolchain can't handle C++11.

R=cstout@chromium.org, cstout@google.com

Review URL: https://codereview.chromium.org/1183223003.
2015-06-15 15:04:53 -07:00
Viet-Trung Luu
fb3ef8d2e6 Fix sky/tools/packager/BUILD.gn.
scopes.h -> scope.h.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177123005.
2015-06-15 11:16:17 -07:00
Adam Barth
e083c7aa6b Introduce sky_packager
sky_packager is a tool that generates a Dart script snapshot for Dart files
intended to run with dart:sky. I plan to use this tool to experiment with
startup performance.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1178213003.
2015-06-15 10:42:17 -07:00
Adam Barth
d8aa572812 Rename all the things
This CL moves the bulk of the SkyView code out of the |framework| directory
because the |framework| directory was redundant in Dart package import
declarations.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1177383006.
2015-06-13 09:46:52 -07:00
Adam Barth
464fb27381 Rename widgets/wrappers.dart to widgets/basic.dart
Although the basic widgets are wrappers, that's an implementation detail and
shouldn't be encoded in the name of the library.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1182983002.
2015-06-12 22:16:48 -07:00
Adam Barth
ff9b0b092c Port sky_home to the new SkyView world
R=ianh@google.com, eseidel@chromium.org

Review URL: https://codereview.chromium.org/1178293004.
2015-06-12 16:53:29 -07:00
Roozbeh Pournader
072167f797 Merge "Use ASCII HYPHEN-MINUS when there's no HYPHEN in the font." into mnc-dev 2015-06-12 22:30:03 +00:00
Roozbeh Pournader
48e52a29af Use ASCII HYPHEN-MINUS when there's no HYPHEN in the font.
Previously, we just assumed the font in use had a U+2010 HYPHEN
character, resulting in a tofu (or an empty space) being shown when
U+2010 was not supported in the font used to render the hyphenated
word.

Now we try to fallback to U+002D HYPHEN-MINUS, which has a very good
chance of being available in at least any Latin font.

We still show a tofu when neither character is supported, to
intentionally alert that something is missing.

Bug: 20497913
Bug: 21088552
Bug: 21570828
Change-Id: Iff69bbc38836c03495e9124502b5207c39270da2
2015-06-12 15:23:10 -07:00
Raph Levien
6e2c0e826e Merge "Increase hyphenation penalty for short last line" into mnc-dev 2015-06-12 21:59:05 +00:00
Eric Seidel
f3c036dd64 Use drawable_xxhdpi instead of 2x_web
This makes the icons look nicer on the Nexus 5

I briefly played with trying to figure out which drawable_*
to use dynamically, but I couldn't seem to write a reasonable
solution which worked on both Desktop and my Nexus 5, leading
me to believe I didn't understand how it should work and just
went with xxhdpi for now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1186633003.
2015-06-12 13:50:03 -07:00
Adam Barth
eeb8dd457c Add the ability for Sky content to trigger Android intents
We can use these intents to move the demo launcher to the new world.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187583002.
2015-06-12 13:43:01 -07:00
Adam Barth
fce1c80fa0 Refactor SkyShell to allow multiple SkyViews
This CL separates the view-specific state from the process-global state. The
view-specific state now lives on Instance rather than Shell.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187503003.
2015-06-12 13:29:53 -07:00
Ian Fischer
6ae9de09f9 Add a new target, sky_apk, that builds a minimal subset of the tree for creating working sky demo apks.
R=abarth@chromium.org, abarth@google.com

Review URL: https://codereview.chromium.org/1181893002.
2015-06-11 16:35:12 -07:00
Hixie
6c121f9a97 Make it possible to test that the stock app doesn't crash on startup and paints the basic scaffold more or less correctly.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177043008.
2015-06-11 15:36:40 -07:00
Eric Seidel
bdd3313417 Update paths in sky_home.dart
I also removed the leading /, so it is now possible
to use shelldb start sky/sky_home to test.

Also fixed touch_demo.dart and sector layout to
work and not crash.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1177343002.
2015-06-11 15:17:12 -07:00
Adam Barth
61873d7590 Wire up Android back button in SkyShell
The back button now triggers an event of type |back|.

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

Review URL: https://codereview.chromium.org/1176373004.
2015-06-11 14:33:01 -07:00