Commit Graph

31899 Commits

Author SHA1 Message Date
Nathan Sobo
15ecbed61f Don't pane focus when pane model is destroyed
This avoids a non-failure error message when resetting the environment
in some specs.
2017-05-05 09:29:29 +02:00
Nathan Sobo
5b07334993 Assign bufferRow property to line number nodes
I wish we didn't need this, but it's currently relied on by several
packages including bookmarks.
2017-05-05 09:29:29 +02:00
Nathan Sobo
c76fc5af2d Round column measurements to nearest whole pixel
This preserves the expected behavior for positioning overlays, etc so
that package tests keep passing.
2017-05-05 09:29:29 +02:00
Nathan Sobo
84c20d95d4 Add deprecated rootElement property 2017-05-05 09:29:29 +02:00
Nathan Sobo
a536c5950a Add TextEditorElement.pixelPositionForScreen/BufferPosition
These methods require us to render off-screen lines in some
circumstances in order to measure them, so this commit extends the
rendering of the longest line to include arbitrary lines.
2017-05-05 09:29:29 +02:00
Nathan Sobo
a9d0f82afb Use async/await in text-editor-element-spec 2017-05-05 09:29:29 +02:00
Nathan Sobo
5000f9eccb Convert text-editor-element-spec to JS 2017-05-05 09:29:29 +02:00
Nathan Sobo
e423b833db Replace getDefaultCharacterWidth with getBaseCharacterWidth
That's the language we use throughout the implementation now and a more
accurate name for the concept.
2017-05-05 09:29:29 +02:00
Nathan Sobo
0441625fba Set lineHeightInPixels on model for backward compatibility 2017-05-05 09:29:29 +02:00
Nathan Sobo
174bac378d Fix lint errors 2017-05-05 09:29:29 +02:00
Nathan Sobo
c8f2fbb657 Get TextEditorElement tests passing 2017-05-05 09:29:29 +02:00
Nathan Sobo
eb33b5c39b Delete obsolete code and tests related to text editor rendering 2017-05-05 09:29:29 +02:00
Nathan Sobo
bfa410b114 Add has-selection class to editors with non-empty selections 2017-05-05 09:29:29 +02:00
Nathan Sobo
f83ad6bb7c Give cursors at the end of lines the width of an 'x' character 2017-05-05 09:29:29 +02:00
Nathan Sobo
87eb16f5ed Fix clicking fold placeholders by ignoring pointer events on cursors div 2017-05-05 09:29:29 +02:00
Nathan Sobo
336aa0f521 Hide scrollbars in mini editors 2017-05-05 09:29:29 +02:00
Nathan Sobo
e602b5c466 Account for scrollbars and padding in autoHeight/Width mode 2017-05-05 09:29:29 +02:00
Nathan Sobo
988118213d Don't use position: relative on atom-text-editor 2017-05-05 09:29:29 +02:00
Nathan Sobo
9bf0ea83f4 Test clicking more locations outside of the lines 2017-05-05 09:29:29 +02:00
Antonio Scandurra
893da22c55 Replace element-resize-detector with experimental ResizeObserver API
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Antonio Scandurra
837871700d Position dummy line element absolutely and make it invisible
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Antonio Scandurra
8372d08b49 Don't share block decoration/character measurement vnodes across instances
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Antonio Scandurra
03702a1fe6 Add deprecated shadow root property to editor element
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Antonio Scandurra
26b9273e00 Add data-encoding to editor element
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:29 +02:00
Antonio Scandurra
2a1ba7f05b Add data-grammar to editor element 2017-05-05 09:29:29 +02:00
Antonio Scandurra
0a702d1680 Skip obsolete tests for now, but delete them later 2017-05-05 09:29:29 +02:00
Antonio Scandurra
5df17f061e Create resize detector before calling etch.updateSync for the first time 2017-05-05 09:29:29 +02:00
Antonio Scandurra
f3c48c8b70 Register style elements change events in AtomEnvironment.initialize
...and fix spec/workspace-element-spec.js
2017-05-05 09:29:29 +02:00
Antonio Scandurra
1d01d499a9 Fix spec/text-editor-spec.coffee 2017-05-05 09:29:29 +02:00
Antonio Scandurra
e2cf60a0c9 Don't reuse resize detectors across TextEditorComponent instances
Due to the way element-resize-detector schedules the delivering of
resize events, this will ensure that creating an editor while the clock
is mocked won't prevent subsequent tests using the real clock from
getting such events.
2017-05-05 09:29:29 +02:00
Antonio Scandurra
b7a421eadf Stop calling initialize in ViewRegistry tests 2017-05-05 09:29:29 +02:00
Antonio Scandurra
0210b0bc81 Update fake gutter container interface in gutter-spec.coffee 2017-05-05 09:29:29 +02:00
Antonio Scandurra
1d8f4f2cdd Wait until the editor is focused before starting to type in smoke test 2017-05-05 09:29:29 +02:00
Antonio Scandurra
2993f3c1ac Further optimize line replacement 2017-05-05 09:29:29 +02:00
Antonio Scandurra
a99237b33b Fix lint errors and delete dead code 2017-05-05 09:29:29 +02:00
Antonio Scandurra
6742025a02 Import octicon-mixins in static/text-editor.less 2017-05-05 09:29:29 +02:00
Antonio Scandurra
c8aeee9786 Fix bad syntax in src/initialize-benchmark-window.js 2017-05-05 09:29:29 +02:00
Antonio Scandurra
8707cabe40 Don't count the dummy line in block decoration test 2017-05-05 09:29:29 +02:00
Nathan Sobo
c83cd34e02 Slice lines and decorations passed to LinesTileComponent
This ensures the component's shouldUpdate method works correctly.
2017-05-05 09:29:29 +02:00
Nathan Sobo
8aabd026ad Remove highlight caching for now 2017-05-05 09:29:29 +02:00
Nathan Sobo
b99ddfd3bf Remove unused var 2017-05-05 09:29:28 +02:00
Nathan Sobo
060a884ba9 Include more properties in LinesTileComponent.shouldUpdate 2017-05-05 09:29:28 +02:00
Nathan Sobo
99e3c62e69 Clear highlight nodes when recycling line tiles 2017-05-05 09:29:28 +02:00
Nathan Sobo
3fce3ebe17 Fix test 2017-05-05 09:29:28 +02:00
Nathan Sobo
6e6dce21ee Don't re-measure if editor has become invisible 2017-05-05 09:29:28 +02:00
Nathan Sobo
7aec696bb5 Remove stray logging 2017-05-05 09:29:28 +02:00
Nathan Sobo
2c6490c2e0 Don't update editor component if we know we are not visible 2017-05-05 09:29:28 +02:00
Nathan Sobo
95c8950004 Re-measure and update rendered content when editor styles change 2017-05-05 09:29:28 +02:00
Nathan Sobo
b6cd473c16 Fix typo 2017-05-05 09:29:28 +02:00
Antonio Scandurra
054c133ed4 Remeasure block decorations when editor width changes
Signed-off-by: Nathan Sobo <nathan@github.com>
2017-05-05 09:29:28 +02:00