Remove dead CaretBrowsing code
This commit is contained in:
parent
8211183567
commit
3c1ab71fce
@ -755,31 +755,6 @@ window._qutebrowser.caret = (function() {
|
|||||||
*/
|
*/
|
||||||
CaretBrowsing.isSelectionCollapsed = false;
|
CaretBrowsing.isSelectionCollapsed = false;
|
||||||
|
|
||||||
/**
|
|
||||||
* The id returned by window.setInterval for our blink function, so
|
|
||||||
* we can cancel it when caret browsing is disabled.
|
|
||||||
* @type {number?}
|
|
||||||
*/
|
|
||||||
CaretBrowsing.blinkFunctionId = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The desired x-coordinate to match when moving the caret up and down.
|
|
||||||
* To match the behavior as documented in Mozilla's caret browsing spec
|
|
||||||
* (http://www.mozilla.org/access/keyboard/proposal), we keep track of the
|
|
||||||
* initial x position when the user starts moving the caret up and down,
|
|
||||||
* so that the x position doesn't drift as you move throughout lines, but
|
|
||||||
* stays as close as possible to the initial position. This is reset when
|
|
||||||
* moving left or right or clicking.
|
|
||||||
* @type {number?}
|
|
||||||
*/
|
|
||||||
CaretBrowsing.targetX = null;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* A flag that flips on or off as the caret blinks.
|
|
||||||
* @type {boolean}
|
|
||||||
*/
|
|
||||||
CaretBrowsing.blinkFlag = true;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Whether we're running on Windows.
|
* Whether we're running on Windows.
|
||||||
* @type {boolean}
|
* @type {boolean}
|
||||||
@ -988,7 +963,6 @@ window._qutebrowser.caret = (function() {
|
|||||||
*/
|
*/
|
||||||
CaretBrowsing.recreateCaretElement = function() {
|
CaretBrowsing.recreateCaretElement = function() {
|
||||||
if (CaretBrowsing.caretElement) {
|
if (CaretBrowsing.caretElement) {
|
||||||
window.clearInterval(CaretBrowsing.blinkFunctionId);
|
|
||||||
CaretBrowsing.caretElement.parentElement.removeChild(
|
CaretBrowsing.caretElement.parentElement.removeChild(
|
||||||
CaretBrowsing.caretElement);
|
CaretBrowsing.caretElement);
|
||||||
CaretBrowsing.caretElement = null;
|
CaretBrowsing.caretElement = null;
|
||||||
@ -1233,7 +1207,6 @@ window._qutebrowser.caret = (function() {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
window.setTimeout(() => {
|
window.setTimeout(() => {
|
||||||
CaretBrowsing.targetX = null;
|
|
||||||
CaretBrowsing.updateCaretOrSelection(false);
|
CaretBrowsing.updateCaretOrSelection(false);
|
||||||
}, 0);
|
}, 0);
|
||||||
return true;
|
return true;
|
||||||
@ -1251,7 +1224,6 @@ window._qutebrowser.caret = (function() {
|
|||||||
CaretBrowsing.updateCaretOrSelection(true);
|
CaretBrowsing.updateCaretOrSelection(true);
|
||||||
} else if (!CaretBrowsing.isCaretVisible &&
|
} else if (!CaretBrowsing.isCaretVisible &&
|
||||||
CaretBrowsing.caretElement) {
|
CaretBrowsing.caretElement) {
|
||||||
window.clearInterval(CaretBrowsing.blinkFunctionId);
|
|
||||||
if (CaretBrowsing.caretElement) {
|
if (CaretBrowsing.caretElement) {
|
||||||
CaretBrowsing.isSelectionCollapsed = false;
|
CaretBrowsing.isSelectionCollapsed = false;
|
||||||
CaretBrowsing.caretElement.parentElement.removeChild(
|
CaretBrowsing.caretElement.parentElement.removeChild(
|
||||||
|
Loading…
Reference in New Issue
Block a user