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

Unified Diff: client/html/src/WindowWrappingImplementation.dart

Issue 9148015: Example showing alternate async measurement solution (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final version Created 8 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
Index: client/html/src/WindowWrappingImplementation.dart
diff --git a/client/html/src/WindowWrappingImplementation.dart b/client/html/src/WindowWrappingImplementation.dart
index a4f8b9c954f10c66c1af42d722bbbc12e38daf6d..bfa7af7541fbc2e4970b2c0f5d265c7aa643cebb 100644
--- a/client/html/src/WindowWrappingImplementation.dart
+++ b/client/html/src/WindowWrappingImplementation.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.
@@ -803,6 +803,7 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
}
Point webkitConvertPointFromNodeToPage([Node node = null, Point p = null]) {
+ assert(_inMeasurementFrame);
if (node === null) {
if (p === null) {
return LevelDom.wrapPoint(_ptr.webkitConvertPointFromNodeToPage());
@@ -818,6 +819,7 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
}
Point webkitConvertPointFromPageToNode([Node node = null, Point p = null]) {
+ assert(_inMeasurementFrame);
if (node === null) {
if (p === null) {
return LevelDom.wrapPoint(_ptr.webkitConvertPointFromPageToNode());
@@ -836,10 +838,12 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
return _ptr.webkitRequestAnimationFrame(callback, LevelDom.unwrap(element));
}
- void requestLayoutFrame(TimeoutHandler callback) {
+ void requestMeasurementFrame(MeasurementCallback callback) {
_addMeasurementFrameCallback(callback);
}
+ bool get inMeasurementFrame() => _inMeasurementFrame;
+
WindowEvents get on() {
if (_on === null) {
_on = new WindowEventsImplementation._wrap(_ptr);

Powered by Google App Engine
This is Rietveld 408576698