2 Commits

Author SHA1 Message Date
Eric Seidel
0e738ab6aa Make SkyShell stop crashing on scroll in Stocks2.
This is just another hack on top of the hack that is LayoutRoot.

We will want to untangle Document ownership further as we
iterate on LayoutRoot.  For now LayoutRoot is both very
inefficient (allocates a new Frame for each one!) as well
as crashy like this (by not actually owning the document
but rather grabbing it off the "rootElement" assigned to it).

This at least fixes this common crasher for now.
https://github.com/domokit/mojo/issues/206

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1171643002
2015-06-08 12:41:31 -07:00
Eric Seidel
922ea790b8 Make it possible to draw Text in the new window/document-less world
I had to add back document.createText() since new Text()
does not work in the new world yet.

LayoutRoot is a new Dart-exposed class which holds the Frame and
all associated machinery, sufficient to trigger a restyle
and layout of the subtree.

This is all kinda hacky and I'm sure likely to cause many
crashes if folks call random methods on these disconnected
trees.

But this makes it at least possible to paint text for now
and we can improve this in the coming days.

This really should have Adam's review.  It's hugely hacky
but I'd like to negotiate out with him the timeline on
which we should fix some of these hacks.

R=ianh@google.com
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1148253003
2015-05-27 11:05:42 -07:00