Antonio Scandurra
015f196f2f
Test scrolling down with block decorations
2017-05-05 09:29:28 +02:00
Antonio Scandurra
e289283205
Render block decorations between lines
2017-05-05 09:29:28 +02:00
Antonio Scandurra
7a0a41a7df
Use Array.push instead of array[i] = when adding line components
...
Albeit (potentially) slower, this will allow to add a dynamic number of
block decoration nodes before and after a given line.
2017-05-05 09:29:28 +02:00
Antonio Scandurra
f7632a9095
Add fast path when no block decorations need to be measured
2017-05-05 09:29:28 +02:00
Nathan Sobo
5a6935a01c
Use LineTopIndex to convert from/to rows to/from pixel positions
2017-05-05 09:29:28 +02:00
Nathan Sobo
b32b760ee4
WIP: Start on block decorations
2017-05-05 09:29:28 +02:00
Nathan Sobo
171e4e88ca
Cache prefixed scope names
2017-05-05 09:29:28 +02:00
Nathan Sobo
eb588d4c7c
Test and fix the center option to autoscroll
2017-05-05 09:29:28 +02:00
Nathan Sobo
8652222b22
Add setInputEnabled and don't handle textInput if it is disabled
2017-05-05 09:29:28 +02:00
Nathan Sobo
acf996fc14
Speed up cursor blink test
2017-05-05 09:29:28 +02:00
Nathan Sobo
7da588c3ee
Ensure nextUpdateOnlyBlinksCursor argument is true, not just truthy
...
We pass the bound scheduleUpdate method as an event handler to a variety
of subscription methods, some of which supply arguments.
2017-05-05 09:29:28 +02:00
Nathan Sobo
3b7112889a
Correctly assign gutter container vnode
2017-05-05 09:29:28 +02:00
Nathan Sobo
eb22b58756
Add smoke test for cursor blink
2017-05-05 09:29:28 +02:00
Nathan Sobo
0cc19aa66b
Implement a fast path for cursor blink to minimize battery impact
2017-05-05 09:29:28 +02:00
Nathan Sobo
76b834e043
Blink cursors; still needs tests
2017-05-05 09:29:28 +02:00
Nathan Sobo
b66a2bafae
⬆️ etch
2017-05-05 09:29:28 +02:00
Nathan Sobo
4da579ceff
Unfocus test
2017-05-05 09:29:28 +02:00
Nathan Sobo
2faec0b142
Avoid using += with let variables to avoid let compound assigment deopt
...
See https://jsperf.com/let-compound-assignment
2017-05-05 09:29:28 +02:00
Nathan Sobo
162020443b
Cache subtrees to avoid duplicating work within a single frame
2017-05-05 09:29:28 +02:00
Nathan Sobo
2880534ba6
Store line, line number decorations in arrays and avoid slicing
2017-05-05 09:29:28 +02:00
Nathan Sobo
61583462cf
Set the height of the line number gutter explicitly
2017-05-05 09:29:28 +02:00
Nathan Sobo
4e834da3e3
WIP: Render gutters before initial measurement
...
The shouldUpdate method is just returning true for now. We probably need
to find a new approach to representing line number decorations that's
easier to diff, perhaps a sparse array?
2017-05-05 09:29:28 +02:00
Nathan Sobo
d5d3cfc5a9
Adjust left position of scroll container when gutter container resizes
2017-05-05 09:29:28 +02:00
Nathan Sobo
1b1cffb32d
⬆️ etch to allow arbitrary objects as keys
2017-05-05 09:29:28 +02:00
Nathan Sobo
d8b22fb3bd
Associate gutters with their elements and support showing/hiding gutters
2017-05-05 09:29:28 +02:00
Nathan Sobo
16694a2166
Start on custom gutters
2017-05-05 09:29:28 +02:00
Nathan Sobo
6fefef0509
Only update scrollTop/Left when they change
...
This avoids forcing a reflows in some circumnstances.
2017-05-05 09:29:28 +02:00
Nathan Sobo
fadde63ec4
Integrate properly with Atom scheduler
2017-05-05 09:29:28 +02:00
Nathan Sobo
90452836fe
Fix wrong variable name
2017-05-05 09:29:28 +02:00
Nathan Sobo
251078da10
Factor editor component update into high-level phases
2017-05-05 09:29:28 +02:00
Nathan Sobo
555273f997
Refactor
2017-05-05 09:29:28 +02:00
Nathan Sobo
4707803416
Use the atom.views scheduler in TextEditorComponent
...
This ensures smooth scheduling interactions with autocomplete-plus
overlays so they measure their dimensions at the right time.
2017-05-05 09:29:28 +02:00
Nathan Sobo
1676617218
Add static TextEditor.viewForOverlayItem method to avoid using global
2017-05-05 09:29:28 +02:00
Nathan Sobo
5297e7ab1a
Add avoidOverflow: false option for overlays
2017-05-05 09:29:28 +02:00
Nathan Sobo
f2e2475c62
Use spies instead of monkey patching
2017-05-05 09:29:28 +02:00
Nathan Sobo
47761a455e
Support class property on overlay decorations
2017-05-05 09:29:28 +02:00
Nathan Sobo
b6f71bc648
Render overlay decorations
2017-05-05 09:29:28 +02:00
Nathan Sobo
c7dc567e62
Only update scrollTop/Left of dummy scrollbar after inner div is updated
2017-05-05 09:29:28 +02:00
Nathan Sobo
5f2d4c801b
Handle mousedowns on dummy scrollbars that miss the actual scrollbars
...
Because the dummy scrollbar elements are potentially wider than the real
scrollbars rendered by the browser, we need to delegate some mousedown
events to the parent component.
2017-05-05 09:29:28 +02:00
Nathan Sobo
e6e5420f42
Correctly handle overflows caused by scrollbar for the opposite axis
2017-05-05 09:29:28 +02:00
Nathan Sobo
0999d0bf02
Handle scrolling of the dummy scrollbars directly
2017-05-05 09:29:28 +02:00
Nathan Sobo
8720dbc862
🎨
2017-05-05 09:29:28 +02:00
Nathan Sobo
5757d6de85
Group rendering tests
2017-05-05 09:29:28 +02:00
Nathan Sobo
2075f06404
WIP: Introduce dummy scrollbars
...
Still need tests on all of this
2017-05-05 09:29:28 +02:00
Nathan Sobo
5a47f179e3
Introduce synthetic scrolling
...
We previously thought scroll events had changed somehow to become
synchronous, but were wrong. This introduces synthetic scrolling where
we use GPU translation of the contents of the gutter and scroll
containers to simulate scrolling and explicitly capture mousewheel
events.
Still need to add dummy scrollbars and deal with their footprint in
clientHeight and clientWidth.
2017-05-05 09:29:28 +02:00
Nathan Sobo
0e747a400d
Pull from component's rendered lines in tests
2017-05-05 09:29:28 +02:00
Nathan Sobo
e6026a145c
Fix auto-width
2017-05-05 09:29:28 +02:00
Nathan Sobo
f58a249be1
Pull from compnoent's rendered screen lines in tests
2017-05-05 09:29:28 +02:00
Nathan Sobo
2cde4aea76
Remove TextEditorComponent.getModel
2017-05-05 09:29:28 +02:00
Nathan Sobo
927648d318
Use marker id as highlight key
...
This keeps highlight elements in stable positions on the DOM, which
ensures that CSS transitions don't appear in the wrong spot.
2017-05-05 09:29:28 +02:00