Bug 1265816 - Upgrade to CodeMirror 5.13.2 r=bgrins
authorGabriel Luong <gabriel.luong@gmail.com>
Wed, 20 Apr 2016 12:21:28 -0400
changeset 331943 70bbd2e42d9df60dbb792e4e225e6bd2d67097af
parent 331939 6a3291366533e40960df1f859d52734f13f3d7a3
child 331944 b29a652d68e85d25953a2bb371d35114cd8036a0
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbgrins
bugs1265816
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1265816 - Upgrade to CodeMirror 5.13.2 r=bgrins
devtools/client/sourceeditor/codemirror/README
devtools/client/sourceeditor/codemirror/addon/comment/comment.js
devtools/client/sourceeditor/codemirror/addon/comment/continuecomment.js
devtools/client/sourceeditor/codemirror/addon/dialog/dialog.css
devtools/client/sourceeditor/codemirror/addon/dialog/dialog.js
devtools/client/sourceeditor/codemirror/addon/edit/closebrackets.js
devtools/client/sourceeditor/codemirror/addon/edit/closetag.js
devtools/client/sourceeditor/codemirror/addon/edit/continuelist.js
devtools/client/sourceeditor/codemirror/addon/edit/matchbrackets.js
devtools/client/sourceeditor/codemirror/addon/edit/matchtags.js
devtools/client/sourceeditor/codemirror/addon/edit/trailingspace.js
devtools/client/sourceeditor/codemirror/addon/fold/brace-fold.js
devtools/client/sourceeditor/codemirror/addon/fold/comment-fold.js
devtools/client/sourceeditor/codemirror/addon/fold/foldcode.js
devtools/client/sourceeditor/codemirror/addon/fold/foldgutter.css
devtools/client/sourceeditor/codemirror/addon/fold/foldgutter.js
devtools/client/sourceeditor/codemirror/addon/fold/indent-fold.js
devtools/client/sourceeditor/codemirror/addon/fold/markdown-fold.js
devtools/client/sourceeditor/codemirror/addon/fold/xml-fold.js
devtools/client/sourceeditor/codemirror/addon/hint/show-hint.js
devtools/client/sourceeditor/codemirror/addon/search/match-highlighter.js
devtools/client/sourceeditor/codemirror/addon/search/searchcursor.js
devtools/client/sourceeditor/codemirror/addon/selection/active-line.js
devtools/client/sourceeditor/codemirror/addon/selection/mark-selection.js
devtools/client/sourceeditor/codemirror/addon/tern/tern.css
devtools/client/sourceeditor/codemirror/addon/tern/tern.js
devtools/client/sourceeditor/codemirror/keymap/emacs.js
devtools/client/sourceeditor/codemirror/keymap/sublime.js
devtools/client/sourceeditor/codemirror/keymap/vim.js
devtools/client/sourceeditor/codemirror/lib/codemirror.css
devtools/client/sourceeditor/codemirror/lib/codemirror.js
devtools/client/sourceeditor/codemirror/mode/css.js
devtools/client/sourceeditor/codemirror/mode/htmlmixed.js
devtools/client/sourceeditor/codemirror/mode/javascript.js
devtools/client/sourceeditor/codemirror/mode/xml.js
devtools/client/sourceeditor/test/codemirror/comment_test.js
devtools/client/sourceeditor/test/codemirror/doc_test.js
devtools/client/sourceeditor/test/codemirror/driver.js
devtools/client/sourceeditor/test/codemirror/emacs_test.js
devtools/client/sourceeditor/test/codemirror/mode/javascript/test.js
devtools/client/sourceeditor/test/codemirror/mode_test.css
devtools/client/sourceeditor/test/codemirror/mode_test.js
devtools/client/sourceeditor/test/codemirror/multi_test.js
devtools/client/sourceeditor/test/codemirror/search_test.js
devtools/client/sourceeditor/test/codemirror/sublime_test.js
devtools/client/sourceeditor/test/codemirror/test.js
--- a/devtools/client/sourceeditor/codemirror/README
+++ b/devtools/client/sourceeditor/codemirror/README
@@ -1,16 +1,16 @@
 This is the CodeMirror editor packaged for the Mozilla Project. CodeMirror
 is a JavaScript component that provides a code editor in the browser. When
 a mode is available for the language you are coding in, it will color your
 code, and optionally help with indentation.
 
 # Upgrade
 
-Currently used version is 5.13.0. To upgrade, download a new version of
+Currently used version is 5.13.2. To upgrade, download a new version of
 CodeMirror from the project's page [1] and replace all JavaScript and
 CSS files inside the codemirror directory [2].
 
 To confirm the functionality run mochitests for the following components:
 
  * sourceeditor
  * scratchpad
  * debugger
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
--- a/devtools/client/sourceeditor/codemirror/lib/codemirror.css
+++ b/devtools/client/sourceeditor/codemirror/lib/codemirror.css
@@ -186,16 +186,17 @@ div.CodeMirror span.CodeMirror-nonmatchi
   right: 0; bottom: 0;
 }
 .CodeMirror-gutter-filler {
   left: 0; bottom: 0;
 }
 
 .CodeMirror-gutters {
   position: absolute; left: 0; top: 0;
+  min-height: 100%;
   z-index: 3;
 }
 .CodeMirror-gutter {
   white-space: normal;
   height: 100%;
   display: inline-block;
   vertical-align: top;
   margin-bottom: -30px;
@@ -240,16 +241,18 @@ div.CodeMirror span.CodeMirror-nonmatchi
   white-space: pre;
   word-wrap: normal;
   line-height: inherit;
   color: inherit;
   z-index: 2;
   position: relative;
   overflow: visible;
   -webkit-tap-highlight-color: transparent;
+  -webkit-font-variant-ligatures: none;
+  font-variant-ligatures: none;
 }
 .CodeMirror-wrap pre {
   word-wrap: break-word;
   white-space: pre-wrap;
   word-break: normal;
 }
 
 .CodeMirror-linebackground {
old mode 100755
new mode 100644
--- a/devtools/client/sourceeditor/codemirror/lib/codemirror.js
+++ b/devtools/client/sourceeditor/codemirror/lib/codemirror.js
@@ -758,48 +758,44 @@
         update.visible = visibleLines(cm.display, cm.doc, viewport);
         if (update.visible.from >= cm.display.viewFrom && update.visible.to <= cm.display.viewTo)
           break;
       }
       if (!updateDisplayIfNeeded(cm, update)) break;
       updateHeightsInViewport(cm);
       var barMeasure = measureForScrollbars(cm);
       updateSelection(cm);
+      updateScrollbars(cm, barMeasure);
       setDocumentHeight(cm, barMeasure);
-      updateScrollbars(cm, barMeasure);
-    }
-
-    if (parseInt(cm.display.gutters.style.height) > cm.display.scroller.clientHeight)
-      cm.display.gutters.style.height = cm.display.scroller.clientHeight + "px"
+    }
 
     update.signal(cm, "update", cm);
     if (cm.display.viewFrom != cm.display.reportedViewFrom || cm.display.viewTo != cm.display.reportedViewTo) {
       update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo);
       cm.display.reportedViewFrom = cm.display.viewFrom; cm.display.reportedViewTo = cm.display.viewTo;
     }
   }
 
   function updateDisplaySimple(cm, viewport) {
     var update = new DisplayUpdate(cm, viewport);
     if (updateDisplayIfNeeded(cm, update)) {
       updateHeightsInViewport(cm);
       postUpdateDisplay(cm, update);
       var barMeasure = measureForScrollbars(cm);
       updateSelection(cm);
+      updateScrollbars(cm, barMeasure);
       setDocumentHeight(cm, barMeasure);
-      updateScrollbars(cm, barMeasure);
       update.finish();
     }
   }
 
   function setDocumentHeight(cm, measure) {
     cm.display.sizer.style.minHeight = measure.docHeight + "px";
     cm.display.heightForcer.style.top = measure.docHeight + "px";
-    cm.display.gutters.style.height = Math.max(measure.docHeight + cm.display.barHeight + scrollGap(cm),
-                                               measure.clientHeight) + "px";
+    cm.display.gutters.style.height = (measure.docHeight + cm.display.barHeight + scrollGap(cm)) + "px";
   }
 
   // Read the actual heights of the rendered lines, and update their
   // stored heights to match.
   function updateHeightsInViewport(cm) {
     var display = cm.display;
     var prevBottom = display.lineDiv.offsetTop;
     for (var i = 0; i < display.view.length; i++) {
@@ -3114,20 +3110,20 @@
       cm.display.sizer.style.minWidth = op.adjustWidthTo + "px";
       if (op.maxScrollLeft < cm.doc.scrollLeft)
         setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true);
       cm.display.maxLineChanged = false;
     }
 
     if (op.preparedSelection)
       cm.display.input.showSelection(op.preparedSelection);
+    if (op.updatedDisplay || op.startHeight != cm.doc.height)
+      updateScrollbars(cm, op.barMeasure);
     if (op.updatedDisplay)
       setDocumentHeight(cm, op.barMeasure);
-    if (op.updatedDisplay || op.startHeight != cm.doc.height)
-      updateScrollbars(cm, op.barMeasure);
 
     if (op.selectionChanged) restartBlink(cm);
 
     if (cm.state.focused && op.updateInput)
       cm.display.input.reset(op.typing);
     if (op.focus && op.focus == activeElt() && (!document.hasFocus || document.hasFocus()))
       ensureFocus(op.cm);
   }
@@ -8888,12 +8884,12 @@
         order.push(new BidiSpan(order[0].level, len, len));
 
       return order;
     };
   })();
 
   // THE END
 
-  CodeMirror.version = "5.13.0";
+  CodeMirror.version = "5.13.2";
 
   return CodeMirror;
 });
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
old mode 100755
new mode 100644
--- a/devtools/client/sourceeditor/test/codemirror/test.js
+++ b/devtools/client/sourceeditor/test/codemirror/test.js
@@ -1481,34 +1481,34 @@ testCM("lineWidgetChanged", function(cm)
     // If the widget is measured at a width much narrower than it is displayed at, the underHalf children will span two lines and break the test.
     // If the widget is measured at a width much wider than it is displayed at, the overHalf children will combine and break the test.
     // Note that this test only checks widgets where coverGutter is true, because these require extra styling to get the width right.
     // It may also be worthwhile to check this for non-coverGutter widgets.
     // Visually:
     // Good:
     // | ------------- display width ------------- |
     // | ------- widget-width when measured ------ |
-    // | | -- under-half -- | | -- under-half -- | |
+    // | | -- under-half -- | | -- under-half -- | | 
     // | | --- over-half --- |                     |
     // | | --- over-half --- |                     |
     // Height: measured as 3 lines, same as it will be when actually displayed
 
     // Bad (too narrow):
     // | ------------- display width ------------- |
     // | ------ widget-width when measured ----- |  < -- uh oh
     // | | -- under-half -- |                    |
     // | | -- under-half -- |                    |  < -- when measured, shoved to next line
     // | | --- over-half --- |                   |
     // | | --- over-half --- |                   |
     // Height: measured as 4 lines, more than expected . Will be displayed as 3 lines!
 
     // Bad (too wide):
     // | ------------- display width ------------- |
     // | -------- widget-width when measured ------- | < -- uh oh
-    // | | -- under-half -- | | -- under-half -- |   |
+    // | | -- under-half -- | | -- under-half -- |   | 
     // | | --- over-half --- | | --- over-half --- | | < -- when measured, combined on one line
     // Height: measured as 2 lines, less than expected. Will be displayed as 3 lines!
 
     var barelyUnderHalfWidthHtml = '<div style="display: inline-block; height: 1px; width: '+(285 - halfScrollbarWidth)+'px;"></div>';
     var barelyOverHalfWidthHtml = '<div style="display: inline-block; height: 1px; width: '+(305 - halfScrollbarWidth)+'px;"></div>';
     node.innerHTML = new Array(3).join(barelyUnderHalfWidthHtml) + new Array(3).join(barelyOverHalfWidthHtml);
     node.style.cssText = "background: yellow;font-size:0;line-height: " + (expectedWidgetHeight/expectedLinesInWidget) + "px;";
     return node;