<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[170080] trunk/Source/WebInspectorUI</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/170080">170080</a></dd>
<dt>Author</dt> <dd>jonowells@apple.com</dd>
<dt>Date</dt> <dd>2014-06-17 15:35:07 -0700 (Tue, 17 Jun 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Web Inspector: Two lines in CSS rule are hidden until resize or click
https://bugs.webkit.org/show_bug.cgi?id=133951

Reviewed by Joseph Pecoraro.

Update to CodeMirror 4.2 fixed the issue.

* Tools/PrettyPrinting/codemirror.js:
* Tools/PrettyPrinting/css.js:
* Tools/PrettyPrinting/javascript.js:
* UserInterface/External/CodeMirror/clojure.js:
* UserInterface/External/CodeMirror/closebrackets.js:
* UserInterface/External/CodeMirror/codemirror.js:
* UserInterface/External/CodeMirror/coffeescript.js:
* UserInterface/External/CodeMirror/comment.js:
* UserInterface/External/CodeMirror/css.js:
* UserInterface/External/CodeMirror/htmlmixed.js:
* UserInterface/External/CodeMirror/javascript.js:
* UserInterface/External/CodeMirror/livescript.js:
* UserInterface/External/CodeMirror/matchbrackets.js:
* UserInterface/External/CodeMirror/overlay.js:
* UserInterface/External/CodeMirror/placeholder.js:
* UserInterface/External/CodeMirror/runmode.js:
* UserInterface/External/CodeMirror/sass.js:
* UserInterface/External/CodeMirror/searchcursor.js:
* UserInterface/External/CodeMirror/sql.js:
* UserInterface/External/CodeMirror/xml.js:
Update CodeMirror 4.1 to CodeMirror 4.2.0.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebInspectorUIChangeLog">trunk/Source/WebInspectorUI/ChangeLog</a></li>
<li><a href="#trunkSourceWebInspectorUIToolsPrettyPrintingcodemirrorjs">trunk/Source/WebInspectorUI/Tools/PrettyPrinting/codemirror.js</a></li>
<li><a href="#trunkSourceWebInspectorUIToolsPrettyPrintingcssjs">trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css.js</a></li>
<li><a href="#trunkSourceWebInspectorUIToolsPrettyPrintingjavascriptjs">trunk/Source/WebInspectorUI/Tools/PrettyPrinting/javascript.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorclojurejs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/clojure.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorclosebracketsjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/closebrackets.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcodemirrorjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/codemirror.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcoffeescriptjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/coffeescript.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcommentjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/comment.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcssjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorhtmlmixedjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/htmlmixed.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorjavascriptjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/javascript.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorlivescriptjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/livescript.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrormatchbracketsjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/matchbrackets.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirroroverlayjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/overlay.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorplaceholderjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/placeholder.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorrunmodejs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/runmode.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorsassjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sass.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorsearchcursorjs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/searchcursor.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorsqljs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sql.js</a></li>
<li><a href="#trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorxmljs">trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/xml.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebInspectorUIChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/ChangeLog (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/ChangeLog        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/ChangeLog        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,5 +1,36 @@
</span><span class="cx"> 2014-06-17  Jono Wells  &lt;jonowells@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Web Inspector: Two lines in CSS rule are hidden until resize or click
+        https://bugs.webkit.org/show_bug.cgi?id=133951
+
+        Reviewed by Joseph Pecoraro.
+
+        Update to CodeMirror 4.2 fixed the issue.
+
+        * Tools/PrettyPrinting/codemirror.js:
+        * Tools/PrettyPrinting/css.js:
+        * Tools/PrettyPrinting/javascript.js:
+        * UserInterface/External/CodeMirror/clojure.js:
+        * UserInterface/External/CodeMirror/closebrackets.js:
+        * UserInterface/External/CodeMirror/codemirror.js:
+        * UserInterface/External/CodeMirror/coffeescript.js:
+        * UserInterface/External/CodeMirror/comment.js:
+        * UserInterface/External/CodeMirror/css.js:
+        * UserInterface/External/CodeMirror/htmlmixed.js:
+        * UserInterface/External/CodeMirror/javascript.js:
+        * UserInterface/External/CodeMirror/livescript.js:
+        * UserInterface/External/CodeMirror/matchbrackets.js:
+        * UserInterface/External/CodeMirror/overlay.js:
+        * UserInterface/External/CodeMirror/placeholder.js:
+        * UserInterface/External/CodeMirror/runmode.js:
+        * UserInterface/External/CodeMirror/sass.js:
+        * UserInterface/External/CodeMirror/searchcursor.js:
+        * UserInterface/External/CodeMirror/sql.js:
+        * UserInterface/External/CodeMirror/xml.js:
+        Update CodeMirror 4.1 to CodeMirror 4.2.0.
+
+2014-06-17  Jono Wells  &lt;jonowells@apple.com&gt;
+
</ins><span class="cx">         Web Inspector: style declaration editor: visual highlight doesn't match actual selected text
</span><span class="cx">         https://bugs.webkit.org/show_bug.cgi?id=133965
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIToolsPrettyPrintingcodemirrorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/codemirror.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/codemirror.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/codemirror.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> // This is CodeMirror (http://codemirror.net), a code editor
</span><span class="cx"> // implemented in JavaScript on top of the browser's DOM.
</span><span class="cx"> //
</span><span class="lines">@@ -93,6 +96,7 @@
</span><span class="cx">     if (ie_upto10) setTimeout(bind(resetInput, this, true), 20);
</span><span class="cx"> 
</span><span class="cx">     registerEventHandlers(this);
</span><ins>+    ensureGlobalHandlers();
</ins><span class="cx"> 
</span><span class="cx">     var cm = this;
</span><span class="cx">     runInOp(this, function() {
</span><span class="lines">@@ -459,7 +463,7 @@
</span><span class="cx">   // the the current scroll position). viewPort may contain top,
</span><span class="cx">   // height, and ensure (see op.scrollToPos) properties.
</span><span class="cx">   function visibleLines(display, doc, viewPort) {
</span><del>-    var top = viewPort &amp;&amp; viewPort.top != null ? viewPort.top : display.scroller.scrollTop;
</del><ins>+    var top = viewPort &amp;&amp; viewPort.top != null ? Math.max(0, viewPort.top) : display.scroller.scrollTop;
</ins><span class="cx">     top = Math.floor(top - paddingTop(display));
</span><span class="cx">     var bottom = viewPort &amp;&amp; viewPort.bottom != null ? viewPort.bottom : top + display.wrapper.clientHeight;
</span><span class="cx"> 
</span><span class="lines">@@ -475,7 +479,7 @@
</span><span class="cx">         return {from: lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight),
</span><span class="cx">                 to: ensureTo};
</span><span class="cx">     }
</span><del>-    return {from: from, to: to};
</del><ins>+    return {from: from, to: Math.max(to, from + 1)};
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // LINE NUMBERS
</span><span class="lines">@@ -663,7 +667,6 @@
</span><span class="cx">     cm.display.gutters.style.height = Math.max(measure.docHeight, measure.clientHeight - scrollerCutOff) + &quot;px&quot;;
</span><span class="cx">   }
</span><span class="cx"> 
</span><del>-
</del><span class="cx">   function checkForWebkitWidthBug(cm, measure) {
</span><span class="cx">     // Work around Webkit bug where it sometimes reserves space for a
</span><span class="cx">     // non-existing phantom scrollbar in the scroller (Issue #2420)
</span><span class="lines">@@ -1146,7 +1149,8 @@
</span><span class="cx">     if (hasHandler(doc, &quot;beforeSelectionChange&quot;) || doc.cm &amp;&amp; hasHandler(doc.cm, &quot;beforeSelectionChange&quot;))
</span><span class="cx">       sel = filterSelectionChange(doc, sel);
</span><span class="cx"> 
</span><del>-    var bias = cmp(sel.primary().head, doc.sel.primary().head) &lt; 0 ? -1 : 1;
</del><ins>+    var bias = options &amp;&amp; options.bias ||
+      (cmp(sel.primary().head, doc.sel.primary().head) &lt; 0 ? -1 : 1);
</ins><span class="cx">     setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
</span><span class="cx"> 
</span><span class="cx">     if (!(options &amp;&amp; options.scroll === false) &amp;&amp; doc.cm)
</span><span class="lines">@@ -1926,6 +1930,10 @@
</span><span class="cx">     if (!updated &amp;&amp; op.selectionChanged) updateSelection(cm);
</span><span class="cx">     if (!updated &amp;&amp; op.startHeight != cm.doc.height) updateScrollbars(cm);
</span><span class="cx"> 
</span><ins>+    // Abort mouse wheel delta measurement, when scrolling explicitly
+    if (display.wheelStartX != null &amp;&amp; (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
+      display.wheelStartX = display.wheelStartY = null;
+
</ins><span class="cx">     // Propagate the scroll position to the actual DOM scroller
</span><span class="cx">     if (op.scrollTop != null &amp;&amp; display.scroller.scrollTop != op.scrollTop) {
</span><span class="cx">       var top = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));
</span><span class="lines">@@ -2139,7 +2147,8 @@
</span><span class="cx"> 
</span><span class="cx">   function viewCuttingPoint(cm, oldN, newN, dir) {
</span><span class="cx">     var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
</span><del>-    if (!sawCollapsedSpans) return {index: index, lineN: newN};
</del><ins>+    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
+      return {index: index, lineN: newN};
</ins><span class="cx">     for (var i = 0, n = cm.display.viewFrom; i &lt; index; i++)
</span><span class="cx">       n += view[i].size;
</span><span class="cx">     if (n != oldN) {
</span><span class="lines">@@ -2351,7 +2360,7 @@
</span><span class="cx">         var pos = posFromMouse(cm, e);
</span><span class="cx">         if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
</span><span class="cx">         e_preventDefault(e);
</span><del>-        var word = findWordAt(cm.doc, pos);
</del><ins>+        var word = findWordAt(cm, pos);
</ins><span class="cx">         extendSelection(cm.doc, word.anchor, word.head);
</span><span class="cx">       }));
</span><span class="cx">     else
</span><span class="lines">@@ -2392,26 +2401,6 @@
</span><span class="cx">     // Prevent wrapper from ever scrolling
</span><span class="cx">     on(d.wrapper, &quot;scroll&quot;, function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
</span><span class="cx"> 
</span><del>-    // When the window resizes, we need to refresh active editors.
-    var resizeTimer;
-    function onResize() {
-      if (resizeTimer == null) resizeTimer = setTimeout(function() {
-        resizeTimer = null;
-        // Might be a text scaling operation, clear size caches.
-        d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = knownScrollbarWidth = null;
-        cm.setSize();
-      }, 100);
-    }
-    on(window, &quot;resize&quot;, onResize);
-    // The above handler holds on to the editor and its data
-    // structures. Here we poll to unregister it when the editor is no
-    // longer in the document, so that it can be garbage-collected.
-    function unregister() {
-      if (contains(document.body, d.wrapper)) setTimeout(unregister, 5000);
-      else off(window, &quot;resize&quot;, onResize);
-    }
-    setTimeout(unregister, 5000);
-
</del><span class="cx">     on(d.input, &quot;keyup&quot;, operation(cm, onKeyUp));
</span><span class="cx">     on(d.input, &quot;input&quot;, function() {
</span><span class="cx">       if (ie &amp;&amp; !ie_upto8 &amp;&amp; cm.display.inputHasSelection) cm.display.inputHasSelection = null;
</span><span class="lines">@@ -2488,6 +2477,14 @@
</span><span class="cx">     });
</span><span class="cx">   }
</span><span class="cx"> 
</span><ins>+  // Called when the window resizes
+  function onResize(cm) {
+    // Might be a text scaling operation, clear size caches.
+    var d = cm.display;
+    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
+    cm.setSize();
+  }
+
</ins><span class="cx">   // MOUSE EVENTS
</span><span class="cx"> 
</span><span class="cx">   // Return true when the given mouse event happened in a widget
</span><span class="lines">@@ -2578,17 +2575,17 @@
</span><span class="cx">       lastClick = {time: now, pos: start};
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    var sel = cm.doc.sel, addNew = mac ? e.metaKey : e.ctrlKey;
-    if (cm.options.dragDrop &amp;&amp; dragAndDrop &amp;&amp; !addNew &amp;&amp; !isReadOnly(cm) &amp;&amp;
</del><ins>+    var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey;
+    if (cm.options.dragDrop &amp;&amp; dragAndDrop &amp;&amp; !isReadOnly(cm) &amp;&amp;
</ins><span class="cx">         type == &quot;single&quot; &amp;&amp; sel.contains(start) &gt; -1 &amp;&amp; sel.somethingSelected())
</span><del>-      leftButtonStartDrag(cm, e, start);
</del><ins>+      leftButtonStartDrag(cm, e, start, modifier);
</ins><span class="cx">     else
</span><del>-      leftButtonSelect(cm, e, start, type, addNew);
</del><ins>+      leftButtonSelect(cm, e, start, type, modifier);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // Start a text drag. When it ends, see if any dragging actually
</span><span class="cx">   // happen, and treat as a click if it didn't.
</span><del>-  function leftButtonStartDrag(cm, e, start) {
</del><ins>+  function leftButtonStartDrag(cm, e, start, modifier) {
</ins><span class="cx">     var display = cm.display;
</span><span class="cx">     var dragEnd = operation(cm, function(e2) {
</span><span class="cx">       if (webkit) display.scroller.draggable = false;
</span><span class="lines">@@ -2597,7 +2594,8 @@
</span><span class="cx">       off(display.scroller, &quot;drop&quot;, dragEnd);
</span><span class="cx">       if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) &lt; 10) {
</span><span class="cx">         e_preventDefault(e2);
</span><del>-        extendSelection(cm.doc, start);
</del><ins>+        if (!modifier)
+          extendSelection(cm.doc, start);
</ins><span class="cx">         focusInput(cm);
</span><span class="cx">         // Work around unexplainable focus problem in IE9 (#2127)
</span><span class="cx">         if (ie_upto10 &amp;&amp; !ie_upto8)
</span><span class="lines">@@ -2635,7 +2633,7 @@
</span><span class="cx">       start = posFromMouse(cm, e, true, true);
</span><span class="cx">       ourIndex = -1;
</span><span class="cx">     } else if (type == &quot;double&quot;) {
</span><del>-      var word = findWordAt(doc, start);
</del><ins>+      var word = findWordAt(cm, start);
</ins><span class="cx">       if (cm.display.shift || doc.extend)
</span><span class="cx">         ourRange = extendRange(doc, ourRange, word.anchor, word.head);
</span><span class="cx">       else
</span><span class="lines">@@ -2681,13 +2679,15 @@
</span><span class="cx">             ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));
</span><span class="cx">         }
</span><span class="cx">         if (!ranges.length) ranges.push(new Range(start, start));
</span><del>-        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), sel_mouse);
</del><ins>+        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
+                     {origin: &quot;*mouse&quot;, scroll: false});
+        cm.scrollIntoView(pos);
</ins><span class="cx">       } else {
</span><span class="cx">         var oldRange = ourRange;
</span><span class="cx">         var anchor = oldRange.anchor, head = pos;
</span><span class="cx">         if (type != &quot;single&quot;) {
</span><span class="cx">           if (type == &quot;double&quot;)
</span><del>-            var range = findWordAt(doc, pos);
</del><ins>+            var range = findWordAt(cm, pos);
</ins><span class="cx">           else
</span><span class="cx">             var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));
</span><span class="cx">           if (cmp(range.anchor, anchor) &gt; 0) {
</span><span class="lines">@@ -2819,7 +2819,8 @@
</span><span class="cx">       try {
</span><span class="cx">         var text = e.dataTransfer.getData(&quot;Text&quot;);
</span><span class="cx">         if (text) {
</span><del>-          var selected = cm.state.draggingText &amp;&amp; cm.listSelections();
</del><ins>+          if (cm.state.draggingText &amp;&amp; !(mac ? e.metaKey : e.ctrlKey))
+            var selected = cm.listSelections();
</ins><span class="cx">           setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
</span><span class="cx">           if (selected) for (var i = 0; i &lt; selected.length; ++i)
</span><span class="cx">             replaceRange(cm.doc, &quot;&quot;, selected[i].anchor, selected[i].head, &quot;drag&quot;);
</span><span class="lines">@@ -3175,6 +3176,9 @@
</span><span class="cx">         var extval = display.input.value = &quot;\u200b&quot; + (selected ? display.input.value : &quot;&quot;);
</span><span class="cx">         display.prevInput = selected ? &quot;&quot; : &quot;\u200b&quot;;
</span><span class="cx">         display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
</span><ins>+        // Re-set this, in case some other handler touched the
+        // selection in the meantime.
+        display.selForContextMenu = cm.doc.sel;
</ins><span class="cx">       }
</span><span class="cx">     }
</span><span class="cx">     function rehide() {
</span><span class="lines">@@ -3775,10 +3779,11 @@
</span><span class="cx">     else if (unit == &quot;column&quot;) moveOnce(true);
</span><span class="cx">     else if (unit == &quot;word&quot; || unit == &quot;group&quot;) {
</span><span class="cx">       var sawType = null, group = unit == &quot;group&quot;;
</span><ins>+      var helper = doc.cm &amp;&amp; doc.cm.getHelper(pos, &quot;wordChars&quot;);
</ins><span class="cx">       for (var first = true;; first = false) {
</span><span class="cx">         if (dir &lt; 0 &amp;&amp; !moveOnce(!first)) break;
</span><span class="cx">         var cur = lineObj.text.charAt(ch) || &quot;\n&quot;;
</span><del>-        var type = isWordChar(cur) ? &quot;w&quot;
</del><ins>+        var type = isWordChar(cur, helper) ? &quot;w&quot;
</ins><span class="cx">           : group &amp;&amp; cur == &quot;\n&quot; ? &quot;n&quot;
</span><span class="cx">           : !group || /\s/.test(cur) ? null
</span><span class="cx">           : &quot;p&quot;;
</span><span class="lines">@@ -3818,13 +3823,15 @@
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // Find the word at the given position (as returned by coordsChar).
</span><del>-  function findWordAt(doc, pos) {
-    var line = getLine(doc, pos.line).text;
</del><ins>+  function findWordAt(cm, pos) {
+    var doc = cm.doc, line = getLine(doc, pos.line).text;
</ins><span class="cx">     var start = pos.ch, end = pos.ch;
</span><span class="cx">     if (line) {
</span><ins>+      var helper = cm.getHelper(pos, &quot;wordChars&quot;);
</ins><span class="cx">       if ((pos.xRel &lt; 0 || end == line.length) &amp;&amp; start) --start; else ++end;
</span><span class="cx">       var startChar = line.charAt(start);
</span><del>-      var check = isWordChar(startChar) ? isWordChar
</del><ins>+      var check = isWordChar(startChar, helper)
+        ? function(ch) { return isWordChar(ch, helper); }
</ins><span class="cx">         : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
</span><span class="cx">         : function(ch) {return !/\s/.test(ch) &amp;&amp; !isWordChar(ch);};
</span><span class="cx">       while (start &gt; 0 &amp;&amp; check(line.charAt(start - 1))) --start;
</span><span class="lines">@@ -4629,13 +4636,25 @@
</span><span class="cx">     },
</span><span class="cx">     transposeChars: function(cm) {
</span><span class="cx">       runInOp(cm, function() {
</span><del>-        var ranges = cm.listSelections();
</del><ins>+        var ranges = cm.listSelections(), newSel = [];
</ins><span class="cx">         for (var i = 0; i &lt; ranges.length; i++) {
</span><span class="cx">           var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
</span><del>-          if (cur.ch &gt; 0 &amp;&amp; cur.ch &lt; line.length - 1)
-            cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
-                            Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
</del><ins>+          if (line) {
+            if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);
+            if (cur.ch &gt; 0) {
+              cur = new Pos(cur.line, cur.ch + 1);
+              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
+                              Pos(cur.line, cur.ch - 2), cur, &quot;+transpose&quot;);
+            } else if (cur.line &gt; cm.doc.first) {
+              var prev = getLine(cm.doc, cur.line - 1).text;
+              if (prev)
+                cm.replaceRange(line.charAt(0) + &quot;\n&quot; + prev.charAt(prev.length - 1),
+                                Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), &quot;+transpose&quot;);
+            }
+          }
+          newSel.push(new Range(cur, cur));
</ins><span class="cx">         }
</span><ins>+        cm.setSelections(newSel);
</ins><span class="cx">       });
</span><span class="cx">     },
</span><span class="cx">     newlineAndIndent: function(cm) {
</span><span class="lines">@@ -5595,10 +5614,11 @@
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   function readToken(mode, stream, state) {
</span><del>-    var style = mode.token(stream, state);
-    if (stream.pos &lt;= stream.start)
-      throw new Error(&quot;Mode &quot; + mode.name + &quot; failed to advance stream.&quot;);
-    return style;
</del><ins>+    for (var i = 0; i &lt; 10; i++) {
+      var style = mode.token(stream, state);
+      if (stream.pos &gt; stream.start) return style;
+    }
+    throw new Error(&quot;Mode &quot; + mode.name + &quot; failed to advance stream.&quot;);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // Run the given mode's parser over a line, calling f for each token.
</span><span class="lines">@@ -5760,6 +5780,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     signal(cm, &quot;renderLine&quot;, cm, lineView.line, builder.pre);
</span><ins>+    if (builder.pre.className)
+      builder.textClass = joinClasses(builder.pre.className, builder.textClass || &quot;&quot;);
</ins><span class="cx">     return builder;
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="lines">@@ -7064,10 +7086,15 @@
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   var nonASCIISingleCaseWordChar = /[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
</span><del>-  var isWordChar = CodeMirror.isWordChar = function(ch) {
</del><ins>+  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {
</ins><span class="cx">     return /\w/.test(ch) || ch &gt; &quot;\x80&quot; &amp;&amp;
</span><span class="cx">       (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
</span><span class="cx">   };
</span><ins>+  function isWordChar(ch, helper) {
+    if (!helper) return isWordCharBasic(ch);
+    if (helper.source.indexOf(&quot;\\w&quot;) &gt; -1 &amp;&amp; isWordCharBasic(ch)) return true;
+    return helper.test(ch);
+  }
</ins><span class="cx"> 
</span><span class="cx">   function isEmpty(obj) {
</span><span class="cx">     for (var n in obj) if (obj.hasOwnProperty(n) &amp;&amp; obj[n]) return false;
</span><span class="lines">@@ -7149,6 +7176,43 @@
</span><span class="cx">     return b;
</span><span class="cx">   }
</span><span class="cx"> 
</span><ins>+  // WINDOW-WIDE EVENTS
+
+  // These must be handled carefully, because naively registering a
+  // handler for each editor will cause the editors to never be
+  // garbage collected.
+
+  function forEachCodeMirror(f) {
+    if (!document.body.getElementsByClassName) return;
+    var byClass = document.body.getElementsByClassName(&quot;CodeMirror&quot;);
+    for (var i = 0; i &lt; byClass.length; i++) {
+      var cm = byClass[i].CodeMirror;
+      if (cm) f(cm);
+    }
+  }
+
+  var globalsRegistered = false;
+  function ensureGlobalHandlers() {
+    if (globalsRegistered) return;
+    registerGlobalHandlers();
+    globalsRegistered = true;
+  }
+  function registerGlobalHandlers() {
+    // When the window resizes, we need to refresh active editors.
+    var resizeTimer;
+    on(window, &quot;resize&quot;, function() {
+      if (resizeTimer == null) resizeTimer = setTimeout(function() {
+        resizeTimer = null;
+        knownScrollbarWidth = null;
+        forEachCodeMirror(onResize);
+      }, 100);
+    });
+    // When the window loses focus, we want to show the editor as blurred
+    on(window, &quot;blur&quot;, function() {
+      forEachCodeMirror(onBlur);
+    });
+  }
+
</ins><span class="cx">   // FEATURE DETECTION
</span><span class="cx"> 
</span><span class="cx">   // Detect drag-and-drop
</span><span class="lines">@@ -7531,7 +7595,7 @@
</span><span class="cx"> 
</span><span class="cx">   // THE END
</span><span class="cx"> 
</span><del>-  CodeMirror.version = &quot;4.1.1&quot;;
</del><ins>+  CodeMirror.version = &quot;4.2.0&quot;;
</ins><span class="cx"> 
</span><span class="cx">   return CodeMirror;
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIToolsPrettyPrintingcssjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/css.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span><span class="lines">@@ -54,7 +57,7 @@
</span><span class="cx">       if (/[\d.]/.test(stream.peek())) {
</span><span class="cx">         stream.eatWhile(/[\w.%]/);
</span><span class="cx">         return ret(&quot;number&quot;, &quot;unit&quot;);
</span><del>-      } else if (stream.match(/^[^-]+-/)) {
</del><ins>+      } else if (stream.match(/^\w+-/)) {
</ins><span class="cx">         return ret(&quot;meta&quot;, &quot;meta&quot;);
</span><span class="cx">       }
</span><span class="cx">     } else if (/[,+&gt;*\/]/.test(ch)) {
</span><span class="lines">@@ -164,7 +167,7 @@
</span><span class="cx">     } else if (type == &quot;:&quot;) {
</span><span class="cx">       return &quot;pseudo&quot;;
</span><span class="cx">     } else if (allowNested &amp;&amp; type == &quot;(&quot;) {
</span><del>-      return pushContext(state, stream, &quot;params&quot;);
</del><ins>+      return pushContext(state, stream, &quot;parens&quot;);
</ins><span class="cx">     }
</span><span class="cx">     return state.context.type;
</span><span class="cx">   };
</span><span class="lines">@@ -225,6 +228,8 @@
</span><span class="cx">   states.parens = function(type, stream, state) {
</span><span class="cx">     if (type == &quot;{&quot; || type == &quot;}&quot;) return popAndPass(type, stream, state);
</span><span class="cx">     if (type == &quot;)&quot;) return popContext(state);
</span><ins>+    if (type == &quot;(&quot;) return pushContext(state, stream, &quot;parens&quot;);
+    if (type == &quot;word&quot;) wordAsValue(stream);
</ins><span class="cx">     return &quot;parens&quot;;
</span><span class="cx">   };
</span><span class="cx"> 
</span><span class="lines">@@ -300,13 +305,6 @@
</span><span class="cx">     return &quot;interpolation&quot;;
</span><span class="cx">   };
</span><span class="cx"> 
</span><del>-  states.params = function(type, stream, state) {
-    if (type == &quot;)&quot;) return popContext(state);
-    if (type == &quot;{&quot; || type == &quot;}&quot;) return popAndPass(type, stream, state);
-    if (type == &quot;word&quot;) wordAsValue(stream);
-    return &quot;params&quot;;
-  };
-
</del><span class="cx">   return {
</span><span class="cx">     startState: function(base) {
</span><span class="cx">       return {tokenize: null,
</span><span class="lines">@@ -329,10 +327,10 @@
</span><span class="cx">     indent: function(state, textAfter) {
</span><span class="cx">       var cx = state.context, ch = textAfter &amp;&amp; textAfter.charAt(0);
</span><span class="cx">       var indent = cx.indent;
</span><del>-      if (cx.type == &quot;prop&quot; &amp;&amp; ch == &quot;}&quot;) cx = cx.prev;
</del><ins>+      if (cx.type == &quot;prop&quot; &amp;&amp; (ch == &quot;}&quot; || ch == &quot;)&quot;)) cx = cx.prev;
</ins><span class="cx">       if (cx.prev &amp;&amp;
</span><span class="cx">           (ch == &quot;}&quot; &amp;&amp; (cx.type == &quot;block&quot; || cx.type == &quot;top&quot; || cx.type == &quot;interpolation&quot; || cx.type == &quot;font_face&quot;) ||
</span><del>-           ch == &quot;)&quot; &amp;&amp; (cx.type == &quot;parens&quot; || cx.type == &quot;params&quot; || cx.type == &quot;media_parens&quot;) ||
</del><ins>+           ch == &quot;)&quot; &amp;&amp; (cx.type == &quot;parens&quot; || cx.type == &quot;media_parens&quot;) ||
</ins><span class="cx">            ch == &quot;{&quot; &amp;&amp; (cx.type == &quot;at&quot; || cx.type == &quot;media&quot;))) {
</span><span class="cx">         indent = cx.indent - indentUnit;
</span><span class="cx">         cx = cx.prev;
</span><span class="lines">@@ -422,7 +420,8 @@
</span><span class="cx">     &quot;marker-offset&quot;, &quot;marks&quot;, &quot;marquee-direction&quot;, &quot;marquee-loop&quot;,
</span><span class="cx">     &quot;marquee-play-count&quot;, &quot;marquee-speed&quot;, &quot;marquee-style&quot;, &quot;max-height&quot;,
</span><span class="cx">     &quot;max-width&quot;, &quot;min-height&quot;, &quot;min-width&quot;, &quot;move-to&quot;, &quot;nav-down&quot;, &quot;nav-index&quot;,
</span><del>-    &quot;nav-left&quot;, &quot;nav-right&quot;, &quot;nav-up&quot;, &quot;opacity&quot;, &quot;order&quot;, &quot;orphans&quot;, &quot;outline&quot;,
</del><ins>+    &quot;nav-left&quot;, &quot;nav-right&quot;, &quot;nav-up&quot;, &quot;object-fit&quot;, &quot;object-position&quot;,
+    &quot;opacity&quot;, &quot;order&quot;, &quot;orphans&quot;, &quot;outline&quot;,
</ins><span class="cx">     &quot;outline-color&quot;, &quot;outline-offset&quot;, &quot;outline-style&quot;, &quot;outline-width&quot;,
</span><span class="cx">     &quot;overflow&quot;, &quot;overflow-style&quot;, &quot;overflow-wrap&quot;, &quot;overflow-x&quot;, &quot;overflow-y&quot;,
</span><span class="cx">     &quot;padding&quot;, &quot;padding-bottom&quot;, &quot;padding-left&quot;, &quot;padding-right&quot;, &quot;padding-top&quot;,
</span><span class="lines">@@ -433,8 +432,8 @@
</span><span class="cx">     &quot;region-break-before&quot;, &quot;region-break-inside&quot;, &quot;region-fragment&quot;,
</span><span class="cx">     &quot;rendering-intent&quot;, &quot;resize&quot;, &quot;rest&quot;, &quot;rest-after&quot;, &quot;rest-before&quot;, &quot;richness&quot;,
</span><span class="cx">     &quot;right&quot;, &quot;rotation&quot;, &quot;rotation-point&quot;, &quot;ruby-align&quot;, &quot;ruby-overhang&quot;,
</span><del>-    &quot;ruby-position&quot;, &quot;ruby-span&quot;, &quot;shape-inside&quot;, &quot;shape-outside&quot;, &quot;size&quot;,
-    &quot;speak&quot;, &quot;speak-as&quot;, &quot;speak-header&quot;,
</del><ins>+    &quot;ruby-position&quot;, &quot;ruby-span&quot;, &quot;shape-image-threshold&quot;, &quot;shape-inside&quot;, &quot;shape-margin&quot;,
+    &quot;shape-outside&quot;, &quot;size&quot;, &quot;speak&quot;, &quot;speak-as&quot;, &quot;speak-header&quot;,
</ins><span class="cx">     &quot;speak-numeral&quot;, &quot;speak-punctuation&quot;, &quot;speech-rate&quot;, &quot;stress&quot;, &quot;string-set&quot;,
</span><span class="cx">     &quot;tab-size&quot;, &quot;table-layout&quot;, &quot;target&quot;, &quot;target-name&quot;, &quot;target-new&quot;,
</span><span class="cx">     &quot;target-position&quot;, &quot;text-align&quot;, &quot;text-align-last&quot;, &quot;text-decoration&quot;,
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIToolsPrettyPrintingjavascriptjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/Tools/PrettyPrinting/javascript.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/Tools/PrettyPrinting/javascript.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/Tools/PrettyPrinting/javascript.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> // TODO actually recognize syntax of TypeScript constructs
</span><span class="cx"> 
</span><span class="cx"> (function(mod) {
</span><span class="lines">@@ -645,6 +648,8 @@
</span><span class="cx">   };
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+CodeMirror.registerHelper(&quot;wordChars&quot;, &quot;javascript&quot;, /[\\w$]/);
+
</ins><span class="cx"> CodeMirror.defineMIME(&quot;text/javascript&quot;, &quot;javascript&quot;);
</span><span class="cx"> CodeMirror.defineMIME(&quot;text/ecmascript&quot;, &quot;javascript&quot;);
</span><span class="cx"> CodeMirror.defineMIME(&quot;application/javascript&quot;, &quot;javascript&quot;);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorclojurejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/clojure.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/clojure.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/clojure.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> /**
</span><span class="cx">  * Author: Hans Engel
</span><span class="cx">  * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun)
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorclosebracketsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/closebrackets.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/closebrackets.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/closebrackets.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcodemirrorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/codemirror.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/codemirror.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/codemirror.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> // This is CodeMirror (http://codemirror.net), a code editor
</span><span class="cx"> // implemented in JavaScript on top of the browser's DOM.
</span><span class="cx"> //
</span><span class="lines">@@ -93,6 +96,7 @@
</span><span class="cx">     if (ie_upto10) setTimeout(bind(resetInput, this, true), 20);
</span><span class="cx"> 
</span><span class="cx">     registerEventHandlers(this);
</span><ins>+    ensureGlobalHandlers();
</ins><span class="cx"> 
</span><span class="cx">     var cm = this;
</span><span class="cx">     runInOp(this, function() {
</span><span class="lines">@@ -459,7 +463,7 @@
</span><span class="cx">   // the the current scroll position). viewPort may contain top,
</span><span class="cx">   // height, and ensure (see op.scrollToPos) properties.
</span><span class="cx">   function visibleLines(display, doc, viewPort) {
</span><del>-    var top = viewPort &amp;&amp; viewPort.top != null ? viewPort.top : display.scroller.scrollTop;
</del><ins>+    var top = viewPort &amp;&amp; viewPort.top != null ? Math.max(0, viewPort.top) : display.scroller.scrollTop;
</ins><span class="cx">     top = Math.floor(top - paddingTop(display));
</span><span class="cx">     var bottom = viewPort &amp;&amp; viewPort.bottom != null ? viewPort.bottom : top + display.wrapper.clientHeight;
</span><span class="cx"> 
</span><span class="lines">@@ -475,7 +479,7 @@
</span><span class="cx">         return {from: lineAtHeight(doc, heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight),
</span><span class="cx">                 to: ensureTo};
</span><span class="cx">     }
</span><del>-    return {from: from, to: to};
</del><ins>+    return {from: from, to: Math.max(to, from + 1)};
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // LINE NUMBERS
</span><span class="lines">@@ -663,7 +667,6 @@
</span><span class="cx">     cm.display.gutters.style.height = Math.max(measure.docHeight, measure.clientHeight - scrollerCutOff) + &quot;px&quot;;
</span><span class="cx">   }
</span><span class="cx"> 
</span><del>-
</del><span class="cx">   function checkForWebkitWidthBug(cm, measure) {
</span><span class="cx">     // Work around Webkit bug where it sometimes reserves space for a
</span><span class="cx">     // non-existing phantom scrollbar in the scroller (Issue #2420)
</span><span class="lines">@@ -1146,7 +1149,8 @@
</span><span class="cx">     if (hasHandler(doc, &quot;beforeSelectionChange&quot;) || doc.cm &amp;&amp; hasHandler(doc.cm, &quot;beforeSelectionChange&quot;))
</span><span class="cx">       sel = filterSelectionChange(doc, sel);
</span><span class="cx"> 
</span><del>-    var bias = cmp(sel.primary().head, doc.sel.primary().head) &lt; 0 ? -1 : 1;
</del><ins>+    var bias = options &amp;&amp; options.bias ||
+      (cmp(sel.primary().head, doc.sel.primary().head) &lt; 0 ? -1 : 1);
</ins><span class="cx">     setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true));
</span><span class="cx"> 
</span><span class="cx">     if (!(options &amp;&amp; options.scroll === false) &amp;&amp; doc.cm)
</span><span class="lines">@@ -1926,6 +1930,10 @@
</span><span class="cx">     if (!updated &amp;&amp; op.selectionChanged) updateSelection(cm);
</span><span class="cx">     if (!updated &amp;&amp; op.startHeight != cm.doc.height) updateScrollbars(cm);
</span><span class="cx"> 
</span><ins>+    // Abort mouse wheel delta measurement, when scrolling explicitly
+    if (display.wheelStartX != null &amp;&amp; (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos))
+      display.wheelStartX = display.wheelStartY = null;
+
</ins><span class="cx">     // Propagate the scroll position to the actual DOM scroller
</span><span class="cx">     if (op.scrollTop != null &amp;&amp; display.scroller.scrollTop != op.scrollTop) {
</span><span class="cx">       var top = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, op.scrollTop));
</span><span class="lines">@@ -2139,7 +2147,8 @@
</span><span class="cx"> 
</span><span class="cx">   function viewCuttingPoint(cm, oldN, newN, dir) {
</span><span class="cx">     var index = findViewIndex(cm, oldN), diff, view = cm.display.view;
</span><del>-    if (!sawCollapsedSpans) return {index: index, lineN: newN};
</del><ins>+    if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size)
+      return {index: index, lineN: newN};
</ins><span class="cx">     for (var i = 0, n = cm.display.viewFrom; i &lt; index; i++)
</span><span class="cx">       n += view[i].size;
</span><span class="cx">     if (n != oldN) {
</span><span class="lines">@@ -2351,7 +2360,7 @@
</span><span class="cx">         var pos = posFromMouse(cm, e);
</span><span class="cx">         if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return;
</span><span class="cx">         e_preventDefault(e);
</span><del>-        var word = findWordAt(cm.doc, pos);
</del><ins>+        var word = findWordAt(cm, pos);
</ins><span class="cx">         extendSelection(cm.doc, word.anchor, word.head);
</span><span class="cx">       }));
</span><span class="cx">     else
</span><span class="lines">@@ -2392,26 +2401,6 @@
</span><span class="cx">     // Prevent wrapper from ever scrolling
</span><span class="cx">     on(d.wrapper, &quot;scroll&quot;, function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; });
</span><span class="cx"> 
</span><del>-    // When the window resizes, we need to refresh active editors.
-    var resizeTimer;
-    function onResize() {
-      if (resizeTimer == null) resizeTimer = setTimeout(function() {
-        resizeTimer = null;
-        // Might be a text scaling operation, clear size caches.
-        d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = knownScrollbarWidth = null;
-        cm.setSize();
-      }, 100);
-    }
-    on(window, &quot;resize&quot;, onResize);
-    // The above handler holds on to the editor and its data
-    // structures. Here we poll to unregister it when the editor is no
-    // longer in the document, so that it can be garbage-collected.
-    function unregister() {
-      if (contains(document.body, d.wrapper)) setTimeout(unregister, 5000);
-      else off(window, &quot;resize&quot;, onResize);
-    }
-    setTimeout(unregister, 5000);
-
</del><span class="cx">     on(d.input, &quot;keyup&quot;, operation(cm, onKeyUp));
</span><span class="cx">     on(d.input, &quot;input&quot;, function() {
</span><span class="cx">       if (ie &amp;&amp; !ie_upto8 &amp;&amp; cm.display.inputHasSelection) cm.display.inputHasSelection = null;
</span><span class="lines">@@ -2488,6 +2477,14 @@
</span><span class="cx">     });
</span><span class="cx">   }
</span><span class="cx"> 
</span><ins>+  // Called when the window resizes
+  function onResize(cm) {
+    // Might be a text scaling operation, clear size caches.
+    var d = cm.display;
+    d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null;
+    cm.setSize();
+  }
+
</ins><span class="cx">   // MOUSE EVENTS
</span><span class="cx"> 
</span><span class="cx">   // Return true when the given mouse event happened in a widget
</span><span class="lines">@@ -2578,17 +2575,17 @@
</span><span class="cx">       lastClick = {time: now, pos: start};
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    var sel = cm.doc.sel, addNew = mac ? e.metaKey : e.ctrlKey;
-    if (cm.options.dragDrop &amp;&amp; dragAndDrop &amp;&amp; !addNew &amp;&amp; !isReadOnly(cm) &amp;&amp;
</del><ins>+    var sel = cm.doc.sel, modifier = mac ? e.metaKey : e.ctrlKey;
+    if (cm.options.dragDrop &amp;&amp; dragAndDrop &amp;&amp; !isReadOnly(cm) &amp;&amp;
</ins><span class="cx">         type == &quot;single&quot; &amp;&amp; sel.contains(start) &gt; -1 &amp;&amp; sel.somethingSelected())
</span><del>-      leftButtonStartDrag(cm, e, start);
</del><ins>+      leftButtonStartDrag(cm, e, start, modifier);
</ins><span class="cx">     else
</span><del>-      leftButtonSelect(cm, e, start, type, addNew);
</del><ins>+      leftButtonSelect(cm, e, start, type, modifier);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // Start a text drag. When it ends, see if any dragging actually
</span><span class="cx">   // happen, and treat as a click if it didn't.
</span><del>-  function leftButtonStartDrag(cm, e, start) {
</del><ins>+  function leftButtonStartDrag(cm, e, start, modifier) {
</ins><span class="cx">     var display = cm.display;
</span><span class="cx">     var dragEnd = operation(cm, function(e2) {
</span><span class="cx">       if (webkit) display.scroller.draggable = false;
</span><span class="lines">@@ -2597,7 +2594,8 @@
</span><span class="cx">       off(display.scroller, &quot;drop&quot;, dragEnd);
</span><span class="cx">       if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) &lt; 10) {
</span><span class="cx">         e_preventDefault(e2);
</span><del>-        extendSelection(cm.doc, start);
</del><ins>+        if (!modifier)
+          extendSelection(cm.doc, start);
</ins><span class="cx">         focusInput(cm);
</span><span class="cx">         // Work around unexplainable focus problem in IE9 (#2127)
</span><span class="cx">         if (ie_upto10 &amp;&amp; !ie_upto8)
</span><span class="lines">@@ -2635,7 +2633,7 @@
</span><span class="cx">       start = posFromMouse(cm, e, true, true);
</span><span class="cx">       ourIndex = -1;
</span><span class="cx">     } else if (type == &quot;double&quot;) {
</span><del>-      var word = findWordAt(doc, start);
</del><ins>+      var word = findWordAt(cm, start);
</ins><span class="cx">       if (cm.display.shift || doc.extend)
</span><span class="cx">         ourRange = extendRange(doc, ourRange, word.anchor, word.head);
</span><span class="cx">       else
</span><span class="lines">@@ -2681,13 +2679,15 @@
</span><span class="cx">             ranges.push(new Range(Pos(line, leftPos), Pos(line, findColumn(text, right, tabSize))));
</span><span class="cx">         }
</span><span class="cx">         if (!ranges.length) ranges.push(new Range(start, start));
</span><del>-        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex), sel_mouse);
</del><ins>+        setSelection(doc, normalizeSelection(startSel.ranges.slice(0, ourIndex).concat(ranges), ourIndex),
+                     {origin: &quot;*mouse&quot;, scroll: false});
+        cm.scrollIntoView(pos);
</ins><span class="cx">       } else {
</span><span class="cx">         var oldRange = ourRange;
</span><span class="cx">         var anchor = oldRange.anchor, head = pos;
</span><span class="cx">         if (type != &quot;single&quot;) {
</span><span class="cx">           if (type == &quot;double&quot;)
</span><del>-            var range = findWordAt(doc, pos);
</del><ins>+            var range = findWordAt(cm, pos);
</ins><span class="cx">           else
</span><span class="cx">             var range = new Range(Pos(pos.line, 0), clipPos(doc, Pos(pos.line + 1, 0)));
</span><span class="cx">           if (cmp(range.anchor, anchor) &gt; 0) {
</span><span class="lines">@@ -2819,7 +2819,8 @@
</span><span class="cx">       try {
</span><span class="cx">         var text = e.dataTransfer.getData(&quot;Text&quot;);
</span><span class="cx">         if (text) {
</span><del>-          var selected = cm.state.draggingText &amp;&amp; cm.listSelections();
</del><ins>+          if (cm.state.draggingText &amp;&amp; !(mac ? e.metaKey : e.ctrlKey))
+            var selected = cm.listSelections();
</ins><span class="cx">           setSelectionNoUndo(cm.doc, simpleSelection(pos, pos));
</span><span class="cx">           if (selected) for (var i = 0; i &lt; selected.length; ++i)
</span><span class="cx">             replaceRange(cm.doc, &quot;&quot;, selected[i].anchor, selected[i].head, &quot;drag&quot;);
</span><span class="lines">@@ -3175,6 +3176,9 @@
</span><span class="cx">         var extval = display.input.value = &quot;\u200b&quot; + (selected ? display.input.value : &quot;&quot;);
</span><span class="cx">         display.prevInput = selected ? &quot;&quot; : &quot;\u200b&quot;;
</span><span class="cx">         display.input.selectionStart = 1; display.input.selectionEnd = extval.length;
</span><ins>+        // Re-set this, in case some other handler touched the
+        // selection in the meantime.
+        display.selForContextMenu = cm.doc.sel;
</ins><span class="cx">       }
</span><span class="cx">     }
</span><span class="cx">     function rehide() {
</span><span class="lines">@@ -3775,10 +3779,11 @@
</span><span class="cx">     else if (unit == &quot;column&quot;) moveOnce(true);
</span><span class="cx">     else if (unit == &quot;word&quot; || unit == &quot;group&quot;) {
</span><span class="cx">       var sawType = null, group = unit == &quot;group&quot;;
</span><ins>+      var helper = doc.cm &amp;&amp; doc.cm.getHelper(pos, &quot;wordChars&quot;);
</ins><span class="cx">       for (var first = true;; first = false) {
</span><span class="cx">         if (dir &lt; 0 &amp;&amp; !moveOnce(!first)) break;
</span><span class="cx">         var cur = lineObj.text.charAt(ch) || &quot;\n&quot;;
</span><del>-        var type = isWordChar(cur) ? &quot;w&quot;
</del><ins>+        var type = isWordChar(cur, helper) ? &quot;w&quot;
</ins><span class="cx">           : group &amp;&amp; cur == &quot;\n&quot; ? &quot;n&quot;
</span><span class="cx">           : !group || /\s/.test(cur) ? null
</span><span class="cx">           : &quot;p&quot;;
</span><span class="lines">@@ -3818,13 +3823,15 @@
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // Find the word at the given position (as returned by coordsChar).
</span><del>-  function findWordAt(doc, pos) {
-    var line = getLine(doc, pos.line).text;
</del><ins>+  function findWordAt(cm, pos) {
+    var doc = cm.doc, line = getLine(doc, pos.line).text;
</ins><span class="cx">     var start = pos.ch, end = pos.ch;
</span><span class="cx">     if (line) {
</span><ins>+      var helper = cm.getHelper(pos, &quot;wordChars&quot;);
</ins><span class="cx">       if ((pos.xRel &lt; 0 || end == line.length) &amp;&amp; start) --start; else ++end;
</span><span class="cx">       var startChar = line.charAt(start);
</span><del>-      var check = isWordChar(startChar) ? isWordChar
</del><ins>+      var check = isWordChar(startChar, helper)
+        ? function(ch) { return isWordChar(ch, helper); }
</ins><span class="cx">         : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);}
</span><span class="cx">         : function(ch) {return !/\s/.test(ch) &amp;&amp; !isWordChar(ch);};
</span><span class="cx">       while (start &gt; 0 &amp;&amp; check(line.charAt(start - 1))) --start;
</span><span class="lines">@@ -4629,13 +4636,25 @@
</span><span class="cx">     },
</span><span class="cx">     transposeChars: function(cm) {
</span><span class="cx">       runInOp(cm, function() {
</span><del>-        var ranges = cm.listSelections();
</del><ins>+        var ranges = cm.listSelections(), newSel = [];
</ins><span class="cx">         for (var i = 0; i &lt; ranges.length; i++) {
</span><span class="cx">           var cur = ranges[i].head, line = getLine(cm.doc, cur.line).text;
</span><del>-          if (cur.ch &gt; 0 &amp;&amp; cur.ch &lt; line.length - 1)
-            cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1),
-                            Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1));
</del><ins>+          if (line) {
+            if (cur.ch == line.length) cur = new Pos(cur.line, cur.ch - 1);
+            if (cur.ch &gt; 0) {
+              cur = new Pos(cur.line, cur.ch + 1);
+              cm.replaceRange(line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2),
+                              Pos(cur.line, cur.ch - 2), cur, &quot;+transpose&quot;);
+            } else if (cur.line &gt; cm.doc.first) {
+              var prev = getLine(cm.doc, cur.line - 1).text;
+              if (prev)
+                cm.replaceRange(line.charAt(0) + &quot;\n&quot; + prev.charAt(prev.length - 1),
+                                Pos(cur.line - 1, prev.length - 1), Pos(cur.line, 1), &quot;+transpose&quot;);
+            }
+          }
+          newSel.push(new Range(cur, cur));
</ins><span class="cx">         }
</span><ins>+        cm.setSelections(newSel);
</ins><span class="cx">       });
</span><span class="cx">     },
</span><span class="cx">     newlineAndIndent: function(cm) {
</span><span class="lines">@@ -5595,10 +5614,11 @@
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   function readToken(mode, stream, state) {
</span><del>-    var style = mode.token(stream, state);
-    if (stream.pos &lt;= stream.start)
-      throw new Error(&quot;Mode &quot; + mode.name + &quot; failed to advance stream.&quot;);
-    return style;
</del><ins>+    for (var i = 0; i &lt; 10; i++) {
+      var style = mode.token(stream, state);
+      if (stream.pos &gt; stream.start) return style;
+    }
+    throw new Error(&quot;Mode &quot; + mode.name + &quot; failed to advance stream.&quot;);
</ins><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   // Run the given mode's parser over a line, calling f for each token.
</span><span class="lines">@@ -5760,6 +5780,8 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     signal(cm, &quot;renderLine&quot;, cm, lineView.line, builder.pre);
</span><ins>+    if (builder.pre.className)
+      builder.textClass = joinClasses(builder.pre.className, builder.textClass || &quot;&quot;);
</ins><span class="cx">     return builder;
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="lines">@@ -7064,10 +7086,15 @@
</span><span class="cx">   }
</span><span class="cx"> 
</span><span class="cx">   var nonASCIISingleCaseWordChar = /[\u00df\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
</span><del>-  var isWordChar = CodeMirror.isWordChar = function(ch) {
</del><ins>+  var isWordCharBasic = CodeMirror.isWordChar = function(ch) {
</ins><span class="cx">     return /\w/.test(ch) || ch &gt; &quot;\x80&quot; &amp;&amp;
</span><span class="cx">       (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch));
</span><span class="cx">   };
</span><ins>+  function isWordChar(ch, helper) {
+    if (!helper) return isWordCharBasic(ch);
+    if (helper.source.indexOf(&quot;\\w&quot;) &gt; -1 &amp;&amp; isWordCharBasic(ch)) return true;
+    return helper.test(ch);
+  }
</ins><span class="cx"> 
</span><span class="cx">   function isEmpty(obj) {
</span><span class="cx">     for (var n in obj) if (obj.hasOwnProperty(n) &amp;&amp; obj[n]) return false;
</span><span class="lines">@@ -7149,6 +7176,43 @@
</span><span class="cx">     return b;
</span><span class="cx">   }
</span><span class="cx"> 
</span><ins>+  // WINDOW-WIDE EVENTS
+
+  // These must be handled carefully, because naively registering a
+  // handler for each editor will cause the editors to never be
+  // garbage collected.
+
+  function forEachCodeMirror(f) {
+    if (!document.body.getElementsByClassName) return;
+    var byClass = document.body.getElementsByClassName(&quot;CodeMirror&quot;);
+    for (var i = 0; i &lt; byClass.length; i++) {
+      var cm = byClass[i].CodeMirror;
+      if (cm) f(cm);
+    }
+  }
+
+  var globalsRegistered = false;
+  function ensureGlobalHandlers() {
+    if (globalsRegistered) return;
+    registerGlobalHandlers();
+    globalsRegistered = true;
+  }
+  function registerGlobalHandlers() {
+    // When the window resizes, we need to refresh active editors.
+    var resizeTimer;
+    on(window, &quot;resize&quot;, function() {
+      if (resizeTimer == null) resizeTimer = setTimeout(function() {
+        resizeTimer = null;
+        knownScrollbarWidth = null;
+        forEachCodeMirror(onResize);
+      }, 100);
+    });
+    // When the window loses focus, we want to show the editor as blurred
+    on(window, &quot;blur&quot;, function() {
+      forEachCodeMirror(onBlur);
+    });
+  }
+
</ins><span class="cx">   // FEATURE DETECTION
</span><span class="cx"> 
</span><span class="cx">   // Detect drag-and-drop
</span><span class="lines">@@ -7531,7 +7595,7 @@
</span><span class="cx"> 
</span><span class="cx">   // THE END
</span><span class="cx"> 
</span><del>-  CodeMirror.version = &quot;4.1.1&quot;;
</del><ins>+  CodeMirror.version = &quot;4.2.0&quot;;
</ins><span class="cx"> 
</span><span class="cx">   return CodeMirror;
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcoffeescriptjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/coffeescript.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/coffeescript.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/coffeescript.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> /**
</span><span class="cx">  * Link to the project's GitHub page:
</span><span class="cx">  * https://github.com/pickhardt/coffeescript-codemirror-mode
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcommentjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/comment.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/comment.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/comment.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorcssjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/css.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span><span class="lines">@@ -54,7 +57,7 @@
</span><span class="cx">       if (/[\d.]/.test(stream.peek())) {
</span><span class="cx">         stream.eatWhile(/[\w.%]/);
</span><span class="cx">         return ret(&quot;number&quot;, &quot;unit&quot;);
</span><del>-      } else if (stream.match(/^[^-]+-/)) {
</del><ins>+      } else if (stream.match(/^\w+-/)) {
</ins><span class="cx">         return ret(&quot;meta&quot;, &quot;meta&quot;);
</span><span class="cx">       }
</span><span class="cx">     } else if (/[,+&gt;*\/]/.test(ch)) {
</span><span class="lines">@@ -164,7 +167,7 @@
</span><span class="cx">     } else if (type == &quot;:&quot;) {
</span><span class="cx">       return &quot;pseudo&quot;;
</span><span class="cx">     } else if (allowNested &amp;&amp; type == &quot;(&quot;) {
</span><del>-      return pushContext(state, stream, &quot;params&quot;);
</del><ins>+      return pushContext(state, stream, &quot;parens&quot;);
</ins><span class="cx">     }
</span><span class="cx">     return state.context.type;
</span><span class="cx">   };
</span><span class="lines">@@ -225,6 +228,8 @@
</span><span class="cx">   states.parens = function(type, stream, state) {
</span><span class="cx">     if (type == &quot;{&quot; || type == &quot;}&quot;) return popAndPass(type, stream, state);
</span><span class="cx">     if (type == &quot;)&quot;) return popContext(state);
</span><ins>+    if (type == &quot;(&quot;) return pushContext(state, stream, &quot;parens&quot;);
+    if (type == &quot;word&quot;) wordAsValue(stream);
</ins><span class="cx">     return &quot;parens&quot;;
</span><span class="cx">   };
</span><span class="cx"> 
</span><span class="lines">@@ -300,13 +305,6 @@
</span><span class="cx">     return &quot;interpolation&quot;;
</span><span class="cx">   };
</span><span class="cx"> 
</span><del>-  states.params = function(type, stream, state) {
-    if (type == &quot;)&quot;) return popContext(state);
-    if (type == &quot;{&quot; || type == &quot;}&quot;) return popAndPass(type, stream, state);
-    if (type == &quot;word&quot;) wordAsValue(stream);
-    return &quot;params&quot;;
-  };
-
</del><span class="cx">   return {
</span><span class="cx">     startState: function(base) {
</span><span class="cx">       return {tokenize: null,
</span><span class="lines">@@ -329,10 +327,10 @@
</span><span class="cx">     indent: function(state, textAfter) {
</span><span class="cx">       var cx = state.context, ch = textAfter &amp;&amp; textAfter.charAt(0);
</span><span class="cx">       var indent = cx.indent;
</span><del>-      if (cx.type == &quot;prop&quot; &amp;&amp; ch == &quot;}&quot;) cx = cx.prev;
</del><ins>+      if (cx.type == &quot;prop&quot; &amp;&amp; (ch == &quot;}&quot; || ch == &quot;)&quot;)) cx = cx.prev;
</ins><span class="cx">       if (cx.prev &amp;&amp;
</span><span class="cx">           (ch == &quot;}&quot; &amp;&amp; (cx.type == &quot;block&quot; || cx.type == &quot;top&quot; || cx.type == &quot;interpolation&quot; || cx.type == &quot;font_face&quot;) ||
</span><del>-           ch == &quot;)&quot; &amp;&amp; (cx.type == &quot;parens&quot; || cx.type == &quot;params&quot; || cx.type == &quot;media_parens&quot;) ||
</del><ins>+           ch == &quot;)&quot; &amp;&amp; (cx.type == &quot;parens&quot; || cx.type == &quot;media_parens&quot;) ||
</ins><span class="cx">            ch == &quot;{&quot; &amp;&amp; (cx.type == &quot;at&quot; || cx.type == &quot;media&quot;))) {
</span><span class="cx">         indent = cx.indent - indentUnit;
</span><span class="cx">         cx = cx.prev;
</span><span class="lines">@@ -422,7 +420,8 @@
</span><span class="cx">     &quot;marker-offset&quot;, &quot;marks&quot;, &quot;marquee-direction&quot;, &quot;marquee-loop&quot;,
</span><span class="cx">     &quot;marquee-play-count&quot;, &quot;marquee-speed&quot;, &quot;marquee-style&quot;, &quot;max-height&quot;,
</span><span class="cx">     &quot;max-width&quot;, &quot;min-height&quot;, &quot;min-width&quot;, &quot;move-to&quot;, &quot;nav-down&quot;, &quot;nav-index&quot;,
</span><del>-    &quot;nav-left&quot;, &quot;nav-right&quot;, &quot;nav-up&quot;, &quot;opacity&quot;, &quot;order&quot;, &quot;orphans&quot;, &quot;outline&quot;,
</del><ins>+    &quot;nav-left&quot;, &quot;nav-right&quot;, &quot;nav-up&quot;, &quot;object-fit&quot;, &quot;object-position&quot;,
+    &quot;opacity&quot;, &quot;order&quot;, &quot;orphans&quot;, &quot;outline&quot;,
</ins><span class="cx">     &quot;outline-color&quot;, &quot;outline-offset&quot;, &quot;outline-style&quot;, &quot;outline-width&quot;,
</span><span class="cx">     &quot;overflow&quot;, &quot;overflow-style&quot;, &quot;overflow-wrap&quot;, &quot;overflow-x&quot;, &quot;overflow-y&quot;,
</span><span class="cx">     &quot;padding&quot;, &quot;padding-bottom&quot;, &quot;padding-left&quot;, &quot;padding-right&quot;, &quot;padding-top&quot;,
</span><span class="lines">@@ -433,8 +432,8 @@
</span><span class="cx">     &quot;region-break-before&quot;, &quot;region-break-inside&quot;, &quot;region-fragment&quot;,
</span><span class="cx">     &quot;rendering-intent&quot;, &quot;resize&quot;, &quot;rest&quot;, &quot;rest-after&quot;, &quot;rest-before&quot;, &quot;richness&quot;,
</span><span class="cx">     &quot;right&quot;, &quot;rotation&quot;, &quot;rotation-point&quot;, &quot;ruby-align&quot;, &quot;ruby-overhang&quot;,
</span><del>-    &quot;ruby-position&quot;, &quot;ruby-span&quot;, &quot;shape-inside&quot;, &quot;shape-outside&quot;, &quot;size&quot;,
-    &quot;speak&quot;, &quot;speak-as&quot;, &quot;speak-header&quot;,
</del><ins>+    &quot;ruby-position&quot;, &quot;ruby-span&quot;, &quot;shape-image-threshold&quot;, &quot;shape-inside&quot;, &quot;shape-margin&quot;,
+    &quot;shape-outside&quot;, &quot;size&quot;, &quot;speak&quot;, &quot;speak-as&quot;, &quot;speak-header&quot;,
</ins><span class="cx">     &quot;speak-numeral&quot;, &quot;speak-punctuation&quot;, &quot;speech-rate&quot;, &quot;stress&quot;, &quot;string-set&quot;,
</span><span class="cx">     &quot;tab-size&quot;, &quot;table-layout&quot;, &quot;target&quot;, &quot;target-name&quot;, &quot;target-new&quot;,
</span><span class="cx">     &quot;target-position&quot;, &quot;text-align&quot;, &quot;text-align-last&quot;, &quot;text-decoration&quot;,
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorhtmlmixedjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/htmlmixed.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/htmlmixed.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/htmlmixed.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;), require(&quot;../xml/xml&quot;), require(&quot;../javascript/javascript&quot;), require(&quot;../css/css&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorjavascriptjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/javascript.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/javascript.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/javascript.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> // TODO actually recognize syntax of TypeScript constructs
</span><span class="cx"> 
</span><span class="cx"> (function(mod) {
</span><span class="lines">@@ -645,6 +648,8 @@
</span><span class="cx">   };
</span><span class="cx"> });
</span><span class="cx"> 
</span><ins>+CodeMirror.registerHelper(&quot;wordChars&quot;, &quot;javascript&quot;, /[\\w$]/);
+
</ins><span class="cx"> CodeMirror.defineMIME(&quot;text/javascript&quot;, &quot;javascript&quot;);
</span><span class="cx"> CodeMirror.defineMIME(&quot;text/ecmascript&quot;, &quot;javascript&quot;);
</span><span class="cx"> CodeMirror.defineMIME(&quot;application/javascript&quot;, &quot;javascript&quot;);
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorlivescriptjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/livescript.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/livescript.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/livescript.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> /**
</span><span class="cx">  * Link to the project's GitHub page:
</span><span class="cx">  * https://github.com/duralog/CodeMirror
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrormatchbracketsjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/matchbrackets.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/matchbrackets.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/matchbrackets.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirroroverlayjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/overlay.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/overlay.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/overlay.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> // Utility function that allows modes to be combined. The mode given
</span><span class="cx"> // as the base argument takes care of most of the normal mode
</span><span class="cx"> // functionality, but a second (typically simple) mode is used, which
</span><span class="lines">@@ -3,6 +6,7 @@
</span><span class="cx"> // can override the style of text. Both modes get to parse all of the
</span><span class="cx"> // text, but when both assign a non-null style to a piece of code, the
</span><del>-// overlay wins, unless the combine argument was true, in which case
-// the styles are combined.
</del><ins>+// overlay wins, unless the combine argument was true and not overridden,
+// or state.overlay.combineTokens was true, in which case the styles are
+// combined.
</ins><span class="cx"> 
</span><span class="cx"> (function(mod) {
</span><span class="lines">@@ -54,8 +58,13 @@
</span><span class="cx">       }
</span><span class="cx">       stream.pos = Math.min(state.basePos, state.overlayPos);
</span><span class="cx"> 
</span><ins>+      // state.overlay.combineTokens always takes precedence over combine,
+      // unless set to null
</ins><span class="cx">       if (state.overlayCur == null) return state.baseCur;
</span><del>-      if (state.baseCur != null &amp;&amp; combine) return state.baseCur + &quot; &quot; + state.overlayCur;
</del><ins>+      else if (state.baseCur != null &amp;&amp;
+               state.overlay.combineTokens ||
+               combine &amp;&amp; state.overlay.combineTokens == null)
+        return state.baseCur + &quot; &quot; + state.overlayCur;
</ins><span class="cx">       else return state.overlayCur;
</span><span class="cx">     },
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorplaceholderjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/placeholder.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/placeholder.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/placeholder.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorrunmodejs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/runmode.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/runmode.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/runmode.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorsassjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sass.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sass.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sass.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorsearchcursorjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/searchcursor.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/searchcursor.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/searchcursor.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorsqljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sql.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sql.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/sql.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span></span></pre></div>
<a id="trunkSourceWebInspectorUIUserInterfaceExternalCodeMirrorxmljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/xml.js (170079 => 170080)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/xml.js        2014-06-17 22:29:56 UTC (rev 170079)
+++ trunk/Source/WebInspectorUI/UserInterface/External/CodeMirror/xml.js        2014-06-17 22:35:07 UTC (rev 170080)
</span><span class="lines">@@ -1,3 +1,6 @@
</span><ins>+// CodeMirror, copyright (c) by Marijn Haverbeke and others
+// Distributed under an MIT license: http://codemirror.net/LICENSE
+
</ins><span class="cx"> (function(mod) {
</span><span class="cx">   if (typeof exports == &quot;object&quot; &amp;&amp; typeof module == &quot;object&quot;) // CommonJS
</span><span class="cx">     mod(require(&quot;../../lib/codemirror&quot;));
</span><span class="lines">@@ -121,7 +124,7 @@
</span><span class="cx">       state.state = baseState;
</span><span class="cx">       state.tagName = state.tagStart = null;
</span><span class="cx">       var next = state.tokenize(stream, state);
</span><del>-      return next ? next + &quot; error&quot; : &quot;error&quot;;
</del><ins>+      return next ? next + &quot; tag error&quot; : &quot;tag error&quot;;
</ins><span class="cx">     } else if (/[\'\&quot;]/.test(ch)) {
</span><span class="cx">       state.tokenize = inAttribute(ch);
</span><span class="cx">       state.stringStartCol = stream.column();
</span></span></pre>
</div>
</div>

</body>
</html>