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

Side by Side Diff: tools/dom/templates/html/impl/impl_Window.darttemplate

Issue 1832713002: Optimize dartium dart:html bindings so real world application performance is acceptable. Improves d… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: update cached patches Created 4 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 @DocsEditable() 7 @DocsEditable()
8 $if DART2JS 8 $if DART2JS
9 $(ANNOTATIONS)@Native("Window,DOMWindow") 9 $(ANNOTATIONS)@Native("Window,DOMWindow")
10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS { 10 $(CLASS_MODIFIERS)class $CLASSNAME$EXTENDS$IMPLEMENTS {
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 * from MDN. 290 * from MDN.
291 */ 291 */
292 @DomName('Window.scrollY') 292 @DomName('Window.scrollY')
293 @DocsEditable() 293 @DocsEditable()
294 int get scrollY => JS('bool', '("scrollY" in #)', this) ? 294 int get scrollY => JS('bool', '("scrollY" in #)', this) ?
295 JS('num', '#.scrollY', this).round() : 295 JS('num', '#.scrollY', this).round() :
296 document.documentElement.scrollTop; 296 document.documentElement.scrollTop;
297 $else 297 $else
298 @DomName('Window.pageXOffset') 298 @DomName('Window.pageXOffset')
299 @DocsEditable() 299 @DocsEditable()
300 int get pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(unwrap_ jso(this)).round(); 300 int get pageXOffset => _blink.BlinkWindow.instance.pageXOffset_Getter_(this).r ound();
301 301
302 @DomName('Window.pageYOffset') 302 @DomName('Window.pageYOffset')
303 @DocsEditable() 303 @DocsEditable()
304 int get pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(unwrap_ jso(this)).round(); 304 int get pageYOffset => _blink.BlinkWindow.instance.pageYOffset_Getter_(this).r ound();
305 305
306 @DomName('Window.scrollX') 306 @DomName('Window.scrollX')
307 @DocsEditable() 307 @DocsEditable()
308 int get scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(unwrap_jso(this )).round(); 308 int get scrollX => _blink.BlinkWindow.instance.scrollX_Getter_(this).round();
309 309
310 @DomName('Window.scrollY') 310 @DomName('Window.scrollY')
311 @DocsEditable() 311 @DocsEditable()
312 int get scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(unwrap_jso(this )).round(); 312 int get scrollY => _blink.BlinkWindow.instance.scrollY_Getter_(this).round();
313 $endif 313 $endif
314 } 314 }
315 315
316 $if DART2JS 316 $if DART2JS
317 class _BeforeUnloadEvent extends _WrappedEvent implements BeforeUnloadEvent { 317 class _BeforeUnloadEvent extends _WrappedEvent implements BeforeUnloadEvent {
318 String _returnValue; 318 String _returnValue;
319 319
320 _BeforeUnloadEvent(Event base): super(base); 320 _BeforeUnloadEvent(Event base): super(base);
321 321
322 String get returnValue => _returnValue; 322 String get returnValue => _returnValue;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 361
362 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false }) { 362 ElementStream<BeforeUnloadEvent> forElement(Element e, {bool useCapture: false }) {
363 return new _ElementEventStreamImpl(e, _eventType, useCapture); 363 return new _ElementEventStreamImpl(e, _eventType, useCapture);
364 } 364 }
365 365
366 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e, 366 ElementStream<BeforeUnloadEvent> _forElementList(ElementList e,
367 {bool useCapture: false}) { 367 {bool useCapture: false}) {
368 return new _ElementListEventStreamImpl(e, _eventType, useCapture); 368 return new _ElementListEventStreamImpl(e, _eventType, useCapture);
369 } 369 }
370 } 370 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698