Skip to content

Commit

Permalink
Correct libraries.yaml path for stub_ui, add brightness, copy dart2js…
Browse files Browse the repository at this point in the history
…_platform.dill files (flutter#7725)
  • Loading branch information
jonahwilliams authored Feb 7, 2019
1 parent 053f7a8 commit ee0cf82
Show file tree
Hide file tree
Showing 5 changed files with 121 additions and 95 deletions.
16 changes: 16 additions & 0 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ group("flutter") {
"$flutter_root/frontend_server",
"//third_party/dart:create_sdk",
"$flutter_root/lib/stub_ui:stub_ui",
":dart2js_platform_files"
]
foreach(snapshot, _flutter_sdk_snapshots) {
public_deps += [ ":copy_flutter_${snapshot[0]}_snapshot" ]
Expand Down Expand Up @@ -91,3 +92,18 @@ foreach(snapshot, _flutter_sdk_snapshots) {
]
}
}

copy("dart2js_platform_files") {
deps = [
"//third_party/dart/utils/compiler:compile_dart2js_platform"
]

sources = [
"$root_out_dir/dart2js_outline.dill",
"$root_out_dir/dart2js_platform.dill",
]

outputs = [
"$root_out_dir/flutter_patched_sdk/{{source_file_part}}",
]
}
2 changes: 1 addition & 1 deletion lib/stub_ui/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ copy("stub_ui") {
]

deps = [
":stub_libraries"
":stub_libraries",
]

outputs = [
Expand Down
88 changes: 44 additions & 44 deletions lib/stub_ui/libraries.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,118 +4,118 @@
"dart2js": {
"libraries": {
"async": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart",
"uri": "../../dart-sdk/lib/async/async.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart",
"uri": "../../../../dart-sdk/lib/async/async.dart"
},
"_interceptors": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart"
},
"mirrors": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart",
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart",
"supported": false,
"uri": "../../dart-sdk/lib/mirrors/mirrors.dart"
"uri": "../../../../dart-sdk/lib/mirrors/mirrors.dart"
},
"_js_embedded_names": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart"
},
"io": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/io_patch.dart",
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/io_patch.dart",
"supported": false,
"uri": "../../dart-sdk/lib/io/io.dart"
"uri": "../../../../dart-sdk/lib/io/io.dart"
},
"_internal": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart",
"uri": "../../dart-sdk/lib/internal/internal.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart",
"uri": "../../../../dart-sdk/lib/internal/internal.dart"
},
"_metadata": {
"uri": "../../dart-sdk/lib/html/html_common/metadata.dart"
"uri": "../../../../dart-sdk/lib/html/html_common/metadata.dart"
},
"_async_await_error_codes": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart"
},
"_http": {
"uri": "../../dart-sdk/lib/_http/http.dart"
"uri": "../../../../dart-sdk/lib/_http/http.dart"
},
"_js_primitives": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart"
},
"_js_helper": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart"
},
"_chrome": {
"uri": "../../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart"
"uri": "../../../../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart"
},
"html_common": {
"uri": "../../dart-sdk/lib/html/html_common/html_common_dart2js.dart"
"uri": "../../../../dart-sdk/lib/html/html_common/html_common_dart2js.dart"
},
"ui": {
"uri": "stub_ui/ui.dart"
},
"js": {
"uri": "../../dart-sdk/lib/js/dart2js/js_dart2js.dart"
"uri": "../../../../dart-sdk/lib/js/dart2js/js_dart2js.dart"
},
"_native_typed_data": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart"
},
"_js_names": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart"
},
"core": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart",
"uri": "../../dart-sdk/lib/core/core.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart",
"uri": "../../../../dart-sdk/lib/core/core.dart"
},
"collection": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart",
"uri": "../../dart-sdk/lib/collection/collection.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart",
"uri": "../../../../dart-sdk/lib/collection/collection.dart"
},
"js_util": {
"uri": "../../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart"
"uri": "../../../../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart"
},
"typed_data": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart",
"uri": "../../dart-sdk/lib/typed_data/typed_data.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart",
"uri": "../../../../dart-sdk/lib/typed_data/typed_data.dart"
},
"web_audio": {
"uri": "../../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart"
"uri": "../../../../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart"
},
"html": {
"uri": "../../dart-sdk/lib/html/dart2js/html_dart2js.dart"
"uri": "../../../../dart-sdk/lib/html/dart2js/html_dart2js.dart"
},
"isolate": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart",
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart",
"supported": false,
"uri": "../../dart-sdk/lib/isolate/isolate.dart"
"uri": "../../../../dart-sdk/lib/isolate/isolate.dart"
},
"developer": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart",
"uri": "../../dart-sdk/lib/developer/developer.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart",
"uri": "../../../../dart-sdk/lib/developer/developer.dart"
},
"web_gl": {
"uri": "../../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart"
"uri": "../../../../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart"
},
"indexed_db": {
"uri": "../../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart"
"uri": "../../../../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart"
},
"_js": {
"patches": "../../dart-sdk/lib/js/_js_client.dart",
"uri": "../../dart-sdk/lib/js/_js.dart"
"patches": "../../../../dart-sdk/lib/js/_js_client.dart",
"uri": "../../../../dart-sdk/lib/js/_js.dart"
},
"convert": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart",
"uri": "../../dart-sdk/lib/convert/convert.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart",
"uri": "../../../../dart-sdk/lib/convert/convert.dart"
},
"math": {
"patches": "../../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart",
"uri": "../../dart-sdk/lib/math/math.dart"
"patches": "../../../../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart",
"uri": "../../../../dart-sdk/lib/math/math.dart"
},
"_foreign_helper": {
"uri": "../../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart"
"uri": "../../../../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart"
},
"web_sql": {
"uri": "../../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart"
"uri": "../../../../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart"
},
"svg": {
"uri": "../../dart-sdk/lib/svg/dart2js/svg_dart2js.dart"
"uri": "../../../../dart-sdk/lib/svg/dart2js/svg_dart2js.dart"
}
}
}
Expand Down
95 changes: 45 additions & 50 deletions lib/stub_ui/libraries.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
# Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.

Expand All @@ -11,123 +11,118 @@
# changing libraries, sources, and patch files. See
# https://github.com/dart-lang/sdk/issues/28836.

# These paths are relative to the source location in the flutter cache under
# the flutter_patched_sdk
# bin/cache/
# dart-sdk/
# engine/common/flutter_patched_sdk
dart2js:
libraries:
ui:
uri: "stub_ui/ui.dart"

async:
uri: "../../dart-sdk/lib/async/async.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart"
uri: "../../../../dart-sdk/lib/async/async.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/async_patch.dart"

_chrome:
uri: "../../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart"
uri: "../../../../dart-sdk/lib/_chrome/dart2js/chrome_dart2js.dart"

collection:
uri: "../../dart-sdk/lib/collection/collection.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart"
uri: "../../../../dart-sdk/lib/collection/collection.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/collection_patch.dart"

convert:
uri: "../../dart-sdk/lib/convert/convert.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart"
uri: "../../../../dart-sdk/lib/convert/convert.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/convert_patch.dart"

core:
uri: "../../dart-sdk/lib/core/core.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart"
uri: "../../../../dart-sdk/lib/core/core.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/core_patch.dart"

developer:
uri: "../../dart-sdk/lib/developer/developer.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart"
uri: "../../../../dart-sdk/lib/developer/developer.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/developer_patch.dart"

html:
uri: "../../dart-sdk/lib/html/dart2js/html_dart2js.dart"
uri: "../../../../dart-sdk/lib/html/dart2js/html_dart2js.dart"

html_common:
uri: "../../dart-sdk/lib/html/html_common/html_common_dart2js.dart"
uri: "../../../../dart-sdk/lib/html/html_common/html_common_dart2js.dart"

indexed_db:
uri: "../../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart"
uri: "../../../../dart-sdk/lib/indexed_db/dart2js/indexed_db_dart2js.dart"

_http:
uri: "../../dart-sdk/lib/_http/http.dart"
uri: "../../../../dart-sdk/lib/_http/http.dart"

io:
uri: "../../dart-sdk/lib/io/io.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/io_patch.dart"
uri: "../../../../dart-sdk/lib/io/io.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/io_patch.dart"
supported: false

isolate:
uri: "../../dart-sdk/lib/isolate/isolate.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart"
uri: "../../../../dart-sdk/lib/isolate/isolate.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/isolate_patch.dart"
supported: false

js:
uri: "../../dart-sdk/lib/js/dart2js/js_dart2js.dart"
uri: "../../../../dart-sdk/lib/js/dart2js/js_dart2js.dart"

_js:
uri: "../../dart-sdk/lib/js/_js.dart"
patches: "../../dart-sdk/lib/js/_js_client.dart"
uri: "../../../../dart-sdk/lib/js/_js.dart"
patches: "../../../../dart-sdk/lib/js/_js_client.dart"

js_util:
uri: "../../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart"
uri: "../../../../dart-sdk/lib/js_util/dart2js/js_util_dart2js.dart"

math:
uri: "../../dart-sdk/lib/math/math.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart"
uri: "../../../../dart-sdk/lib/math/math.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/math_patch.dart"

mirrors:
uri: "../../dart-sdk/lib/mirrors/mirrors.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart"
uri: "../../../../dart-sdk/lib/mirrors/mirrors.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/mirrors_patch_cfe.dart"
supported: false

typed_data:
uri: "../../dart-sdk/lib/typed_data/typed_data.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart"
uri: "../../../../dart-sdk/lib/typed_data/typed_data.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/typed_data_patch.dart"

_native_typed_data:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/native_typed_data.dart"

svg:
uri: "../../dart-sdk/lib/svg/dart2js/svg_dart2js.dart"
uri: "../../../../dart-sdk/lib/svg/dart2js/svg_dart2js.dart"

web_audio:
uri: "../../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart"
uri: "../../../../dart-sdk/lib/web_audio/dart2js/web_audio_dart2js.dart"

web_gl:
uri: "../../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart"
uri: "../../../../dart-sdk/lib/web_gl/dart2js/web_gl_dart2js.dart"

web_sql:
uri: "../../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart"
uri: "../../../../dart-sdk/lib/web_sql/dart2js/web_sql_dart2js.dart"

_internal:
uri: "../../dart-sdk/lib/internal/internal.dart"
patches: "../../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart"
uri: "../../../../dart-sdk/lib/internal/internal.dart"
patches: "../../../../dart-sdk/lib/_internal/js_runtime/lib/internal_patch.dart"

_js_helper:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_helper.dart"

_interceptors:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/interceptors.dart"

_foreign_helper:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/foreign_helper.dart"

_js_names:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_names.dart"

_js_primitives:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/js_primitives.dart"

_js_embedded_names:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/embedded_names.dart"

_async_await_error_codes:
uri: "../../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart"
uri: "../../../../dart-sdk/lib/_internal/js_runtime/lib/shared/async_await_error_codes.dart"

_metadata:
uri: "../../dart-sdk/lib/html/html_common/metadata.dart"
uri: "../../../../dart-sdk/lib/html/html_common/metadata.dart"
15 changes: 15 additions & 0 deletions lib/stub_ui/window.dart
Original file line number Diff line number Diff line change
Expand Up @@ -909,6 +909,21 @@ class AccessibilityFeatures {
int get hashCode => _index.hashCode;
}

/// Describes the contrast of a theme or color palette.
enum Brightness {
/// The color is dark and will require a light text color to achieve readable
/// contrast.
///
/// For example, the color might be dark grey, requiring white text.
dark,

/// The color is light and will require a dark text color to achieve readable
/// contrast.
///
/// For example, the color might be bright white, requiring black text.
light,
}

/// The [Window] singleton. This object exposes the size of the display, the
/// core scheduler API, the input event callback, the graphics drawing API, and
/// other such core services.
Expand Down

0 comments on commit ee0cf82

Please sign in to comment.