We're now 25% faster as scrolling the infinite list than stocks1.
This CL makes cleans up some code to avoid calling layout on all the rows in
the stocks list. Instead, we only layout a row when it first enters the list.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1195113002.
Ok, not really zero. Actually 72 if you include warnings from non-sky packages and if you include bogus warnings that can be filtered out.
If you pipe the analyzer's output through the following perl script, though, you get zero warnings on the stock app with this patch:
while (defined($_ = <STDIN>)) {
s|out/android_Debug/gen/dart-pkg/sky/|sky/sdk/|gos;
next if m|/dart-pkg/|os; # other packages
next if m|^\[warning] Missing concrete implementation of 'RenderObject.toString'|os; # https://github.com/dart-lang/sdk/issues/23606
print;
}
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1182323009.
Currently you lose your scroll and drawer state when coming back from the settings pane.
I think we should solve this by having the Navigator maintain a Stack and
keeping the StockHome alive underneath it. But this is good enough for a first iteration.
R=abarth@chromium.org, abarth
Review URL: https://codereview.chromium.org/1191153002.
tree of InlineStyle and InlineText elements.
StyledText builds an Inline that renders the tree.
For example this StyledText object:
new StyledText(["FOO", [boldLargerStyle, [greenStyle "BAR"], "BAZ"] BORF]);
Renders the same way the following HTML would,
assuming that TextStyles boldLargerStyle and
greenStyle were defined.
<style>
div {
display: inline;
}
</style>
<p>
<div>
FOO
<div style="font-weight:bold; font-size:larger">
<div style="color:green">
BAR
</div>
BAZ
</div>
BORF
</div>
</p>
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1194693002.
Some files are moved by this:
Copy framework/node.dart into types/ - preparing for framework/'s decomissioning.
Move app/scheduler.dart into sky/scheduler.dart - "app" doesn't really make sense.
As part of the SkyBinding cleanup, I made the hit-testing less
RenderBox-specific, by having the HitTestEntry.target member be a
HitTestTarget, which is an interface with the handleEvent() function,
which is then implemented by RenderBox. In theory, someone could now
extend hit testing from the RenderBox world into their own tree of
nodes, and take part in all the same dispatch logic automatically.
This involved moving all the hit testing type definitions into a new
sky/hittest.dart file.
Renamed SkyBinding._app to SkyBinding._instance for clarity.
Moved code around in SkyBinding so that related things are together.
Made WidgetSkyBinding use the existing SkyBinding.instance singleton
logic rather than having its own copy.
I also added some stub README.md files that describe dependencies.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1187393002.
Move app/view.dart to rendering/sky_binding.dart since it's part of the RenderObject API, really (it knows about RenderView intimately).
The tests pass. I didn't check every last example.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1183913006.
Buttons and menu items use onPressed. Also, don't pass along the sky.Event
because that's a lower-level concept.
I've also reordered parameter lists to put the |child| argument last in a
number of places.
Also, fixed a bug where FloatingActionButton was missing syncFields.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1188993003.
Turns out it's ok to not detach all the RenderObjects from the widget
tree from each other, since they're not reused... but the
WidgetToRenderBoxAdapter's renderBox _is_ reused, so we better detach
that one.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1191053002.
The underlying problem is that we lacked a RenderObjectWrapper for the
RenderView, which meant we couldn't handle changing the RenderObject that was
the root of the RenderView. This CL introduces a RenderViewWrapper and uses it
in a new AppContainer widget root. This change allows us to make App a
non-magical Component that is inserted into the AppContainer in the newly
introduced runApp function.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1184823006.
The basic widgets are going to be used many, many times, so we want them to
have short, snappy names.
Also, give the Widget argument to Listener the name |child| for consistency.
TBR=ianh@google.com
Review URL: https://codereview.chromium.org/1193513007.
This is a completion of Eric's WIP patch:
https://codereview.chromium.org/1179663005/
Low level support for creating a paragraph that contains
runs of styled text. The styles may be nested.
The Paragraph and RenderParagraph classes have been
replaced by Inline and RenderInline. Styled text is defined
with a tree of InlineText and InlineStyle objects.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1177833012.