| OLD | NEW |
| 1 /* | 1 /* |
| 2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
| 3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
| 4 * | 4 * |
| 5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
| 6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
| 7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
| 8 * | 8 * |
| 9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 objTabClassHidden: null, | 68 objTabClassHidden: null, |
| 69 | 69 |
| 70 /** | 70 /** |
| 71 * Document element the object tab is currently being displayed for. | 71 * Document element the object tab is currently being displayed for. |
| 72 * @type Element | 72 * @type Element |
| 73 */ | 73 */ |
| 74 currentElement: null, | 74 currentElement: null, |
| 75 | 75 |
| 76 /** | 76 /** |
| 77 * Windows that the window event handler is currently registered for. | 77 * Windows that the window event handler is currently registered for. |
| 78 * @type Array of Window | 78 * @type Window[] |
| 79 */ | 79 */ |
| 80 windowListeners: null, | 80 windowListeners: null, |
| 81 | 81 |
| 82 /** | 82 /** |
| 83 * Panel element currently used as object tab. | 83 * Panel element currently used as object tab. |
| 84 * @type Element | 84 * @type Element |
| 85 */ | 85 */ |
| 86 objtabElement: null, | 86 objtabElement: null, |
| 87 | 87 |
| 88 /** | 88 /** |
| (...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 | 347 |
| 348 if (this.objtabElement.getAttribute("class") != className) | 348 if (this.objtabElement.getAttribute("class") != className) |
| 349 this.objtabElement.setAttribute("class", className); | 349 this.objtabElement.setAttribute("class", className); |
| 350 | 350 |
| 351 this.prevPositionUpdate = Date.now(); | 351 this.prevPositionUpdate = Date.now(); |
| 352 }, | 352 }, |
| 353 | 353 |
| 354 /** | 354 /** |
| 355 * Calculates element's position relative to the top frame and considering | 355 * Calculates element's position relative to the top frame and considering |
| 356 * clipping due to scrolling. | 356 * clipping due to scrolling. |
| 357 * @return {left: Number, top: Number, right: Number, bottom: Number} | 357 * @return {{left: Number, top: Number, right: Number, bottom: Number}} |
| 358 */ | 358 */ |
| 359 _getElementPosition: function(/**Element*/ element) | 359 _getElementPosition: function(/**Element*/ element) |
| 360 { | 360 { |
| 361 // Restrict rectangle coordinates by the boundaries of a window's client are
a | 361 // Restrict rectangle coordinates by the boundaries of a window's client are
a |
| 362 function intersectRect(rect, wnd) | 362 function intersectRect(rect, wnd) |
| 363 { | 363 { |
| 364 // Cannot use wnd.innerWidth/Height because they won't account for scrollb
ars | 364 // Cannot use wnd.innerWidth/Height because they won't account for scrollb
ars |
| 365 let doc = wnd.document; | 365 let doc = wnd.document; |
| 366 let wndWidth = doc.documentElement.clientWidth; | 366 let wndWidth = doc.documentElement.clientWidth; |
| 367 let wndHeight = doc.documentElement.clientHeight; | 367 let wndHeight = doc.documentElement.clientHeight; |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 488 event.stopPropagation(); | 488 event.stopPropagation(); |
| 489 | 489 |
| 490 objTabs.doBlock(); | 490 objTabs.doBlock(); |
| 491 } | 491 } |
| 492 else if (event.type == "mouseover") | 492 else if (event.type == "mouseover") |
| 493 objTabs.showTabFor(objTabs.currentElement); | 493 objTabs.showTabFor(objTabs.currentElement); |
| 494 else if (event.type == "mouseout") | 494 else if (event.type == "mouseout") |
| 495 objTabs.hideTabFor(objTabs.currentElement); | 495 objTabs.hideTabFor(objTabs.currentElement); |
| 496 } | 496 } |
| 497 exports.objectMouseEventHander = objectMouseEventHander; | 497 exports.objectMouseEventHander = objectMouseEventHander; |
| OLD | NEW |