20087 Commits

Author SHA1 Message Date
Przemyslaw Pietrzkiewicz
ab9720d6cb Cut the spam in the sky log printouts.
This is a port of
f61746083f
.

This patch eliminates the tag "[0708/123945:INFO:builtin_natives.cc(86)]
CONSOLE" prefixing each message in sky log Android output by
implementing the Android logging directly, ie. without base LOG macros.

The log message is now written directly to stdout on Android as well as
on Linux and iOS, and is also written to android logcat tagged as
"chromium", which is the tag we use to pick up native LOG messages from
the logcat when running on unrooted device.

A user running `mojo_shell.py --sky` on a rooted device will now see:

  hello

instead of

  [0715/174636:INFO:builtin_natives.cc(86)] CONSOLE: hello

A user running `mojo_shell.py --sky` on unrooted device will now see:

  I/chromium(29585): hello

instead of

  I/chromium(26587): [0715/174636:INFO:builtin_natives.cc(86)] CONSOLE: hello

Fixes #317.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1237403002 .
2015-07-16 18:19:01 +02:00
Przemyslaw Pietrzkiewicz
9ace5ba7c7 Update sky HACKING.md instructions to use mojo_shell.py.
See #238.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1242453002 .
2015-07-16 17:08:16 +02:00
John McCutchan
eb2cef413d Port more String and HashMap usages
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1237973004 .
2015-07-16 07:30:56 -07:00
Eric Seidel
3fff8ce303 Make skyx files for fitness and cards actually build
TBR=jackson@google.com

Review URL: https://codereview.chromium.org/1229423003 .
2015-07-15 16:37:42 -07:00
Eric Seidel
df2711620f Add Cards and Fitness demos, remove sector.
The launch cards still need to be made nicer.

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

Review URL: https://codereview.chromium.org/1232103006 .
2015-07-15 16:31:24 -07:00
Roozbeh Pournader
cdd19dadd1 Use ICU to lowercase words to hyphenate.
Previously, the standard C tolower() function was used, which
didn't support any characters beyond the basic ASCII letters.

Bug: 22506121
Change-Id: Ibb81121caa29be44fbb59aa98891e9faafc57592
2015-07-15 16:31:07 -07:00
Eric Seidel
30cdf9997e Make the Cards in DemoLauncher.apk splash on touch.
R=abarth@chromium.org, jackson@google.com
BUG=

Review URL: https://codereview.chromium.org/1237693008 .
2015-07-15 15:55:14 -07:00
Chinmay Garde
93006a03d4 Minor sky/engine updates for Mac target
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1241673004 .
2015-07-15 14:11:58 -07:00
Matt Perry
9a2f2a5f4f Add support for "flinging" the animation timeline with a spring force. So far,
Drawer uses this when you fling it.

I refactored Timeline to be based on AnimatedSimulation. When playing normally,
we use a TweenSimulation, which just gives values linearly in a range. You can
optionally replace this simulation with one of your choice (in Drawer's case, a
SpringSimulation).

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1233653003 .
2015-07-15 14:07:42 -07:00
Collin Jackson
cb86e621f9 Wire up popup menus to back button
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1237213003 .
2015-07-15 13:40:38 -07:00
John McCutchan
781413c925 Remove some HashMap
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1228353005 .
2015-07-15 13:01:09 -07:00
Adam Barth
7ca2e4fb10 Improve drawer performance
- Instead of using a ColorFilter or an Opacity widget to colorize the Icons,
   add a ColorFilter parameter it the image classes. This avoids needing to
   call saveLayer for each DrawerItem.
 - Ask Android for unbuffered input events to avoid bad synchronization with
   vsync.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1236043004 .
2015-07-15 11:07:53 -07:00
Adam Barth
4ce0e4386d Use @android:style/Theme.Black.NoTitleBar to avoid white flash
Using this theme appears to remove the white flash during startup.

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

Review URL: https://codereview.chromium.org/1240433004 .
2015-07-15 11:06:16 -07:00
Roozbeh Pournader
daf62d0eef Add missing hyphen-like characters.
This adds various hyphen-like characters missed in the previous
patch, that should disallow automatic hyphenation of words containing
them.

Bug: 22484266
Change-Id: Ie972cb50384dbe0aa1ab5ec50286b75f9877953a
2015-07-15 10:59:59 -07:00
John McCutchan
7bef123648 Remove #include of RefPtr in dart_state.h
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1235063005 .
2015-07-15 09:11:23 -07:00
John McCutchan
c60c99bfcb Remove most usage of Vector
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1237973002 .
2015-07-15 09:10:40 -07:00
Adam Barth
05049ac6e4 Convert Dismissable over to using animated subcomponents
R=hansmuller@chromium.org, mpcomplete@chromium.org, mpcomplete@google.com

Review URL: https://codereview.chromium.org/1228803008 .
2015-07-14 22:32:37 -07:00
Adam Barth
ce0b58e068 Simplify the Drawer animation
Instead of using AnimationBuilder, this CL has the Drawer just
use the animations system directly.

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

Review URL: https://codereview.chromium.org/1234073005 .
2015-07-14 20:32:54 -07:00
Hans Muller
05cd2e92ab Correct bottom overscroll in VariableHeightScrollable
Also updated the createDefaultScrollSimulation()
springConstant and drag parameters to make
non-overscroll fling scrolls slowdown faster and
overscrolls snap back into place a little more
snappily.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1241733002 .
2015-07-14 15:36:42 -07:00
Hixie
64c5420007 Remove Animations and Transitions.
And all related CSS properties.
And page transitions, whatever those are.
And will-change.
And page visibility.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1229273004 .
2015-07-14 15:07:35 -07:00
Adam Barth
0a0c36a4df Polish the menu animation
- Delay the close of the menu by the appropriate amount.
 - Fade the menu items for equal amounts of time.
 - Contract the height of the menu just after each item fade.

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

Review URL: https://codereview.chromium.org/1223113004 .
2015-07-14 13:56:34 -07:00
Adam Barth
ef34605122 Update test after removing Material from Scrollable
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1233743003 .
2015-07-14 13:54:44 -07:00
Adam Barth
0ccd25a43d Make the popup menu width animation work
Previously, the scrollable classes were adding a material, which created a
background that obscured the menu background. This CL removes that background
and improves the animation parameters for the popup menu.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1235233004 .
2015-07-14 13:19:11 -07:00
Eric Seidel
fcf3eb5478 Add an AspectRatio widget for doing proportional height sizing
This is needed for Material Design since rich media is supposed
to be displayed as 16:9 when possible.

http://www.google.com/design/spec/components/cards.html#cards-content-blocks

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

Review URL: https://codereview.chromium.org/1227093010 .
2015-07-14 13:17:55 -07:00
Adam Barth
722bde6a8e Use AnimationVariables to drive PopupMenu animation
R=mpcomplete@chromium.org, mpcomplete@google.com

Review URL: https://codereview.chromium.org/1241703003 .
2015-07-14 13:10:30 -07:00
Roozbeh Pournader
baf6d0a41f Avoid re-hyphenating already-hyphenated phrases.
Previously, automatic hyphenation blindly took almost every line
breaking opportunity as a word break, so words like "low-budget" were
treated as two separate words, "low-", and "budget", each
automatically hyphenated.

This patch makes sure the subwords in already-hyphenated phrases are
not passed to the automatic hyphenator, while keeping the possibility
of a potential line break where a hyphen already exists.

Bug: 22484266
Bug: 22287425
Change-Id: Ie46dbdd70e993d64a9b9cf44b4ae93b21459dbc2
2015-07-14 13:04:49 -07:00
Collin Jackson
00aa68c787 Support for anonymous state routes
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1231753008 .
2015-07-14 12:53:38 -07:00
Collin Jackson
d51e68beb4 Delete drawerController and make drawer handle back behavior natively
R=abarth@chromium.org, abarth

Review URL: https://codereview.chromium.org/1232673003 .
2015-07-14 11:51:45 -07:00
John McCutchan
1789fc85bf Update Dart SDK to 1.12.0-dev.3.1
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1229953008 .
2015-07-14 11:34:03 -07:00
Adam Barth
80325c9693 Add a timeDilation factor for debugging
R=ianh@google.com

Review URL: https://codereview.chromium.org/1235153005 .
2015-07-14 11:10:28 -07:00
Adam Barth
273e282554 Make it possible to detect PopupMenuItem presses
R=ianh@google.com

Review URL: https://codereview.chromium.org/1240573007 .
2015-07-14 10:58:35 -07:00
Hixie
29d2362963 We can't use block when we have constrained space anymore. Use Flex instead.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1230053005 .
2015-07-14 10:52:49 -07:00
Adam Barth
fdeb7b670a Remove PopupMenuController
Rather than using a controller, the PopupMenu now takes input via its
constructor. I'm not 100% happy with PopupMenuStatusChangedCallback, but we can
continue to iterate.

Also, fix the positioning of the menu to be correct.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1234063003 .
2015-07-14 10:44:44 -07:00
Hixie
3394d215c5 Provide some debug-mode time hooks to visually debug painting and layout.
There's four hooks: one draws a teal box around the size, one draws a
green line and an orange line at the alphabetic and ideographic
baselines, and one clips at the paintBounds.

I also implemented Rect.shift() and Rect.inflate() to adjust Rects in
various ways that were helpful while developing this.

The baseline logic now lets you ask for the baseline _without_ the
no-baseline adjustment, in case you only care about the baseline when
there is a real one.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1233623007 .
2015-07-14 10:19:29 -07:00
Hixie
7337284e0b syncFields() should not sync something you set up in initState(). They are separate concepts.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1233143004 .
2015-07-14 10:12:19 -07:00
Adam Barth
7249a7f0cc Remove last use of Platform::networkService()
I forgot to remove the virtual function in Platform.h and missed two clients of
this function. This CL switches those clients to keep their own network service.

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

Review URL: https://codereview.chromium.org/1230113006 .
2015-07-14 09:41:48 -07:00
Hixie
b9cd4007e6 Silence analyzer by explicitly casting the parent to the class we know it is.
TBR=abarth

Review URL: https://codereview.chromium.org/1234093002 .
2015-07-14 09:20:07 -07:00
Adam Barth
1a8304ec9a Delete //sky/services/platform
There's no longer any code to share in this library. Instead, inline the one
trival class into both //sky/shell and //services/sky.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1237043002 .
2015-07-14 00:21:34 -07:00
Adam Barth
1949505fc9 Remove //sky/engine/platform/network
This code is all dead. Instead, we use Mojo directly from Dart to access the
network.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1239633002 .
2015-07-13 23:39:48 -07:00
Adam Barth
2fcca60b6b Move sky_viewer into services/sky
Moving sky_viewer into services/sky is more consistent with how all the other
content handlers (e.g., dart, js, nacl, pdf, python) are organized.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1235093002 .
2015-07-13 23:03:19 -07:00
Adam Barth
f55e45a859 Remove //sky/tools/tester
This target is unused.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1235053003 .
2015-07-13 22:18:01 -07:00
Adam Barth
7ce0501a7e Remove some unneeded DEPS from //sky
We no longer actually need to depend on this code. It's cleaner if we don't
list these dependencies.

TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1229113003 .
2015-07-13 22:17:23 -07:00
Hixie
97c4fc80df Make all the classes in basic.dart use consistent style.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1239573002 .
2015-07-13 17:38:22 -07:00
Hixie
a544743ee6 Let the analyzer tell you if you've failed to override these methods by making them abstract instead of having them default to assert(false) or zero.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1235813006 .
2015-07-13 17:38:05 -07:00
Hixie
b187fe6269 Various and sundry stylistic changes to auto_layout.dart.
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1227163014 .
2015-07-13 17:37:45 -07:00
Hixie
41a3852dc8 Avoid drawing an extra row when the number of rows that fit on the screen is integral.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1232083006 .
2015-07-13 17:35:35 -07:00
Adam Barth
692095b56c Rename watchPerformance to watch
Now that we don't have the old animation system, we can use the shorter name
again. Also, move state initialization code into initState().

R=ianh@google.com

Review URL: https://codereview.chromium.org/1231103005 .
2015-07-13 17:17:48 -07:00
Adam Barth
6501df756e Remove unused imports
TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1238603002 .
2015-07-13 16:57:16 -07:00
Adam Barth
61aa51fa6c Rename MenuItem to DrawerItem
.. and MenuDivider to DrawerDivider. These widgets are specific to Drawer.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1233983002 .
2015-07-13 16:55:59 -07:00
Adam Barth
ef1a3ec876 Improve drawer menu items
- Use a separate selected and highlight color (now part of ThemeData)
 - Colorize the icon of the selected menu item

R=ianh@google.com

Review URL: https://codereview.chromium.org/1241483002 .
2015-07-13 16:50:05 -07:00