2320 Commits

Author SHA1 Message Date
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
Adam Barth
c64973deb6 AnimatedType should hit |end|
Some clients of AnimatedType watch for the |end| value to complete their work.
This CL ensures that we actually hit the end when t == 1.0.

Also, add a |distance| property to Offset.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1238573002 .
2015-07-13 16:09:39 -07:00
Eric Seidel
b7534eaae1 Fix typo in publish_apk.py
TBR=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1235813007 .
2015-07-13 15:29:53 -07:00
Hans Muller
0f7c0d6434 Example test for CardCollectionApp (Dismissable, VariableHeightScrollable)
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1238513003 .
2015-07-13 15:28:27 -07:00
Eric Seidel
6899a5e178 Update big_red_button instructions and add --dry-run mode.
I also made the add_argument blocks shorter by allowing more
than one named arg per line.  I removed the metavar lines
and action=store lines since one was only used in help messages
and the other was already matching the default for add_argument.

R=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1234803004 .
2015-07-13 15:24:54 -07:00
Eric Seidel
df1dadb8fc Add a git fetch before git reset --hard origin/master in big_red_button.py
TBR=johnmccutchan@google.com

Review URL: https://codereview.chromium.org/1235593003 .
2015-07-13 15:05:36 -07:00
Eric Seidel
a36e246cb4 Roll versions and add a new release_notes directory.
TBR=johhmccutchan@google.com

Review URL: https://codereview.chromium.org/1231413004 .
2015-07-13 14:52:15 -07:00
Eric Seidel
b2d4b2d2f2 Add a script for publishing an APK to the Play store.
Also added a confirmation to big_red_button.py and made
it executable.

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

Review URL: https://codereview.chromium.org/1233853006 .
2015-07-13 14:50:55 -07:00
Adam Barth
1a3adcafb7 Remove onFrame callback
Clients can just register persistent frame callbacks if they want to do some
processing every frame.  Also, add some more trace events.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1237623004 .
2015-07-13 13:43:27 -07:00
Adam Barth
b3c618b9d8 Roll Skia to 2ced78866fcadd98895777c8dffe92e229775181
The Skia rolls will continue until morale improves.

New version of SkMemory_new_handler.cpp from Chromium.

TBR=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1235863004 .
2015-07-13 13:20:23 -07:00
Adam Barth
a68126d95d Roll Skia to 7b971f0152299ae9a924252a9bfd220318497bdd
R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1236953002 .
2015-07-13 12:54:08 -07:00
Adam Barth
41bdeb7602 Reduce the quality of the blur in the material shadows
Using a high-quality blur takes a long time in Skia, and it's hard/impossible
to see the difference visually.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1241443002 .
2015-07-13 12:50:36 -07:00
Hans Muller
1f68f3851b Dismissable component
Lifted the code from the card_collection example.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1237713002 .
2015-07-13 12:43:56 -07:00
Adam Barth
29154f007a Add machinery for dumping SkPictures to disk
R=ianh@google.com

Review URL: https://codereview.chromium.org/1235813005 .
2015-07-13 12:36:12 -07:00
Hixie
50d089eb35 Remove redundant setState() calls around scroll behaviour updates.
We don't need to rebuild when those change; we only got the change because we rebuilt in the first place.

R=jackson@google.com

Review URL: https://codereview.chromium.org/1234863004 .
2015-07-13 12:05:54 -07:00
Eric Seidel
eaf7228fff Start an AddressBook example (to test text fields)
Also fixed a bug in tool_bar where not supplying a
center caused right not to be on the right.

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

Review URL: https://codereview.chromium.org/1234963002 .
2015-07-13 11:29:51 -07:00
Hixie
01c039bef4 Make changing themes work again.
The fix is just to call syncFields() after calling setParent(), not
before. This way makes more sense anyway.

Also, check in some debug tools I used to track this down, and
document some of the debug tools I used.

Also, minor fixes to style.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1231873007 .
2015-07-13 11:13:43 -07:00
Hixie
67f85e35ba Trivial code style changes in animation code.
R=mpcomplete@chromium.org

Review URL: https://codereview.chromium.org/1232403004 .
2015-07-13 11:11:19 -07:00
Adam Barth
989aea10fc Reduce the number of temporary Paint objects
Now we cache Paint objects for ColorFilter and Opacity, which gives Skia a
chance to retains the underlying GPU resources.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1235813004 .
2015-07-13 11:10:48 -07:00
Hixie
e842fb58d9 Rearrange code in widget.dart StatefulComponent to be more like the order in which it actually runs.
This will make the diff of a subsequent CL much cleaner.

TBR=abarth

Review URL: https://codereview.chromium.org/1231623007 .
2015-07-13 10:52:25 -07:00
Adam Barth
522f66eed7 Remove createNewDisplayList from RenderTransform and RenderInkWell
Creating a new display list is having an unexpected effect on the GPU
rasterization times. This CL removes createNewDisplayList from RenderTransform
and RenderInkWell until we have a better understanding of when we want to use
it.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1223063005 .
2015-07-13 09:58:36 -07:00
Adam Barth
c536e3903a Use package:sky imports consistently
Apparently this style is recommended by Dart developers.

TBR=ianh@google.com

Review URL: https://codereview.chromium.org/1232313002 .
2015-07-11 21:37:29 -07:00
Adam Barth
cf9d24b75d Fix some info-level warnings from Dart analyzer
TBR=eseidel@google.com

Review URL: https://codereview.chromium.org/1226103013 .
2015-07-11 11:23:48 -07:00
Hans Muller
63318886a0 Move VariableHeightScrollable to sdk/lib/widgets
Added a callback to BlockViewport so that the scrollable can
stay in sync with the viewport's contents.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1227823012 .
2015-07-10 17:13:26 -07:00
Hixie
442c55b4c4 Make the drawer, popup menus, dialogs, and settings page scrollable.
Also, fixes the stocks list to work properly including hit testing at
the bottom of the screen.

New classes:

RenderViewport: a class that supports positioning a child inside
itself and offsetting it.

Viewport: a RenderObjectWrapper that wraps RenderViewport.

ScrollableViewport: a Component that hooks Viewport up to some
scrolling behaviour.

Code changes:

RenderBlock now only works when it has an unbounded height constraint.
I removed the clipping in there since it's no longer needed.

I made FixedHeightScrollable use Viewport instead of hand-rolling its
clipping with Transform and Clip. This is what fixes the stocks list
hit testing at the bottom of the screen.

I made anywhere that used to use Block now use ScrollableViewport.

RenderFlex now takes a list of children.

Justifications for test changes:

tests/examples/stocks: changing FixedHeightScrollable to use a
RenderViewport instead of a RenderClipRect/RenderTransform combination
removes the use of an actual transform.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1223153004 .
2015-07-10 16:54:19 -07:00
Hixie
56ef46312f Remove "RenderBlock" class from examples that use it without giving it unrestricted height.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1232063006 .
2015-07-10 16:31:27 -07:00
Collin Jackson
09a82d4935 Add new initState method to widget, rename animated_container to animation_builder and refactor it. This fixes the background color of the settings page.
R=abarth@chromium.org, abarth, mpcomplete

Review URL: https://codereview.chromium.org/1233703003 .
2015-07-10 16:27:17 -07:00
Adam Barth
688a084e86 Switch scroll physics over to using newton
The scroll physics was the last client of the old frame generator. With this
change, we've fully switched over to the new animation system.

R=chinmaygarde@google.com

Review URL: https://codereview.chromium.org/1226133004 .
2015-07-10 15:48:03 -07:00
Hixie
93a94f315b Put back the setter being used by the test harness...
TBR=abarth

Review URL: https://codereview.chromium.org/1232483004 .
2015-07-10 15:33:51 -07:00