]> git.gir.st - VimFx.git/commit
Improve markable elements matching
authorSimon Lydell <simon.lydell@gmail.com>
Sat, 24 Jan 2015 15:41:38 +0000 (16:41 +0100)
committerSimon Lydell <simon.lydell@gmail.com>
Sat, 24 Jan 2015 15:41:38 +0000 (16:41 +0100)
commit05d60dba54f3d56c62855946a7a21bc97389f6a1
tree3a80a9da10798bd2ed710c0d3277f5fb553cea2f
parent83d765500b96dcc91d52b732073708f27e4546bc
Improve markable elements matching

- Each 'f' command now gets its own set of markable elements. For example, it
  does not make sense to open a button in a new tab.
- The above made it really easy to fix #227: Add 'gf' to follow link in new
  foreground/focused tab.
- Links are now opened in new tabs using Firefox APIs instead of simulating
  ctrl-clicks on the links. This is more reliable (and required in order to
  implement the above point).
- XPath is no longer used. Instead, every element in every frame of the page is
  checked with code. This might sound expensive, but it isn't since that's what
  the XPath matcher needs to do behind the scenes anyway. The benefit of doing
  it with code is that we can do more advanced checks (see below), and no
  information is lost along the way: For example, whether or not an element is
  considered "semantic" is saved, instead of needing to be re-calculated
  afterwards.
- The above fixes #320 in a better way than what was already done in commit
  016574212: Elements that have "button" in their class now must not contain an
  `<a>` or `<button>` element, so a marker for a "button-wrapper" is likely not
  even made and therefore cannot cover the real button inside.
- The above also significantly reduced the number of hints on reddit.com, which
  made the all hints shorter.
- While at it, I implemented #450: 'vf' now selects the contents of text inputs.
19 files changed:
extension/lib/commands.coffee
extension/lib/hints.coffee
extension/lib/marker.coffee
extension/lib/modes.coffee
extension/lib/utils.coffee
extension/locale/de/vimfx.properties
extension/locale/el-GR/vimfx.properties
extension/locale/en-US/vimfx.properties
extension/locale/hu/vimfx.properties
extension/locale/id/vimfx.properties
extension/locale/it/vimfx.properties
extension/locale/ja/vimfx.properties
extension/locale/nl/vimfx.properties
extension/locale/pl/vimfx.properties
extension/locale/ru/vimfx.properties
extension/locale/sv-SE/vimfx.properties
extension/locale/zh-CN/vimfx.properties
extension/locale/zh-TW/vimfx.properties
extension/resources/style.css
Imprint / Impressum