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

Side by Side Diff: client/html/src/Element.dart

Issue 8363040: Implement measurement using futures (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: take2 Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 interface ElementList extends List<Element> { 5 interface ElementList extends List<Element> {
6 // TODO(jacobr): add element batch manipulation methods. 6 // TODO(jacobr): add element batch manipulation methods.
7 Element get first(); 7 Element get first();
8 // TODO(jacobr): add insertAt 8 // TODO(jacobr): add insertAt
9 } 9 }
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 EventListenerList get submit(); 62 EventListenerList get submit();
63 EventListenerList get touchCancel(); 63 EventListenerList get touchCancel();
64 EventListenerList get touchEnd(); 64 EventListenerList get touchEnd();
65 EventListenerList get touchLeave(); 65 EventListenerList get touchLeave();
66 EventListenerList get touchMove(); 66 EventListenerList get touchMove();
67 EventListenerList get touchStart(); 67 EventListenerList get touchStart();
68 EventListenerList get transitionEnd(); 68 EventListenerList get transitionEnd();
69 EventListenerList get fullscreenChange(); 69 EventListenerList get fullscreenChange();
70 } 70 }
71 71
72 /**
73 * All your element measurement needs in one place
74 */
75 interface ElementRect {
76 ClientRect get client();
77 ClientRect get offset();
78 ClientRect get scroll();
79 ClientRect get bounding();
80 List<ClientRect> get clientRects();
81 }
82
83
72 interface Element extends Node /*, common.NodeSelector, common.ElementTraversal */ 84 interface Element extends Node /*, common.NodeSelector, common.ElementTraversal */
73 factory ElementWrappingImplementation { 85 factory ElementWrappingImplementation {
74 86
75 Element.html(String html); 87 Element.html(String html);
76 Element.tag(String tag); 88 Element.tag(String tag);
77 89
78 Map<String, String> get attributes(); 90 Map<String, String> get attributes();
79 void set attributes(Map<String, String> value); 91 void set attributes(Map<String, String> value);
80 92
81 ElementList get elements(); 93 ElementList get elements();
82 94
83 // TODO: The type of value should be Collection<Element>. See http://b/5392897 95 // TODO: The type of value should be Collection<Element>. See http://b/5392897
84 void set elements(value); 96 void set elements(value);
85 97
86 Set<String> get classes(); 98 Set<String> get classes();
87 99
88 // TODO: The type of value should be Collection<String>. See http://b/5392897 100 // TODO: The type of value should be Collection<String>. See http://b/5392897
89 void set classes(value); 101 void set classes(value);
90 102
91 Map<String, String> get dataAttributes(); 103 Map<String, String> get dataAttributes();
92 void set dataAttributes(Map<String, String> value); 104 void set dataAttributes(Map<String, String> value);
93 105
94 int get clientHeight();
95
96 int get clientLeft();
97
98 int get clientTop();
99
100 int get clientWidth();
101
102 String get contentEditable(); 106 String get contentEditable();
103 107
104 void set contentEditable(String value); 108 void set contentEditable(String value);
105 109
106 String get dir(); 110 String get dir();
107 111
108 void set dir(String value); 112 void set dir(String value);
109 113
110 bool get draggable(); 114 bool get draggable();
111 115
(...skipping 16 matching lines...) Expand all
128 bool get isContentEditable(); 132 bool get isContentEditable();
129 133
130 String get lang(); 134 String get lang();
131 135
132 void set lang(String value); 136 void set lang(String value);
133 137
134 Element get lastElementChild(); 138 Element get lastElementChild();
135 139
136 Element get nextElementSibling(); 140 Element get nextElementSibling();
137 141
138 int get offsetHeight();
139
140 int get offsetLeft();
141
142 Element get offsetParent(); 142 Element get offsetParent();
143 143
144 int get offsetTop();
145
146 int get offsetWidth();
147
148 String get outerHTML(); 144 String get outerHTML();
149 145
150 Element get previousElementSibling(); 146 Element get previousElementSibling();
151 147
152 int get scrollHeight();
153
154 int get scrollLeft();
155
156 void set scrollLeft(int value); 148 void set scrollLeft(int value);
157 149
158 int get scrollTop();
159
160 void set scrollTop(int value); 150 void set scrollTop(int value);
161 151
162 int get scrollWidth();
163
164 bool get spellcheck(); 152 bool get spellcheck();
165 153
166 void set spellcheck(bool value); 154 void set spellcheck(bool value);
167 155
168 CSSStyleDeclaration get style(); 156 CSSStyleDeclaration get style();
169 157
170 int get tabIndex(); 158 int get tabIndex();
171 159
172 void set tabIndex(int value); 160 void set tabIndex(int value);
173 161
174 String get tagName(); 162 String get tagName();
175 163
176 String get title(); 164 String get title();
177 165
178 void set title(String value); 166 void set title(String value);
179 167
180 String get webkitdropzone(); 168 String get webkitdropzone();
181 169
182 void set webkitdropzone(String value); 170 void set webkitdropzone(String value);
183 171
184 void blur(); 172 void blur();
185 173
186 void focus(); 174 void focus();
187 175
188 ClientRect getBoundingClientRect();
189
190 List<ClientRect> getClientRects();
191
192 Element insertAdjacentElement([String where, Element element]); 176 Element insertAdjacentElement([String where, Element element]);
193 177
194 void insertAdjacentHTML([String position_OR_where, String text]); 178 void insertAdjacentHTML([String position_OR_where, String text]);
195 179
196 void insertAdjacentText([String where, String text]); 180 void insertAdjacentText([String where, String text]);
197 181
198 Element query(String selectors); 182 Element query(String selectors);
199 183
200 ElementList queryAll(String selectors); 184 ElementList queryAll(String selectors);
201 185
202 Element get parent(); 186 Element get parent();
203 187
204 void scrollByLines([int lines]); 188 void scrollByLines([int lines]);
205 189
206 void scrollByPages([int pages]); 190 void scrollByPages([int pages]);
207 191
208 void scrollIntoView([bool centerIfNeeded]); 192 void scrollIntoView([bool centerIfNeeded]);
209 193
210 bool matchesSelector([String selectors]); 194 bool matchesSelector([String selectors]);
211 195
196 Future<ElementRect> get rect();
197
198 Future<CSSStyleDeclaration> get computedStyle();
199
200 Future<CSSStyleDeclaration> getComputedStyle(String pseudoElement);
201
212 ElementEvents get on(); 202 ElementEvents get on();
213 } 203 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698