aboutsummaryrefslogtreecommitdiffstats
path: root/content_scripts
AgeCommit message (Collapse)Author
2015-02-08Push fond-mode queries from incognito-mode tabs to other incognito tabs.Stephen Blott
2015-02-08Find-mode history now incorporates ingognito mode.Stephen Blott
2015-02-08Handle incognito mode for find-mode history.Stephen Blott
The approach is to maintain the "current" history in every tab, adding queries from other normal tabs in all tabs, but only saving queries from non-incognito mode tabs. So, queries from non-incognito mode tabs propagate everywhere, whereas those from incognito tabs never leave the tab.
2015-02-08Fix error introduced in 5c155d5eab6632fda9b71713e11af299726d5204.Stephen Blott
2015-02-08Incognito mode for find history.Stephen Blott
- This commit is incomplete because, to progress, we need bc7db7473456713c8c84f324e71da93145ffa2a0.
2015-02-08Fix error introduced in 5c155d5eab6632fda9b71713e11af299726d5204.Stephen Blott
2015-02-08Fix typo/bug initialising passkeys.Stephen Blott
2015-02-08Fix typo/bug initialising passkeys.Stephen Blott
2015-02-08Refactor migration code for find-mode history.Stephen Blott
Doing the migration in a content script is dumb. Now we do it on the background page.
2015-02-08Temporary fix for obscure scrolling bug.Stephen Blott
I'm seeing a strange scrolling bug on some pages, for example, here: http://www.steephill.tv/tour-of-qatar/. Background: When we scroll, we first have to decide which element to scroll. Because of a chrome bug, we do this by testing candidate elements: scroll the element up by one px, then back down again. If it moved, then it's scrollable, and it's the element we should scroll. Bug: In some cases, the micro-scroll-up succeeds, but the subsequent micro-scroll-down fails. It's not clear how this could happen. It may be a chrome bug. In any case, as a result, we conclude that the element is not scrollable, and proceed to the next candidate. We end up finding no scrollable element, and j/k scrolling is broken. If you press-and-hold "j" or "k", you can see the repeated micro-scroll-ups. Problem: I can't reproduce this in a clean chrome account. I only see it in my live chrome instance. I've tried disabling all extensions, but the problem persists. So there's something else at play, but I haven't yet been able to track it down. Solution: This commit is a temporary workaround. We just default to scrolling document.body if we can't find anything else to scroll. Most of the time, that's the right thing to do. And it's what we would have done prior to implementing smooth scrolling. Nevertheless, it isn't a great solution... Notes: It's possible that this is related to #1117. However, users there have reported *not* seeing the micro-scrolls. So probably not. I'm not posting this as a PR, because I can't reliably reproduce the bug. However, the fix pretty much does what we did before smooth scrolling, it's almost certainly safe. So I'm just pushing this straight into master.
2015-02-06Visual/edit modes: code cleanup.Stephen Blott
- convert getCaretCoordinates from JS to CS - handle x axis in scrollIntoView - better comments throughout.
2015-02-06Merge branch 'post-modes-update'Stephen Blott
Conflicts: content_scripts/vimium_frontend.coffee
2015-02-05Visual/edit modes: Fix ae1697b6697e24c77fc852b02c760871db995a3f...Stephen Blott
which was broken.
2015-02-05Visual/edit modes: always fully remove the selection on exit from visual mode.Stephen Blott
There's considerable discussion in #1441 as to what we should do with the selection on leaving visual mode. Good arguments have been made as to why we should keep the selection. However, at this point, keep-it-simple seems like the best strategy, and wholly removing the selection (probably) provides fewer ways for the user to shoot themselves in the foot.
2015-02-05Visual/edit modes: visualmode-escape clears selection.Stephen Blott
This effectively reverts 95e086563b918364d3038f6489cc97c73fcb7180 (Escape-Escape clears selection) pending discussion of the right UX around exitng visual mode.
2015-02-04Revert "Visual/edit modes: better (?) guessing for caret mode."Stephen Blott
This reverts commit c1681fea2f2629c6bee1e27c5dfc704d77553d96.
2015-02-03Merge branch 'find-mode-history'Stephen Blott
Conflicts: content_scripts/vimium_frontend.coffee
2015-02-03Visual/edit modes: fix bug in event handling.Stephen Blott
2015-02-03Visual/edit modes: better (?) guessing for caret mode.Stephen Blott
When caret mode guesses a selection score text nodes by their visible area and the number of non-whitespace characters they contain. Choose the first non-whitespace character in the highest-scoring node. The intention is to avoid making a poor choice for the initial caret position.
2015-02-02Visual/edit modes: Escape-Escape clears selection.Stephen Blott
2015-02-02Visual/edit modes: WIP, scrolling content editable.Stephen Blott
2015-02-02Strip unreachable code post #1413.Stephen Blott
The stripped code is all relocated in #1413.
2015-02-02Visual/edit modes: escape in visual mode clears selection.Stephen Blott
2015-02-02Visual/edit modes: WIP, scrolling content editable.Stephen Blott
2015-02-02Provide visual feedback from focusInput if there is no visible input.Stephen Blott
If focusInput does not find a visible input, then pop up the HUD to tell the user. Without this, the user gets no feedback as to what happened.
2015-02-02Get the right match count for find.Stephen Blott
2015-02-01Exit FindMode on delete from empty query.Stephen Blott
This was an oversight from #1413 (that find mode exits in this circumstance).
2015-02-01Refactor (simplify) find mode.Stephen Blott
2015-02-01With find mode history, remember any partial query.Stephen Blott
2015-02-01Do not show match count if there is no query.Stephen Blott
2015-02-01Merge branch 'modes-rework-dom-tests'Stephen Blott
2015-02-01Resize HUD so the contents are fully visiblemrmr1993
2015-02-01Merge remote-tracking branch 'mrmr1993/resize-HUD'Stephen Blott
2015-02-01Find mode: report "1 Match", not "1 Matches".Stephen Blott
2015-02-01Visual/edit modes: tweaks...Stephen Blott
- Collapse to focus when entering caret mode from visual mode.
2015-02-01Find-mode history, tweaks.Stephen Blott
2015-02-01Give find mode a history.Stephen Blott
2015-02-01Visual/edit modes: fine-tune entry/exit logic.Stephen Blott
- When the user exits visual mode via escape, we reinstall the original selection (from launch).
2015-02-01Visual/edit modes: yet another code review.Stephen Blott
2015-01-31Visual/edit modes: exit visual mode on click in input element.Stephen Blott
2015-01-31Visual/edit modes: character-by-character word movements.Stephen Blott
2015-01-31Visual/edit modes: change implementation of vimword.Stephen Blott
2015-01-31Visual/edit modes: change visual-mode start up...Stephen Blott
When visual mode launches and there *is* a selection but it's outside of the viewport, instead of scrolling it into view, ignore it, and start with a visible caret.
2015-01-31Revert "Fix scrolling issue."Stephen Blott
This reverts commit 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8. Nope. This is bad. It fixes the issue referred to in the commit record, but breaks scrolling out of text areas. With 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8: - Start editing in a text area, add enough text that it scrolls. - `Escape` - `k`, `k`, `k`, ... We expect first the text areas to scroll, then -- when it reaches the top -- the document to scroll. However, with 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8, we get stuck in the text area.
2015-01-31Revert "Fix scrolling issue."Stephen Blott
This reverts commit 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8. Nope. This is bad. It fixes the issue referred to in the commit record, but breaks scrolling out of text areas. With 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8: - Start editing in a text area, add enough text that it scrolls. - `Escape` - `k`, `k`, `k`, ... We expect first the text areas to scroll, then -- when it reaches the top -- the document to scroll. However, with 90d2addc9b8f95f9272f8c2a77bdaf9dfebc0fa8, we get stuck in the text area.
2015-01-31Fix scrolling issue.Stephen Blott
On this page: - http://www.steephill.tv/dubai-tour/ I was seeing a scrolling problem in my live browser (j/k didn't work until I clicked on the page), but couldn't reproduce it directly in my test browser. That's worrying. Nevertheless, what was happening was that we succeeded in scrolling a test amount in one direction, but the scroll to revert failed. The consequence was that we concluded (incorrectly) that the element doesn't scroll. And j/k scrolling is broken as a result. How can it be that a scroll in one direction succeeds, but the reverse does not? This fixes the problem by not checking whether we are able to undo the scroll of our test amount.
2015-01-31Fix scrolling issue.Stephen Blott
On this page: - http://www.steephill.tv/dubai-tour/ I was seeing a scrolling problem in my live browser (j/k didn't work until I clicked on the page), but couldn't reproduce it directly in my test browser. That's worrying. Nevertheless, what was happening was that we succeeded in scrolling a test amount in one direction, but the scroll to revert failed. The consequence was that we concluded (incorrectly) that the element doesn't scroll. And j/k scrolling is broken as a result. How can it be that a scroll in one direction succeeds, but the reverse does not? This fixes the problem by not checking whether we are able to undo the scroll of our test amount.
2015-01-31Visual/edit modes: rework lexical selection...Stephen Blott
- And drop "J".
2015-01-30Visual/edit modes: re-introduce "dap".Stephen Blott
2015-01-30Visual/edit modes: better "yy", "dd", an so on.Stephen Blott