Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Unified Diff: samples/swarm/swarm_ui_lib/layout/ViewLayout.dart

Issue 12087004: Changing window.requestLayoutFrame into a microtask API (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « samples/swarm/swarm_ui_lib/layout/GridLayout.dart ('k') | samples/swarm/swarm_ui_lib/touch/Scroller.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
diff --git a/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart b/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
index 4b60138752b86a4e8412c739118fe97b513440ac..28211738448a631116d6bd596fd0a0c5bcf500a1 100644
--- a/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
+++ b/samples/swarm/swarm_ui_lib/layout/ViewLayout.dart
@@ -29,12 +29,12 @@ abstract class Positionable {
class LayoutParams {
// TODO(jmesserly): should be const, but there's a bug in DartC preventing us
// from calling "window." in an initializer. See b/5332777
- Future<CssStyleDeclaration> style;
+ CssStyleDeclaration style;
int get layer => 0;
LayoutParams(Element node) {
- style = node.computedStyle;
+ style = node.getComputedStyle();
}
}
@@ -105,7 +105,7 @@ class ViewLayout {
return view.customStyle['display'] == "-dart-grid";
}
- CssStyleDeclaration get _style => layoutParams.style.value;
+ CssStyleDeclaration get _style => layoutParams.style;
void cacheExistingBrowserLayout() {
_offsetWidth = view.node.offsetWidth;
@@ -191,7 +191,7 @@ class ViewLayout {
}
int measureWidth(ViewLayout parent, ContentSizeMode mode) {
- final style = layoutParams.style.value;
+ final style = layoutParams.style;
if (mode == ContentSizeMode.MIN) {
return _styleToPixels(
style.minWidth, currentWidth, parent.currentWidth);
@@ -202,7 +202,7 @@ class ViewLayout {
}
int measureHeight(ViewLayout parent, ContentSizeMode mode) {
- final style = layoutParams.style.value;
+ final style = layoutParams.style;
if (mode == ContentSizeMode.MIN) {
return _styleToPixels(
style.minHeight, currentHeight, parent.currentHeight);
« no previous file with comments | « samples/swarm/swarm_ui_lib/layout/GridLayout.dart ('k') | samples/swarm/swarm_ui_lib/touch/Scroller.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698