Optimization: Use absolute positioning instead of flexbox in editor

Flexbox was causing layouts and repaints to cover the entire scroll view instead of just the edited line. This cuts down on DOM manipulation cost significantly.
This commit is contained in:
Nathan Sobo
2012-09-25 13:27:46 -06:00
parent a6352497b9
commit 5f253d78e9
5 changed files with 38 additions and 23 deletions

View File

@@ -12,16 +12,8 @@
height: auto;
}
.editor .flexbox {
display: -webkit-box;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
}
.editor .gutter {
position: absolute;
height: 100%;
overflow: hidden;
padding-left: 0.4em;
@@ -52,6 +44,11 @@
}
.editor .scroll-view {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
overflow-x: auto;
overflow-y: hidden;
-webkit-box-flex: 1;