Web Inspector: Fix js minification of updated CodeMirror
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Aug 2013 21:58:17 +0000 (21:58 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Aug 2013 21:58:17 +0000 (21:58 +0000)
https://bugs.webkit.org/show_bug.cgi?id=120231

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2013-08-23
Reviewed by Andy Estes.

Workaround a jsmin issue with "return //.test();" lines when
minifying JavaScript in production builds.

* Scripts/copy-user-interface-resources.sh:
* UserInterface/External/CodeMirror/codemirror.js:
(window.CodeMirror):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/External/CodeMirror/codemirror.js

index 10e208dcfbeceda14a100e1ca1d9a1a53e61cdba..7cd112f3f5fa969751d2657bec07540f89412834 100644 (file)
@@ -1,3 +1,17 @@
+2013-08-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Fix js minification of updated CodeMirror
+        https://bugs.webkit.org/show_bug.cgi?id=120231
+
+        Reviewed by Andy Estes.
+
+        Workaround a jsmin issue with "return //.test();" lines when
+        minifying JavaScript in production builds.
+
+        * Scripts/copy-user-interface-resources.sh:
+        * UserInterface/External/CodeMirror/codemirror.js:
+        (window.CodeMirror):
+
 2013-08-22  Joseph Pecoraro  <pecoraro@apple.com>
 
         <https://webkit.org/b/120165> Web Inspector: Update CodeMirror to 3.16.1
index bc238a274a111548e28ec8c366cad076bc726f8b..7a5a1e523d7e49f6cb2959c871be93348c1964f6 100644 (file)
@@ -5464,7 +5464,8 @@ window.CodeMirror = (function() {
     };
   else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent))
     spanAffectsWrapping = function(str, i) {
-      return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1));
+      var result = /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1));
+      return result;
     };
   else if (webkit && !/Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent))
     spanAffectsWrapping = function(str, i) {
@@ -5472,7 +5473,8 @@ window.CodeMirror = (function() {
         if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true;
         if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false;
       }
-      return /[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1));
+      var result = /[~!#%&*)=+}\]|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1));
+      return result;
     };
 
   var knownScrollbarWidth;