Antonio Scandurra
f81843d465
Merge branch 'master' into as-block-decorations
2016-01-14 09:30:06 -07:00
Antonio Scandurra
5c5e108d9b
Conform to the new LineTopIndex interface
2016-01-12 11:38:48 -07:00
Nathan Sobo
9f6fbacddd
Don’t clip screen positions in yardstick
...
By clipping positions only in the TextEditorComponent, we can ensure
that we check for the presence of a rendered line for the clipped row
value.
2016-01-04 16:32:38 -07:00
Antonio Scandurra
087dc3b4fd
Back to green specs 🤘
2015-12-18 15:18:04 +01:00
Antonio Scandurra
8c1f0b0e21
Merge branch 'master' into as-block-decorations
...
# Conflicts:
# spec/fake-lines-yardstick.coffee
# spec/lines-yardstick-spec.coffee
# spec/text-editor-presenter-spec.coffee
# src/lines-yardstick.coffee
# src/text-editor-component.coffee
# src/text-editor-presenter.coffee
2015-12-18 09:59:12 +01:00
Antonio Scandurra
cfb30c795d
Use an updated version of LineTopIndex
2015-12-14 15:04:54 +01:00
Nathan Sobo
85c6139579
Don’t force DOM updates in LinesYardstick
...
Instead, determine the need for a DOM update in the component before
measuring with the lines yardstick, and break `updateSync` into two
explicit pre- and post-measurement phases.
2015-12-10 14:47:05 -07:00
Antonio Scandurra
14d8ecefdd
💚 Fix LinesYardstick specs
2015-12-04 12:54:20 +01:00
Antonio Scandurra
f30e4ccc9d
Use the new LineTopIndex in TextEditorPresenter
2015-12-02 16:01:55 +01:00
Antonio Scandurra
47b16c513c
Make sure cursors are updated with respect to block decorations
2015-12-01 09:48:11 +01:00
Antonio Scandurra
539a5b0ae7
🐎 Do as little pixel conversion as possible
...
We desperately need a tree-based data structure. 😢
2015-11-30 14:34:16 +01:00
Antonio Scandurra
0159d5c31e
🎨
2015-11-27 16:58:08 +01:00
Antonio Scandurra
e1e06580c1
Move position conversion in LinesYardstick
2015-11-27 12:47:47 +01:00
Antonio Scandurra
6decf222a3
🐛 Fix incorrectly reported width when measuring lines
...
This commit fixes what seems to be a bug in Chromium.
When measuring lines (and with a special character sequence), it could happen
that Range(0, 0). getBoundingClientRect().width reports a number greater than 0.
This seems to happen when the font size is smaller than 12px and it's probably
due to subpixel font scaling. To solve it we've explicitly included a guard
clause that prevents this problem to happen.
2015-11-01 19:23:09 +01:00
Antonio Scandurra
e843c2f058
🐎 Fetch scopes only if required
2015-10-16 11:03:15 +02:00
Nathan Sobo
4c51d29868
Merge remote-tracking branch 'origin/master' into ns-alternative-test-env
2015-10-07 16:10:29 -05:00
Antonio Scandurra
61892f932b
Use cached text nodes instead of NodeIterator
2015-10-06 10:43:32 +02:00
Antonio Scandurra
1c56c3f951
🎨
2015-10-05 16:32:51 +02:00
Antonio Scandurra
581ffb1360
🐎 Avoid to measure invisible lines when dragging
2015-10-05 16:05:17 +02:00
Antonio Scandurra
b7e373fdca
🐛 Correctly measure RTL characters
...
This will fix also the "hidden cursor" issue we were experiencing.
/cc: @izuzak
2015-10-02 12:51:10 +02:00
Antonio Scandurra
2ffa7da59e
🐎 Remove rows to measure in the next frame
2015-10-02 12:38:19 +02:00
Antonio Scandurra
b6a0db916f
🐛 Fix wrong pixel to screen position conversion
2015-10-01 13:05:50 +02:00
Antonio Scandurra
243dea1a1c
🎨 Move pixel-related code to LinesYardstick
...
* 🔥 Remove useless 'scoped char width' methods
2015-10-01 11:03:25 +02:00
Antonio Scandurra
58219a243e
Slightly more precise conversion to screen positions
2015-09-30 18:20:48 +02:00
Antonio Scandurra
bca3be32e6
Avoid to call ::prepareScreenRows explicitly
2015-09-30 16:23:49 +02:00
Antonio Scandurra
bb709f58d9
🐎 Cache pixel positions
2015-09-30 16:15:49 +02:00
Antonio Scandurra
59d6974f89
🐎 Remove AcceptFilter
...
...so that Chrome doesn't need to switch to user space when iterating over line
nodes.
2015-09-30 16:03:36 +02:00
Antonio Scandurra
123594dbbf
Implement ::screenPositionForPixelPosition in LinesYardstick
2015-09-29 17:13:49 +02:00
Antonio Scandurra
e6a72b794c
Temporarily disable caching from yardstick
...
This will enable us to avoid worrying about cache invalidation while integrating
`LinesYardstick` into `TextEditorPresenter`.
2015-09-29 15:16:51 +02:00
Antonio Scandurra
af41b71cd8
Redesign LinesYardstick
2015-09-20 12:10:09 +02:00
Antonio Scandurra
bf7d7e0d2a
Improve LinesYardstick design
...
We have shifted the responsibility of orchestrating state updates and
measurements to the yardstick. The presenter still needs to be updated to make
use of these new capabilities.
2015-09-18 10:17:55 +02:00
Antonio Scandurra
2ad336c649
💚
2015-09-17 16:26:55 +02:00
Antonio Scandurra
be843cc4df
🐎 Cache positions
2015-09-17 14:22:27 +02:00
Antonio Scandurra
80d872c4ac
Avoid calling getBoundingClientRect twice for each line
2015-09-17 11:51:03 +02:00
Antonio Scandurra
d78c166d6b
Merge branch 'master' into as-double-reflow-measurements
2015-09-17 11:32:26 +02:00
Antonio Scandurra
42e58f1dd3
💚 Use tokenizedLine.id to refer to lines
2015-09-17 11:10:32 +02:00
Antonio Scandurra
2542a8d603
Integrate LinesYardstick with TextEditorComponent
2015-09-16 12:32:26 +02:00
Antonio Scandurra
29846d0a51
Add LinesYardstick
...
...and create a MockLineNodesProvider for testing purposes
2015-09-15 18:41:41 +02:00