Fix issues with using Retina images on CDNs.

Review Request #8462 — Created Oct. 14, 2016 and submitted

Information

Review Board
release-2.5.x
4d3472d...

Reviewers

retina.js explicitly forbids enabling @2x images when referenced as an
absolute URL, rather than a relative path. This is causing RBCommons to
show a non-Retina logo (and other images as well, but most of our icons
use spritesheets and CSS, preventing this problem).

This was never fixed in retina.js, and retina.js 2.x is a fundamental
rewrite that impacts compatibility, so we need to patch this locally.
The change is bypasses the external URL check when we know an explicit
at2x image has been provided.

Long-term, we'll want to move everything to srcsets and away from
retina.js, but this solves the issue for now.

Tested with URL references to external CDNs. Saw Retina images instead
of non-Retina images.

reviewbot
  1. Tool: PEP8 Style Checker
    Ignored Files:
        reviewboard/static/lib/js/retina.js
        reviewboard/templates/base/branding.html
    
    
    
    Tool: Pyflakes
    Ignored Files:
        reviewboard/static/lib/js/retina.js
        reviewboard/templates/base/branding.html
    
    
  2. 
      
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-2.5.x (48e37ca)
Loading...