257 Commits

Author SHA1 Message Date
Hixie
3ceb5dc0df [Effen] Start removing 'position'.
This creates a new RenderNode class that does positioning.
It then creates an fn Container class that uses it just to position things at 0,0 at the full extent of the container.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1128103009
2015-05-15 16:39:26 -07:00
Hixie
e97a10ed74 [Layout] Put in some guards to prevent us from reintroducing 'display' properties into the CSS.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132983007
2015-05-15 15:16:25 -07:00
Hixie
9466cbbcb4 [Effen] remove the last traces of the 'display' property from the effen component library.
Previously, the fn "Text" class rendered as a single block of text.
Now, there's a "Paragraph" class that contains "TextFragment"s, and "Text" is just a component that places a single TextFragment into a single Paragraph.
This allows other components, notably the Input component, to build more complicated paragraphs of styled text, without using 'display'.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1139123007
2015-05-14 15:21:29 -07:00
Hixie
80318f6e81 [Effen] Remove 'display' from drawer_header.dart.
This moves DrawerHeader to using FlexContainer instead of Container and 'display', in the continuing quest to remove our dependency on CSS.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1139123005
2015-05-14 14:08:30 -07:00
Hixie
8b19459c9e [Effen] remove more CSS
This continues my attempt to remove our dependency on CSS.
It adds support for column-based flex to FlexContainer.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1132113007
2015-05-14 13:20:11 -07:00
Hixie
17aeeb1c51 [Effen] Make the stock app use the radio button widget so that it's being tested.
Changes:
- adds a couple of radio buttons to the drawer menu list.
- makes menu items support being tapped and reporting the tap.
- hooks up the checkbox to actually support being checked.
- changes the drawer menu items to make more sense in a stock app.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1137373004
2015-05-14 13:16:35 -07:00
Hixie
636d169c7f [Effen] remove some redundant styles
Some of the styles we have aren't really needed, so remove them to make it clearer what we weed to actually support to keep the stocks app running.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1128173007
2015-05-14 10:21:55 -07:00
Hixie
878336e8a2 [Effen] Make the drawer not be included in the build output when the drawer is not shown.
This is a prerequisite to dropping 'display:none'.
Included in this CL is making AnimatedValue able to animate more than one field.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1126333006
2015-05-14 09:44:22 -07:00
Hixie
396a04df4a [Effen] Use the checkbox widget in the stocks app.
- add a checkbox to the stock app, so that we're testing the checkbox widget
  (it's not currently wired up to anything, that can come later)
- make InkSplash use FlexContainer so that we can use flex in the popup menu items
- make effen's Text be more similar to Image and Container, so that it can be styled
- make layout.dart's RenderCSSText correctly support being styled
- also fixes a bug with the stock list where we were rendering one too few a row when scrolling
- check in the code to dump the DOM so I don't have to keep remembering how to do this

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1134163003
2015-05-12 14:39:43 -07:00
Hixie
02045e37a4 [Effen] Move 'flex' out of CSS also. (mark II)
This introduces a new kind of ContentNode similar to Style but which
instead of changing the styles that apply to the node, provides new
settings to apply to the "parentData" structure.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1122413006
2015-05-12 10:40:43 -07:00
Benjamin Lerman
42fc77f4b4 Revert "[Effen] Move 'flex' out of CSS also."
This reverts commit 1a4db2e964de8a2eba7c76c0904027150cc0c387.

This broke the bots.

TBR=github.com@spam.hixie.ch

Review URL: https://codereview.chromium.org/1137153002
2015-05-12 14:25:34 +02:00
Hixie
8873061dff [Effen] Move 'flex' out of CSS also.
This introduces a new kind of ContentNode similar to Style but which
instead of changing the styles that apply to the node, provides new
settings to apply to the "parentData" structure.

If you have better ideas for the class names here let me know.

Note that the layout.dart backend of this is hacky (more so than
before, even); once we have something other than the DOM and CSS to
back it, it'll get rewritten.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1129893006
2015-05-11 16:20:20 -07:00
Hixie
dd1d195482 [Effen] Convert action_bar.dart to using a FlexContainer.
FlexContainer is a (pretend) new layout primitive that implements Flex layout.
It's only pretend because right now it's still just backed by CSS.
This is a step along the way to removing all the CSS from fn.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1128743003
2015-05-11 15:06:23 -07:00
Eric Seidel
5b4d3452bc Merge pull request #154 from domokit/sethladd-patch-2
Fix typo in Sky's framework's README
2015-05-08 13:09:18 -07:00
Hixie
e8ead8bbbe [Effen] Port fn.dart from the legacy sky.Node backend to the RenderNode backend, which is currently just a sky.Node-backed shim, but will eventually be the core Sky interface for layout and painting.
- the custom layout class in fn is removed by this patch; a new class
  will be added in a later CL

- the version of layout.dart in this CL is a subset of what we're
  targetting on the long run with
     https://codereview.chromium.org/1093633002

- a couple of lines of dead code are removed in this CL also

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1117143003
2015-05-08 13:06:47 -07:00
Seth Ladd
bf8418349e Fix typo in Sky's framework's README 2015-05-07 18:40:32 -07:00
Eric Seidel
d04c87cbbc Rename view-configuration to view_configuration to make analyzer happy.
Analyzer was complaining about '-' not being an allowed character
in dart file names.

R=jamesr@chromium.org
2015-05-04 14:18:19 -07:00
Hixie
8c4d2556e6 [Effen] fix some dart warnings (mostly unused imports)
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1104233003
2015-04-27 10:54:26 -07:00
Hixie
122a5220a1 [Effen] stop using custom layout for now, since it's in flux
TBR=hansmuller

Review URL: https://codereview.chromium.org/1102393002
2015-04-27 09:18:01 -07:00
Zachary Anderson
ec37fed8f9 Dart: Put generated .mojom.dart files under mojoms pacakge.
BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1092793005
2015-04-23 15:23:50 -07:00
Hixie
a2e1ec82f5 [Effen] Tapping on a menu while it's closing should not make it instantly disappear.
This tries to make the menu controller more careful about the state
transitions it goes through, in particular, not firing off animations
while we're already closing (since that used to trigger the "we're
done animating" callback which then closes the menu forcibly).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1074883005
2015-04-23 13:20:39 -07:00
Hixie
830f8bf0f7 [Effen] Prevent scrolling past the bottom of a scrollable list.
- make the ScrollBehavior instance long-lived, rather than recreating
  it each time we update the list contents.
- have OverscrollBehavior track the total height of the contents and
  the height of the scrollable region, so that it can determine when
  to stop scrolling down.
- teach OverscrollBehavior about how to determine when to stop
  scrolling down, and how to bounce when it's too far down.
- replace the 'energy' concept in Particles with a method that sets
  the energy and direction at the same time, instead of assuming that
  the direction is always positive when setting energy.
- make FixedHeightScrollable lists track the number of items in the
  list and have them update their ScrollBehavior regarding this
  information as it changes.
- track how many items are currently showing in the list stock list.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1097373002
2015-04-21 13:20:30 -07:00
Dave Moore
1d74d5f631 Add sensors application to mojo
R=qsr@chromium.org

Review URL: https://codereview.chromium.org/1093033002
2015-04-21 09:56:05 -07:00
Hixie
0b125319e5 [Effen] Make the material splashes a bit lighter.
TBR=eseidel

Review URL: https://codereview.chromium.org/1065643003
2015-04-20 16:08:25 -07:00
Hixie
2f37fc0928 [Effen] Typo in splash code: s/sise/size/
TBR=eseidel

Review URL: https://codereview.chromium.org/1066513006
2015-04-20 15:55:11 -07:00
Hixie
1b76bf43d1 [Effen] Reduce splashes when scrolling.
Pipe the remaining time for an animation all the way out to the AnimatedValue.
Make splashes abortable, which causes them to continue to fade but no longer grow, by having them fade in 100ms or however long the animation was still going to go for, whichever is quickest.
Make Scrollables support objects registering with them to be told when scrolling happens.
Make UINode support subclasses being informed when _remove() was called.
Hook all that together to make splashes go away when scrolling by having them register with any ancestor Scrollables such that when those scroll, all the splashes get aborted. Unregister when removed.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1092423003
2015-04-20 15:51:24 -07:00
Hixie
f646c8ac58 Make the keyboard reappear when you tap on a text field after having dismissed the keyboard.
- the keyboard service now has a showByRequest() method that invokes Android's InputMethodManager's imm.showSoftInput with no flags set.
- the Input component calls through to the keyboard service's showByRequest() when it receives a pointer down.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1089163005
2015-04-20 11:45:33 -07:00
Hixie
33e9822625 [Effen] implement bounce back behaviour for lists.
Turns out this is
actually three simulations in a row, so we now have a system that can
transition from one to another.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1100583002
2015-04-20 11:44:45 -07:00
Hixie
ddc2ffd0c7 [Effen] typo fix: 'cusor' => 'cursor' in editable_text.dart
TBR=eseidel

Review URL: https://codereview.chromium.org/1070313005
2015-04-17 12:13:27 -07:00
James Robinson
1c5cac4efa Expose sky KeyboardService in android mojo_shell
R=eseidel@chromium.org, qsr@chromium.org

Review URL: https://codereview.chromium.org/1088793003
2015-04-16 17:11:15 -07:00
Zachary Anderson
11315b5314 Uses mojom module names as Dart's package: import URI
At present there is a special case in Dart bindings generation which
makes the Mojo SDK and things under mojo/services portable. However,
we must not require things under mojo/services to be next to the
Mojo SDK under mojo/public/... in client repos. Further, other
collections of mojoms should also be portable.

To fix this, instead of using the path in the host repo as the
canonical package: import URI for the generated Dart code, this CL
uses the mojom module name.

BUG=https://github.com/domokit/mojo/issues/73
R=blundell@chromium.org, johnmccutchan@google.com, tonyg@chromium.org

Review URL: https://codereview.chromium.org/1071693003
2015-04-16 07:50:47 -07:00
Hixie
f76dd382b8 [Effen] We need to update the layout manager in _syncNode() also,
otherwise when you switch from one Container instance to another, you
end up with the the layout being done by the wrong instance.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1086983004
2015-04-14 13:35:24 -07:00
Hixie
0e24ccd944 [Effen] Custom layout. For now, FixedHeightScrollable uses a custom BlockLayout algorithm, mostly as a proof of concept.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1064983002
2015-04-14 10:38:05 -07:00
Hans Muller
ef3df2f4fb Scrollable should use scrollTo() instead of setting _scrollOffset directly, when starting an animation.
I'd missed this case when adding Scrollable.scrollTo()
https://codereview.chromium.org/1074033002

R=ianh@google.com

Review URL: https://codereview.chromium.org/1082163002
2015-04-14 10:01:44 -07:00
Hans Muller
b215015056 Added Scrollable.scrollTo()
A subclass could override this method to limit scrolling or to initialize the scroll offset.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1074033002
2015-04-09 17:02:49 -07:00
Hixie
8c8ad532f4 [Effen] fix typo in animation code (impluse => impulse)
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1076963002
2015-04-09 16:03:09 -07:00
Hixie
868b53259e [Effen] Use a Style element instead of inline style for the Text fn node's sky
element with display:paragraph, so that the C++ side shares RenderStyles.
(based on review comments on https://codereview.chromium.org/1078973002 )

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1070243003
2015-04-09 16:00:10 -07:00
Hixie
3067bb641a [Effen] make fn wrap text in display:paragraph nodes
R=eseidel@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/1078973002
2015-04-09 15:47:36 -07:00
Hixie
97ed9fdd7d [Effen] rename RenderNode and WrapperNode (previously know as Element) to SkyNodeWrapper and SkyElementWrapper to avoid confusion with C++ RenderNode objects
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1066093003
2015-04-07 14:12:32 -07:00
Eric Seidel
e8140cd33f Unbreak widgets_app.dart (by disabling PopupMenu for now)
Also fix button.dart to include ink_well.dart.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1058013003
2015-04-07 11:17:26 -07:00
Ojan Vafai
88f38ce0e6 Remove all uses of display:block and display:inline-block.
-Make display:flex, flex-direction: column, flex-shrink: 1 the default.
-Simplify StyleAdjuster::adjustStyleForAlignment to remove special cases we
won't need as we make flex the default and remove absolute positioning.
-Fix a bug this exposed in column flexboxes where we'd apply the wrong edge
of border/padding/margin.
-For now leave the default of align-items:stretch. The main change here is
that iframe/img will do width:auto the same as blocks (i.e. the width of
the parent). I think this is a good change, but we'll have to see how it feels
in practice.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1061163002
2015-04-06 16:44:12 -07:00
Tony Gentilcore
cd1ca3d88b Revert API change from issue 1053883002.
tl;dr is that unless the Proxy is passed, the caller doesn't know
whether it's a Stub or Proxy (or whether it's bound).

See that patch for further explanation.

BUG=
R=hansmuller@google.com

Review URL: https://codereview.chromium.org/1052693003
2015-04-02 08:38:33 -07:00
Tony Gentilcore
0bbc4cee4a Make embedder.serviceRegistry return a ServiceRegistry instead of ServiceRegistryProxy.
The proxy has methods like close() that I think we're not intending to expose to the
caller. The ServiceRegistry is just the interface itself. This also avoids users of
the API from having to add a .ptr to their usages of the registry.

BUG=
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1053883002
2015-04-01 16:33:16 -07:00
Hixie
1ad52007bd [Effen] Remove '_isInCheckedMode' flag and use an assert() instead, since presumably that will more reliably get compiled out in prod builds.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1052793002
2015-04-01 14:28:14 -07:00
Hixie
e3318005f4 [Effen] missed an underscore in the _ensureDepth() logic
TBR=eseidel

Review URL: https://codereview.chromium.org/1056633002
2015-04-01 12:39:59 -07:00
Hixie
ee63773cd1 [Effen] fix _ensureDepth to work on root of tree, oops
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1050153002
2015-04-01 12:08:06 -07:00
Hixie
6ff2cfbe82 [Effen] use the fact that the parent knows its depth already to avoid walking the entire tree each time, and simplify how we build the trace message
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1051913002
2015-04-01 10:30:45 -07:00
Hixie
c0067cceba [Effen] s/Node/UINode/, s/Element/WrapperNode/, s/EventTarget/EventListenerNode/
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1043283003
2015-04-01 09:46:28 -07:00
Hans Muller
867df1ba15 Effen error if a component ancestor doesn't specify a style
If a component ancestor doesn't specify a style, quietly ignore it.

Currently the result is a little confusing:

[0330/124031:ERROR:dart_error.cc(20)] Unhandled exception:
Uncaught Error: The null object does not have a getter '_className'.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1041863003
2015-03-30 14:16:40 -07:00
Adam Barth
8c5939bb7c Fix deploy_sdk.py to include README.md and stock data files
Also, remove testplan.txt, which isn't part of the framework.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1038273002
2015-03-26 17:26:04 -07:00