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

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

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove duplicated imports from html.dart Created 9 years, 2 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 | « client/html/src/Window.dart ('k') | client/layout/GridLayout.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/html/src/WindowWrappingImplementation.dart
diff --git a/client/html/src/WindowWrappingImplementation.dart b/client/html/src/WindowWrappingImplementation.dart
index aeaa5c291410fa34eedf253bb0b9dc200d068862..2afda2269b06fc6e25afbe6b96eb464be6eaf0ba 100644
--- a/client/html/src/WindowWrappingImplementation.dart
+++ b/client/html/src/WindowWrappingImplementation.dart
@@ -597,9 +597,8 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
}
}
- FileReader createFileReader() {
- return LevelDom.wrapFileReader(_ptr.createFileReader());
- }
+ FileReader createFileReader() =>
+ LevelDom.wrapFileReader(_ptr.createFileReader());
CSSMatrix createCSSMatrix([String cssValue = null]) {
if (cssValue === null) {
@@ -688,24 +687,8 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
_ptr.focus();
}
- CSSStyleDeclaration getComputedStyle([Element element = null, String pseudoElement = null]) {
- if (element === null) {
- if (pseudoElement === null) {
- return LevelDom.wrapCSSStyleDeclaration(_ptr.getComputedStyle());
- }
- } else {
- if (pseudoElement === null) {
- return LevelDom.wrapCSSStyleDeclaration(_ptr.getComputedStyle(LevelDom.unwrap(element)));
- } else {
- return LevelDom.wrapCSSStyleDeclaration(_ptr.getComputedStyle(LevelDom.unwrap(element), pseudoElement));
- }
- }
- throw "Incorrect number or type of arguments";
- }
-
- DOMSelection getSelection() {
- return LevelDom.wrapDOMSelection(_ptr.getSelection());
- }
+ DOMSelection getSelection() =>
+ LevelDom.wrapDOMSelection(_ptr.getSelection());
MediaQueryList matchMedia(String query) {
return LevelDom.wrapMediaQueryList(_ptr.matchMedia(query));
@@ -788,24 +771,11 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
_ptr.scrollTo(x, y);
}
- int setInterval(TimeoutHandler handler, int timeout) {
- return _ptr.setInterval(handler, timeout);
- }
+ int setInterval(TimeoutHandler handler, int timeout) =>
+ _ptr.setInterval(handler, timeout);
- int setTimeout([TimeoutHandler handler = null, int timeout = null]) {
- if (handler === null) {
- if (timeout === null) {
- return _ptr.setTimeout();
- }
- } else {
- if (timeout === null) {
- return _ptr.setTimeout(handler);
- } else {
- return _ptr.setTimeout(handler, timeout);
- }
- }
- throw "Incorrect number or type of arguments";
- }
+ int setTimeout(TimeoutHandler handler, int timeout) =>
+ _ptr.setTimeout(handler, timeout);
Object showModalDialog(String url, [Object dialogArgs = null, String featureArgs = null]) {
if (dialogArgs === null) {
@@ -865,10 +835,15 @@ class WindowWrappingImplementation extends EventTargetWrappingImplementation imp
if (element === null) {
return _ptr.webkitRequestAnimationFrame(callback);
} else {
- return _ptr.webkitRequestAnimationFrame(callback, LevelDom.unwrap(element));
+ return _ptr.webkitRequestAnimationFrame(
+ callback, LevelDom.unwrap(element));
}
}
+ void requestLayoutFrame(TimeoutHandler callback) {
+ _addMeasurementFrameCallback(callback);
+ }
+
WindowEvents get on() {
if (_on === null) {
_on = new WindowEventsImplementation._wrap(_ptr);
« no previous file with comments | « client/html/src/Window.dart ('k') | client/layout/GridLayout.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698