We weren't correctly marking an element as needing style
recalc if it was *losing* it's layout manager. We were
only doing so when it was gaining a layout manager for
the first time.
Review URL: https://codereview.chromium.org/1082273004
Having the output of the tracing service be a list of json objects
instead of one json object makes it much easier to combine multiple
sources. This teaches skydb (which wants to format the output into a
json file loadable by trace-viewer) to emit the tracing header/footer
itself. This will make it possible to combine data from the tracing
service with data collected by the shell itself.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1065093003
Text can only only inside paragraphs and inlines. This patch makes it
so we stop putting such text nodes in the render tree at all if their
parent is not a paragraph or an inline.
This is the final step in making it so that we don't create anonymous
renderers, which fixes a crash in the new custom layout code.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1077473002
We only ever create RenderParagraphs now. The only non-trivial change here
is making RenderView a RenderFlexibleBox. This required changing custom.sky.
That test was written in a fragile way that behaved differently if we
did multiple layouts. Instead, having it be less racy and only change
values during the test itself.
This also throws a wrench in moving all the layout code to dart
because we can't set the layout manager on the RenderView. Maybe
we need to explicitly let you do so.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1068683002
-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
This flag to mojo_shell is gaining the ability to produce tracing info
starting very early in process startup. This allows the skydb 'start'
command to pass this command through to mojo_shell.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1065723003
-Temporarily add setting override width as well so that we correctly bypass in RenderBox::computeLogicalWidth.
-Add setNeedsLayout so that the author code can force layouts (e.g. when the container's width changes).
-Have setLayoutManager force a reattach of the element if it's renderer wasn't a custom layout one before.
-Remove the laying out of children from RenderCustomLayout::layout. This is the job of the author code.
-Add a test case.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1055263002
This patch adds hyphenation using the Liang hyphenation algorithm,
similar to TeX. It also improves the optimized line breaker so that
it works correctly and efficiently even when the line width is not
constant (there is a specialization for constant width, which is
probably worthwhile, but performance TODOs remain).
Still to be done:
* hyphenator has many shortcuts, only tested with English
* interaction between punctuation and hyphenation is problematic
Change-Id: I2d94a1668ebc536398b7c43fcf486333eeb7c6aa
This patch adds a LineBreaker class to Minikin, which will be used for
computing line breaks in StaticLayout. The version in this patch
contains basically the same functionality that existed before, but
hopefully better performance and an interface that's suitable for more
sophisticated paragraph layout.
Note that this version contains a high quality strategy, which mostly
works but doesn't respect varying line width.
Change-Id: I02485d58b1e52856296a72cdd4efd963bc572933
Flights is not longer a good example of something you can build wity Sky.
Restore the flights-app-pixel test and move the assets needed for the test into
the tests directory.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1034953003
It's especially crappy since it doesn't actually do much/any error
handling.
Use:
$ sky/tools/skydb start out/Debug \
'sky/examples/terminal/index.sky?url=mojo:netcat?host=localhost%26port=80'
(Note: We don't have a resolver yet, so the host either has to be
"localhost" or an IPv4 address in the form N1.N2.N3.N4.)
R=erg@chromium.org
Review URL: https://codereview.chromium.org/1032743002
The bindings, core, and application libraries are now referred to as, e.g.:
package:mojo/public/dart/core.dart
Since the handle watcher remains in the snapshot, it no
longer refers to types defined in core.dart. References to types defined
in core.dart are also removed from mojo_natives.cc.
In Dart packaged apps, the SDK is zipped up under mojo/public/dart.
For embedder tests, the SDK is copied into the generated source output directory.
A base_dir parameter is added to the 'dart_package' and 'mojom' GN macros so that
consumers of the Mojo SDK can all import using the same URIs regardless of where
the SDK lives in their source trees.
BUG=
R=erg@chromium.org
Review URL: https://codereview.chromium.org/1027603002
Until now, we were saving downloaded file to the temporary directory
with a name being the hash of the file content. It means there is a race
when the same content is downloaded from 2 different URLs.
To fix this, we now create an intermediary directory that is the hash of
the URL.
Also, because this is only needed for debugging with gdb, and this is
inefficient in term of both CPU and storage (we do not know when to
delete the temporary directory), we control this with a command line
flag.
R=ncbray@chromium.org, eseidel@chromium.org
BUG=https://github.com/domokit/mojo/issues/61
Review URL: https://codereview.chromium.org/1011333003
This CL adds just enough custom painting to Sky to make
sky/examples/painting/circle.sky draw a circle. Over time, we should be able to
elaborate this system into something interesting and to make it actually work
in a reasonable way.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1017593005
1) Factors InkWell out of Material so that components can use an ink well
without needing the shadow/level machinery.
2) Makes the ink effect move at a different velocity once the tap has actually
occurred, converging with the spec. We don't have the right speeds yet, but
at least we're approaching the right shape.
3) To support (2), added a primaryPointer attribute to GestureEvents to let
authors coorelate gesturetapdown events with later gesturetap events.
4) To support (2), modernized SplashAnimation to used AnimatedValue and friends.
5) Added more constants to view-configuration.dart that match Android.
I've also removed the cancelling of the ink effect on scroll. The proper way to
do that is to notice that someone in the event chain is listening for
scrollstart and delay the beginning of the ink effect for some period of time.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1019023003
Before this change Sky would hit 404s when trying to
load examples from domokit.github.io.
I also added a separate sky_home and updated the default
url to point to sky_home instead of home.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1016143002