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

Unified Diff: samples/swarm/swarm_ui_lib/touch/Scroller.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/ViewLayout.dart ('k') | samples/swarm/swarm_ui_lib/view/PagedViews.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/swarm/swarm_ui_lib/touch/Scroller.dart
diff --git a/samples/swarm/swarm_ui_lib/touch/Scroller.dart b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
index 196d910854e6e0f2a632bde7d101e7872526b291..7c21a692c64ba533c689c3b5c75250a8b701f33b 100644
--- a/samples/swarm/swarm_ui_lib/touch/Scroller.dart
+++ b/samples/swarm/swarm_ui_lib/touch/Scroller.dart
@@ -233,9 +233,7 @@ class Scroller implements Draggable, MomentumDelegate {
// The scrollable element must be relatively positioned.
// TODO(jacobr): this assert fires asynchronously which could be confusing.
if (_scrollTechnique == ScrollerScrollTechnique.RELATIVE_POSITIONING) {
- _element.computedStyle.then((CssStyleDeclaration style) {
- assert(style.position != "static");
- });
+ assert(_element.getComputedStyle().position != "static");
}
_initLayer();
@@ -543,7 +541,7 @@ class Scroller implements Draggable, MomentumDelegate {
* and maxPoint allowed for scrolling.
*/
void _resize(Callback callback) {
- window.requestLayoutFrame(() {
+ window.setImmediate(() {
if (_lookupContentSizeDelegate != null) {
_contentSize = _lookupContentSizeDelegate();
} else {
« no previous file with comments | « samples/swarm/swarm_ui_lib/layout/ViewLayout.dart ('k') | samples/swarm/swarm_ui_lib/view/PagedViews.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698