Backed out changeset 2d5d156dcb24 (bug 1101611)
authorGregory Szorc <gps@mozilla.com>
Tue, 01 Mar 2016 14:33:34 -0800
changeset 3946 cc7bde07b24c9e0ce56830a2d4f2bf61be52d144
parent 3945 a0c2ee2f9c71850c65f8464a8936f0ddffbd5201
child 3947 83ed92ddc0de9bdd7e961db836cc50aded2e1044
push id1598
push usergszorc@mozilla.com
push dateTue, 01 Mar 2016 22:33:38 +0000
treeherderversion-control-tools@cc7bde07b24c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1101611
backs out2d5d156dcb24ac07619745115b80a77c64b68a26
Backed out changeset 2d5d156dcb24 (bug 1101611) Was causing deployment failures due to static assets foo. STATIC_ROOT may not be defined and allowed...
pylib/mozreview/mozreview/static/mozreview/css/viewdiff.less
pylib/mozreview/mozreview/static/mozreview/js/init_filediffreviewer.js
--- a/pylib/mozreview/mozreview/static/mozreview/css/viewdiff.less
+++ b/pylib/mozreview/mozreview/static/mozreview/css/viewdiff.less
@@ -1,10 +1,8 @@
-@import (reference) "@{STATIC_ROOT}rb/css/defs.less";
-
 button.diff-file-btn {
     position: absolute;
     background-color: #DDD;
     font-weight: bold;
     text-align: right;
     top: 7px;
     right: 7px;
     padding: 5px;
@@ -39,18 +37,16 @@ button.diff-file-btn {
 }
 
 .unindent {
     color: #aaaaaa;
     background-color: #ffe0e5;
     outline: 1px solid #ffe0e5;
 }
 
-/* add comment icon which follows cursor */
-
 .sidebyside {
     tbody {
         tr {
             &:hover {
                 pre:before {
                     content: '';
                     display: relative;
                     box-shadow: 1px 1px 3px black;
@@ -70,18 +66,9 @@ button.diff-file-btn {
                 padding-right: 20px;
             }
         }
     }
 }
 
 span.ghost-commentflag {
     display: none !important;
-}
-
-/* make review comments more noticable */
-
-.comment-block-container {
-  border-top: 2px dotted @comment-flag-color;
-}
-.comment-block-container-draft {
-  border-top: 2px dotted @comment-flag-draft-color;
-}
+}
\ No newline at end of file
--- a/pylib/mozreview/mozreview/static/mozreview/js/init_filediffreviewer.js
+++ b/pylib/mozreview/mozreview/static/mozreview/js/init_filediffreviewer.js
@@ -1,49 +1,11 @@
 $(document).ready(function() {
   var page = RB.PageManager.getPage();
 
-  // Adjust the styling of comment blocks to draw attention to their
-  // existance.  Unfortunately the template is opaque to us, so we
-  // have to resort to MutationObserver shenanigans.
-  try {
-    var observer = new MutationObserver(function(mutations) {
-      mutations.forEach(function(mutation) {
-        var $target = $(mutation.target);
-        if ($target.hasClass('diff-box')) {
-          // initial page layout
-          var $flags = $target.find('.commentflag');
-          $flags
-            .filter(':not(.draft)')
-            .parents('tr')
-            .addClass('comment-block-container');
-          $flags
-            .filter('.draft')
-            .parents('tr')
-            .addClass('comment-block-container-draft');
-        } else if ($target.prop('nodeName') === 'TH') {
-          // comment added/removed
-          var $tr = $target.parent('tr');
-          $tr
-            .removeClass('comment-block-container')
-            .removeClass('comment-block-container-draft');
-          if ($target.find('.commentflag').length) {
-            $tr.addClass($target.find('.commentflag.draft').length ?
-                         'comment-block-container-draft' :
-                         'comment-block-container');
-          }
-        }
-      });
-    });
-    observer.observe(document.querySelector('#diffs'),
-                     { childList: true, subtree: true });
-  } catch(e) {
-    // we don't care if this fails
-  }
-
   var FileDiffReviewerData = $('#file-diff-reviewer-data')
                              .data('file-diff-reviewer');
   var fileDiffReviewerModels = FileDiffReviewerData.map(function(item){
     return new RB.FileDiffReviewerModel(item);
   });
   var fileDiffReviewerCollection = new RB.FileDiffReviewerCollection(
     fileDiffReviewerModels
   );