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

Side by Side Diff: Source/devtools/front_end/ui/ViewportControl.js

Issue 663083004: [DevTools] Remove remaining usages of global properties. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed review comments Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/devtools/front_end/ui/View.js ('k') | Source/devtools/front_end/ui/ZoomManager.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 * @param {number} index 223 * @param {number} index
224 * @return {number} 224 * @return {number}
225 */ 225 */
226 _cachedItemHeight: function(index) 226 _cachedItemHeight: function(index)
227 { 227 {
228 return index === 0 ? this._cumulativeHeights[0] : this._cumulativeHeight s[index] - this._cumulativeHeights[index - 1]; 228 return index === 0 ? this._cumulativeHeights[0] : this._cumulativeHeight s[index] - this._cumulativeHeights[index - 1];
229 }, 229 },
230 230
231 /** 231 /**
232 * @param {?Selection} selection 232 * @param {?Selection} selection
233 * @suppressGlobalPropertiesCheck
233 */ 234 */
234 _isSelectionBackwards: function(selection) 235 _isSelectionBackwards: function(selection)
235 { 236 {
236 if (!selection || !selection.rangeCount) 237 if (!selection || !selection.rangeCount)
237 return false; 238 return false;
238 var range = document.createRange(); 239 var range = document.createRange();
239 range.setStart(selection.anchorNode, selection.anchorOffset); 240 range.setStart(selection.anchorNode, selection.anchorOffset);
240 range.setEnd(selection.focusNode, selection.focusOffset); 241 range.setEnd(selection.focusNode, selection.focusOffset);
241 return range.collapsed; 242 return range.collapsed;
242 }, 243 },
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 602
602 /** 603 /**
603 * @return {number} 604 * @return {number}
604 */ 605 */
605 _visibleHeight: function() 606 _visibleHeight: function()
606 { 607 {
607 // Use offsetHeight instead of clientHeight to avoid being affected by h orizontal scroll. 608 // Use offsetHeight instead of clientHeight to avoid being affected by h orizontal scroll.
608 return this.element.offsetHeight; 609 return this.element.offsetHeight;
609 } 610 }
610 } 611 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/ui/View.js ('k') | Source/devtools/front_end/ui/ZoomManager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698