Index: client/samples/total/src/InnerMenuView.dart |
diff --git a/client/samples/total/src/InnerMenuView.dart b/client/samples/total/src/InnerMenuView.dart |
index 4218ad02fb1e9920d4abb6d89618020b0229de8d..29e9564fe8c487165977ddff92608f55d413e645 100644 |
--- a/client/samples/total/src/InnerMenuView.dart |
+++ b/client/samples/total/src/InnerMenuView.dart |
@@ -1,4 +1,4 @@ |
-// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
+// Copyright (c) 2012, 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. |
@@ -47,13 +47,14 @@ class InnerMenuView { |
// cell. |
static void _pinHeight(Window window, TableRowElement row) { |
Element firstCell = row.cells[0]; |
- final firstCellRect = firstCell.rect; |
- final style = firstCell.computedStyle; |
- window.requestLayoutFrame(() { |
- int height = firstCellRect.value.client.height |
- - HtmlUtils.fromPx(style.value.getPropertyValue('padding-top')) |
- - HtmlUtils.fromPx(style.value.getPropertyValue('padding-bottom')); |
- firstCell.style.setProperty('height', HtmlUtils.toPx(height)); |
+ window.requestMeasurementFrame(() { |
+ final firstCellRect = firstCell.rect; |
+ final style = firstCell.computedStyle; |
+ |
+ int height = firstCell.rect.client.height |
+ - HtmlUtils.fromPx(style.paddingTop) |
+ - HtmlUtils.fromPx(style.paddingBottom); |
+ return () { firstCell.style.height = HtmlUtils.toPx(height); }; |
}); |
} |
@@ -212,13 +213,11 @@ class InnerMenuView { |
} |
// Must take into account the top of the table due to scrolling. |
- final offsetParentRect = _row.offsetParent.rect; |
- final rowRect = _row.rect; |
- window.requestLayoutFrame(() { |
- int tableTop = offsetParentRect.value.bounding.top.toInt(); |
+ window.requestMeasurementFrame(() { |
+ int tableTop = _row.offsetParent.rect.bounding.top.toInt(); |
// Get the current bounding box of the row we're attached to. |
- ClientRect boundingRowRect = rowRect.value.bounding; |
+ ClientRect boundingRowRect = _row.rect.bounding; |
CSSStyleDeclaration style = _bar.style; |
int top = boundingRowRect.top.toInt() + _initialRowHeight - tableTop; |
@@ -226,10 +225,12 @@ class InnerMenuView { |
_currentRowHeight = height; |
- style.setProperty("top", HtmlUtils.toPx(top)); |
- style.setProperty("height", HtmlUtils.toPx(height)); |
+ return () { |
+ style.setProperty("top", HtmlUtils.toPx(top)); |
+ style.setProperty("height", HtmlUtils.toPx(height)); |
- _innerMenuMoved(); |
+ _innerMenuMoved(); |
+ }; |
}); |
} |