Move the diff highlighting code out and fix position problems.

Review Request #4295 — Created July 6, 2013 and submitted

Information

Review Board
master

Reviewers

Move the diff highlighting code out and fix position problems.

The diff highlighting now lives in a ChunkHighlighterView object.
This takes a chunk element (a tbody/thead in the diff viewer) and
surrounds it with black borders.

This is a port of the old code, but with some fixes and changes.

The old DOM mutation events are no longer listened to, as they don't
seem to be needed, from my testing.

The positions of the borders are no longer off by several pixels on
every browser. tbody dimension calculation is horribly inconsistent
across browsers, so we're now using the table's left and width. That
takes care of the most noticeable problems. I've also done some tuning
to make the vertical position work properly across Chrome, Firefox and
IE.
Tested highlighting on Chrome, Firefox, IE9 (in IE8 and in IE9 modes), and IE10.

Tested with resizing, zooming in/out, and chunk expanding/collapsing.
reviewbot
  1. This is a review from Review Bot.
      Tool: PEP8 Style Checker
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
        reviewboard/static/rb/js/diffviewer/views/chunkHighlighterView.js
        reviewboard/static/rb/css/diffviewer.less
        reviewboard/static/rb/js/diffviewer.js
    
    
  2. 
      
reviewbot
  1. This is a review from Review Bot.
      Tool: Pyflakes
      Processed Files:
        reviewboard/settings.py
      Ignored Files:
        reviewboard/static/rb/js/pages/views/diffViewerPageView.js
        reviewboard/static/rb/js/diffviewer/views/chunkHighlighterView.js
        reviewboard/static/rb/css/diffviewer.less
        reviewboard/static/rb/js/diffviewer.js
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Loading...