Commit graph

546 commits

Author SHA1 Message Date
Hixie a50b065197 Fix the crash when going to settings after showing the popup menu.
If your constraints are tight when you get laid out, you don't get a
relayout subtree root.

If you don't have a relayout subtree root, and you get marked dirty,
you go through layoutWithoutResize() rather than layout(), so we don't
get a parentUsesSize.

If you're not dirty and your constraints didn't change, layout() skips
your layout.

So then if your initial layout had parentUsesSize:true, and then you
got marked dirty directly, you would set your size with
parentCanUseSize=false, and then later if your parent tried to lay you
out then read your size, it would crash because your size wasn't set
up to allow you to get your size.

The fix is to actually remember the last setting of parentUsesSize,
even in the case of the constraints being tight and you later being
marked as needing layout directly.
2015-07-22 10:10:58 -07:00
Adam Barth 3d0b82eb86 Use a null LayoutCallbackBuilderHandle in Release 2015-07-22 10:02:00 -07:00
mpcomplete 2c84154b75 Merge pull request #211 from mpcomplete/rm.builder.3
Make SnackBar animate itself.

This introduces a bit of a regression - the FloatingActionButton no longer animates. I'm not sure yet how to animated the FAB along with the SnackBar. Maybe some notion of anchoring a node to another.

Also remove last use of AnimationBuilder.
2015-07-22 12:29:57 -04:00
Hixie 74575775bd Introduce an explicit Key type.
This fixes some theoretical bugs whereby we were using hashCode to try
to get unique keys for objects, but really we wanted object identity.
It also lays the groundwork for a new GlobalKey concept.

I tried to keep the impact on the code minimal, which is why the "Key"
constructor is actually a factory that returns a StringKey. The code
has this class hierarchy:

```
   KeyBase
    |
   Key--------------+---------------+
    |               |               |
   StringKey    ObjectKey       UniqueKey
```

...where the constructors are Key and Key.stringify (StringKey),
Key.fromObjectIdentity (ObjectKey), and Key.unique (UniqueKey).

We could instead of factory methods use regular constructors with the
following hierarchy:

```
   KeyBase
    |
   LocalKey---------+---------------+
    |               |               |
   Key      ObjectIdentityKey   UniqueKey
```

...with constructors Key, Key.stringify, ObjectIdentityKey, and
UniqueKey, but I felt that that was maybe a more confusing hierarchy.
I don't have a strong opinion on this.
2015-07-22 09:14:06 -07:00
Viktor Lidholt bb0c8bb13e Merge pull request #202 from vlidholt/master
Fixes issues with invalidating matrix for SpriteBox & adds HUD to demo game
2015-07-22 09:01:39 -07:00
Viktor Lidholt 6a6567d776 Fixes formatting and removes redundant code in sprites 2015-07-22 08:59:14 -07:00
Matt Perry 371ef4542b Material animates over 200ms 2015-07-22 11:55:38 -04:00
Matt Perry b31e06a5d6 Make SnackBar animate itself. 2015-07-22 11:53:57 -04:00
Matt Perry 839e997e78 rebase 2015-07-22 11:52:34 -04:00
Ian Hickson b215e4d6c0 Merge pull request #205 from Hixie/minedigger
Many code improvements to Mine Digger.
2015-07-22 08:23:55 -07:00
Adam Barth 136b2709c8 Merge pull request #208 from abarth/fix_type
Fix type error found by dartanalyzer --strong
2015-07-22 07:29:32 -07:00
Adam Barth 9fd0be564b Update README.md
Grammar
2015-07-21 22:49:00 -07:00
Adam Barth bb8b9c611c Fix type error found by dartanalyzer --strong
We were declaring that the function passed to setState should return a
Function. In reality, we want the function to return void (and everyone calls
it with a function that returns void).
2015-07-21 22:42:04 -07:00
Adam Barth 73123a3c08 Merge pull request #201 from eseidelGoogle/fuzz_crashes
Fix 2 crashes found by Hixie's fuzzer.
2015-07-21 19:59:24 -07:00
Adam Barth 516e6b6e27 Update README.md 2015-07-21 19:56:57 -07:00
Adam Barth f6eb26c0ef Merge pull request #207 from abarth/fix_sky_tool
Update sky_tool now that sky:// isn't a thing
2015-07-21 19:53:59 -07:00
Adam Barth 665f6c33a4 Update sky_tool now that sky:// isn't a thing
Instead, just use a normal http URL.
2015-07-21 19:53:25 -07:00
Adam Barth 0a427a0a86 Update README.md 2015-07-21 19:50:44 -07:00
Adam Barth be8b92cd84 Update README.md 2015-07-21 19:41:13 -07:00
Adam Barth 9ee93ebad8 Roll Sky package version 2015-07-21 17:29:58 -07:00
Hixie 4d2902f219 Many code improvements to Mine Digger.
Text styles are now a global constant instead of being initialised dynamically.
There are now sufficient text styles for 8 mines around a square.
I coallesced Game and MineDiggerApp.
Used an enum instead of constants for the cell state.
Used setState() instead of scheduleBuild().
Used an O(N) algorithm for mine laying instead of the previous potentially-never-ending algorithm.
Moved the listener on the cells to the app, so that the logic survives a rebuild.
Various other minor changes.
2015-07-21 17:24:51 -07:00
Viktor Lidholt 972417f54e Merge branch 'master' of github.com:domokit/sky_engine 2015-07-21 16:46:14 -07:00
Viktor Lidholt 271812259b Fixes issues in demo game and adds heads up display 2015-07-21 16:45:53 -07:00
Viktor Lidholt b26bae8a45 Fixes issues with invalidating matrix for SpriteBox 2015-07-21 16:42:51 -07:00
Eric Seidel 8f85f34d27 Fix 2 crashers found by Hixie's fuzzer.
The first one is that we weren't setting up a
FontCachePurgePreventer during drawText.  It's not clear
that this is the correct fix, since Blink doesn't have
this FontCachePurgePreventer here either, but it's also
possible that they would hit this same ASSERT and just
not care (since ASSERTs are disabled on clusterfuzz).

The second fix is making ExceptionState actually track
whether it has thrown an exception or not. The c++ code
was depending on this working in order to return early
from dom functions and not crash!

R=abarth@google.com
2015-07-21 16:29:04 -07:00
Hixie 6d304c03ac Remove redundant operator== and hashCode functions in card example.
It turns out that we aren't really using these. The identity logic is sufficient.

Also, add some asserts for a crash I had once but couldn't reproduce, in case that helps catch it next time.
2015-07-21 15:26:54 -07:00
Hixie 9da399b0e1 Rationalise usage of keys in navigator.dart.
Route (named routes) no longer have a key, and have their own storage for their names.
RouseState no longer has a key, and uses an owner field pointing to a StatefulComponent instead.
As such, RouteBase no longer has a key.

HistoryEntry no longer uses a global int to ensure uniqueness.

Propagated this to stocks app.
2015-07-21 14:58:48 -07:00
Adam Barth ed82572205 Roll version to 20 2015-07-21 14:56:54 -07:00
Adam Barth de717bafe9 Images don't appears in VariableHeightScrollables
When we build widgets during layout we weren't notifying those widgets that
they were mounted. Now we notify mount status changes when exiting build phases
inside layout.

Fixes #176
2015-07-21 14:42:21 -07:00
Adam Barth 6b748e653e Fix more analyzer warnings 2015-07-21 13:59:18 -07:00
Adam Barth 53efc748e1 Merge pull request #191 from abarth/image_height_width
Separate width and height parameters for Image widgets
2015-07-21 13:54:56 -07:00
Adam Barth d5f3168982 Merge pull request #192 from abarth/fix_warnings
Fix analyzer warnings
2015-07-21 13:52:37 -07:00
Adam Barth 3ac4c6c998 Fix analyzer warnings 2015-07-21 13:51:27 -07:00
Adam Barth 012b915704 Separate width and height parameters for Image widgets
This change makes it easier to defined only the width or the height of an image
and let the other value be filled in from the image's intrinsic aspect ratio.

Fixes #175
2015-07-21 13:46:10 -07:00
mpcomplete 4a0bdf1bba Merge pull request #188 from mpcomplete/animated_value
Renamed AnimatedType to AnimatedValue
2015-07-21 13:45:50 -07:00
Viktor Lidholt 1eff5b8c94 Merge pull request #184 from vlidholt/master
Updates sprite widget to handle changes to renderbox
2015-07-21 13:32:22 -07:00
Viktor Lidholt 6c510fb558 Minor formatting fixes 2015-07-21 13:30:30 -07:00
Matt Perry 0fd3302ebe Renamed AnimatedType to AnimatedValue 2015-07-21 12:55:16 -07:00
Hixie 310412fde5 Minor style changes around demo cards. 2015-07-21 12:18:10 -07:00
Hixie f3e07210b0 Make typography.white and typography.black constants. 2015-07-21 12:13:10 -07:00
Viktor Lidholt 90363ee956 Merge branch 'master' of github.com:domokit/sky_engine into HEAD 2015-07-21 11:30:52 -07:00
Viktor Lidholt 1b4923a2a6 Adds main screen to game and graphics for game UI 2015-07-21 11:30:17 -07:00
Hans Muller df88d38b29 Merge pull request #181 from HansMuller/cards-animate-back
Dismissable: animate "snap back", only call dismiss() once
2015-07-21 11:27:30 -07:00
Viktor Lidholt 88afaefbaf Updates sprite widget to handle changes to renderbox 2015-07-21 11:26:57 -07:00
Hans Muller d8a4a099e0 animate "snap back", only call dismiss() once 2015-07-21 11:20:01 -07:00
Hixie ddef380875 This demo is a fuzzer of sorts, testing in particular our text layout system and painting. 2015-07-21 10:56:08 -07:00
Hans Muller f72d61bf5f manage listener with on,didMount 2015-07-21 08:42:14 -07:00
Hans Muller 3f70271d9b manage listener with on,didMount 2015-07-21 08:41:58 -07:00
Hans Muller b0e0e65c09 Fixed several typos 2015-07-21 08:25:49 -07:00
Ian Hickson 4d2e8de287 Update README.md 2015-07-20 22:48:47 -07:00