37534 Commits

Author SHA1 Message Date
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
Eric Seidel
7698f73790 Move sky_home.* from domokit.github.io into our repo
This makes it easier to keep sky_home links working.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1185473002.
2015-06-11 14:22:34 -07:00
Eric Seidel
43b495c511 Teach roll_versions.py how to update CHANGELOG.md files.
This is feature creep.  But it was simple and fun. :p

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1175393002.
2015-06-11 12:48:33 -07:00
Hixie
45730d5e82 Refactor fn2.dart, since it breached our 1000-line threshold.
This moves input.dart to editing2/, since that way we can define the layering as strictly unidirectional.
It also reorders a bunch of imports to fit the style guide.
I removed the old remnants of the widgets example, and put the fn2 examples into the examples/widgets/ directory, to parallel the framework directory names.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1177243002.
2015-06-11 10:26:11 -07:00
Viet-Trung Luu
a3ec157769 Update from https://crrev.com/333737
* Cherrypick crrev.com/333293 (freetype -> freetype-android).
* Update mojo/go/go.py to use android-16 (NDK API level 16), which is
  4.1 (first Jelly Bean). Chromium dropped support for 14.
* TODO (separately): also update tools/go/upload.py and upload new
  binaries?
* Roll android_tools (to match Chromium).
* Small fixes to match //base changes: base::ObserverList, TraceConfig,
  ThreadTicks, etc.
* Restore build/ls.py (and add it to the list of files to not roll).
* Remove the dependency on third_party/instrumented_libraries.
* Add "enable_topchrome_md = false" to build/config/ui.gni.
* Add build/config/ui.gni to files_not_to_roll in
  update_from_chromium.py. (We should probably get rid of the use_glib
  variable/argument, and others as well.)
* Remove mojo/tools/roll/{roll_network_service.py,
  roll_network_service_patches/network_service.patch}. These are for
  rolling from Chromium, whereas we now have/use monet.
* Roll buildtools (to match Chromium).
* Modify sanitizer gn/gni files to make it work (patch included).
  (Maybe the patch even works -- I haven't checked.)

TBR=rockot@chromium.org,jamesr@chromium.org,rogulenko@google.com

Review URL: https://codereview.chromium.org/1180693002.
2015-06-11 10:01:25 -07:00
Hixie
ff34b29fff Spinning Square example for the RenderObject API.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1178783002.
2015-06-10 17:27:49 -07:00
Adam Barth
55b1e79bbe Stop SkyShell from crashing on startup
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1178773002.
2015-06-10 17:17:39 -07:00
Chinmay Garde
2101e26e19 sky/shell updates for Android and iOS
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1169983005.
2015-06-10 16:19:49 -07:00
Eric Seidel
dc70797319 Add a roll_versions.py script and roll versions once.
This isn't perfect, since it makes non-minimal modifications
to the yaml and xml files.  In the yaml case it sorts the keys
and in the xml case it doesn't do the fancy attribute wrapping,
but this seems good enough to use.

R=abarth@chromium.org, johnmccutchen@google.com

Review URL: https://codereview.chromium.org/1179633003.
2015-06-10 16:16:52 -07:00
Chinmay Garde
6c7ef3c2da Basic Sky shell for iOS targets
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1171573002.
2015-06-10 16:14:39 -07:00
Hixie
b86de0a094 Move spinning_arabic.dart to the raw/ examples directory for consistency with the others.
R=eseidel@chromium.org, eseidel

Review URL: https://codereview.chromium.org/1180623003
2015-06-10 16:07:12 -07:00
Adam Barth
3cb8a4f6a2 Rename BlockContainer, StackContainer, and FlexContainer
These are now called Block, Stack, and Flex, respectively. Less verbose.

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

Review URL: https://codereview.chromium.org/1181533002.
2015-06-10 15:34:30 -07:00
Adam Barth
3845545456 Ink splashes should start at the touch point
Previously, they always started at the center of the RenderInkWell. Now we
remember the local coordinates we computed during the hit test and provide that
information when handling the event.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1180553002.
2015-06-10 13:55:20 -07:00
Eric Seidel
b776c23f61 Fix Sky not to crash when clicking the Home button.
Fixes https://github.com/domokit/mojo/issues/212

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1173153002.
2015-06-10 13:20:41 -07:00
Collin Jackson
cc4655f926 Extend Sky's RenderFlex with intrinsic sizes and compute cross-size height
Renders interactive_flex and stocks demos fine. Could use more testing,
so I'm going to work on that after I land this.

R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1173493003
2015-06-10 10:11:58 -07:00