This moves the definition of the mojom URLRequest and URLResponse
objects into the SDK at //mojo/public/interfaces/network/. These are
used directly by the shell and have a special place in the system. This
patch does the minimal amount of import/include updating to get tests
passing but doesn't fully update everything - in particular it
doesn't update all the C++ code that #includes url_loader.mojom.h for
the URLRequest or URLResponse definitions to #include the more specific
mojom.h files, or the equivalent in other languages. I'll do that in a
follow-up to minimize churn.
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/1129063008
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.comTBR=abarth@chromium.org
Review URL: https://codereview.chromium.org/1148253003
Right now I'm storing a SHA1 in a folder in /sdcard since
that seems likely to work on non-rooted devices, but
I haven't tested it.
This cuts build times from 6.5 seconds to 1.5 seconds for
me. You can save another 0.5sec by passing the --no_install
flag to avoid the SHA1 check altogether if you're sure
that nothing has changed.
R=eseidel@chromium.org, eseidel, hixie
Review URL: https://codereview.chromium.org/1149113005
We're currently in a transition between using main.sky and main.dart
files as our main() entry point for Sky applications.
This CL makes this runtime controlable by path name. If it finds
a .dart in the path name it will use SkyView, otherwise it will
fall back to the existing WebView codepath.
SkyView does not expose a window object and much of the existing
Sky Engine is not initialized when main() is run. Clients should
be transitioning away from main.sky towards main.dart in the near
future, however main.dart is probably not ready for general
consumption at this point.
R=ianh@google.com
Review URL: https://codereview.chromium.org/1152313002
NOTE: This CL appears far larger than it actually is for two reasons:
1) Many files were moved around to use the Dart package directory structure.
2) Many .dart files had to have import paths updated.
- Organize mojo/public/dart so that it uses standard Dart package layout
- Organize mojo/dart/apptest so that it uses a standard Dart package layout
- Organize sky/sdk so that it uses a standard Dart package layout
- Create a mojo/testing package (used by unittests)
- Introduce the 'dart_pkg' gn rule which populates gen/Config/dart-pkg
- All internally vended Dart packages must have a corresponding dart_pkg rule
- It is now possible to use dependency_overrides: in pubspec.yaml to mix internal and external package dependencies (enables analyzer, editor, webstorm usage for internal developers).
- Package root for dart content handler ends with "packages/"
- Imports of mojo package uris no longer need the "public/dart"
- mojo/public/tools/dart_package.py is a clone of mojo/public/tools/gn/zip.py
- Sky tests no longer run 'deploy_sdk' script.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1132063007
It's useful to be able to call org.domokit.sky.shell.SkyMain.ensureInitialized() when implementing custom Android Activities. This commit makes ensureInitialized() public for this purpose.
Unrelated changes:
Added curly braces to pass PRESUBMIT check.
Add Lex Berezhny <lex@damoti.com> to AUTHORS file in order to be able to commit fixes (and pass PRESUBMIT check).
Patch by Lex Berezhny <lex@damoti.com>.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1135953004
Three hyphenation frequencies are now supported:
kHyphenationFrequency_None, which turns off both automatic
hyphenation and soft hyphens.
kHyphenationFrequency_Normal, which has aconservative amount of
hyphenation useful as a conservative default.
kHyphenationFrequency_Full, which has a typographic-quality amount of
hyphenation useful for running text and tight screens.
Bug: 21038249
Change-Id: I2800f718c887c9389a1a059d7ec07d7fa2ca1dee
Creates generate.dart script that installs generated .mojom.dart files into
the mojom pub package.
Updates Sky's deploy_sdk.py script to put mojom.dart files in locations where
they can be consumed by the generate.dart script once the SDK is published and
obtained via "pub get".
This CL is adapted from a patch by zra@google.com; most of the work here is his.
R=iposva@google.com
Review URL: https://codereview.chromium.org/1106383006
This rolls in //base, //build and //sandbox/linux and updates other
things to match, in particular:
*) Update build_v8.patch
*) Add junit, mockito and roboelectric to DEPS for android test rules
*) Update DEPS for grit
*) Fix up various GN files for os->target_os rename
*) Fix up a few places that were using //base/float_util to use std::isnan
*) Fix up a few places using ApiCompatibilityUtil to use Android SDK directly
as well as a few miscellaneous fixes.
Many portions based on ncbray's work in
https://codereview.chromium.org/1108173002/R=ncbray@chromium.orgTBR=ncbray@chromium.org
Review URL: https://codereview.chromium.org/1124763003
This exposes the last hooks needed to implement flexbox layout. For now,
I didn't worry too much about the exact API we're exposing since this will
all change with the upcoming redesign (e.g. https://codereview.chromium.org/1093633002).
minContentWidth == the width if the element were to wrap at every wrapping point (not including border/padding)
maxContentWidth == the width if the element were to only wrap at hard wrapping points (e.g. \n inside a whitespace: pre).
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1101793003
In a paragraph with a trailing newline, the width of the newline
character was included in the line width for breaking purposes,
basically as if it were a non-breaking space. This caused a
discrepancy, where Layout.getDesiredWidth() suggested that the text
would fit in a single line, but StaticLayout would break it because of
the added width of the newline character.
The proposed fix is simply to consider newline to be a space that
disappears at the end of a line.
Bug: 20152308
Change-Id: I539574c5b8ea892c8ed6aca6c59e90ccdf74a680
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/73R=blundell@chromium.org, johnmccutchan@google.com, tonyg@chromium.org
Review URL: https://codereview.chromium.org/1071693003
New functions for computing the correspondence between cursor
position and advance, respecting grapheme boundaries.
Change-Id: I620378d5f64cd74300cd43db522adeb555825dff
The name "margin" conflicts with another meaning, so we're making the
name in the public api "idents" and the code consistent in naming.
Change-Id: I9170116b4d972e4b25f0f319e78376310288eb41
In order to support layout in non-rectangular regions, the LineWidths
object needs to accept an arbitrary array of margins. This is
implemented in addition to the existing firstWidthLineCount/restWidth
mechanism for convenience, though using only arrays would have the
same expressive power.
Bug: 20182243
Change-Id: Iea96bca1a92012314ac27e617c67f306c1f1b2f2
If your layout manager changes, then you need to setNeedsLayout,
otherwise the next frame doesn't even get scheduled. We already
correctly handle going from not having layout to having one or
vice versa by doing the more drastic reattaching since that
requires changing your actual render class.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1060013005