Window.viewInsets is the set of window-relative insets that describe the
area of the window that an application may want to treat as effectively
reducing the size of the content. Typically this is due to system UI
that fully obscures underlying content, such as the keyboard.
This area differs from padding in that padding is the set of insets that
describe the area of the window that may be partially (or fully)
obscured by system UI or physical intrusions into the view area (e.g.
iPhone X sensor housing, status bar, or the iPhone X home indicator
widget).
This patch does not yet enable the iOS bottom edge safe area. Once the
framework has been updated to use viewInsets for bottom-edge occlusions
(today, the keyboard), the bottom safe area will be enabled and
framework patches that depend on it, landed.
This is the first step to support animated GIFs: flutter/flutter#204
TBD in following CLs:
* Implement Codec.getNextFrame.
* Add Framework side support to run animations.
Previously, cases like:
```dart
Color.lerp(const Color(0xFF00FF7F), const Color(0xFF00FFFF), 1.1)
```
...would result in unexpected effects (in this instance, lerping
between these colors with a curve that overshoots would take what
should be a simple animation from pale green to blue and add some
flickering bright green whenever it overshoots).
* preserve Window callback zones
Run Window callbacks in the zone they are registered in. This is consistent with how other native API work, such as `scheduleMicrotask`, `Timer`, and `dart:io`. This also enables the developers to use the `Zone` API to capture and log unhandled Dart errors.
* refactor wrapping
* new line
* fewer if checks; group getters/setters/fields
* inline _invokeOnPointerDataPacket
This attempts to make the Canvas API and some related features more
likely to throw a Dart exception than crash when exposed to bad input.
Depends on rolling tonic to
https://fuchsia-review.googlesource.com/c/35742/ which this patch does
not yet do, but I wanted to put it up for review to see if it was even
a reasonable approach.