Skip to content

Commit 3765cd3

Browse files
committed
Update picturefill to 2.3.1
1 parent 1917d63 commit 3765cd3

File tree

6 files changed

+18
-15
lines changed

6 files changed

+18
-15
lines changed
-10.4 KB
Binary file not shown.
10.5 KB
Binary file not shown.

picturefill_2.3.0/CHANGES.htm renamed to picturefill_2.3.1/CHANGES.htm

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
<ol style="max-height: 20em; overflow: auto;">
2+
<li>
3+
<strong>2.3.1</strong>
4+
<p>This release fixes a critical issue with Picturefill's <code>currentSrc</code> support test. This issue caused errors in both the Spartan and WebKit nightlies.</p>
5+
</li>
26
<li>
37
<strong>2.3.0</strong>
48
<p>Changes from <a href="#release-2.3.0-beta">Picturefill 2.3 Beta</a></p>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p>picturefill is licened under the <a href="https://raw.githubusercontent.com/scottjehl/picturefill/2.3.0/LICENSE">MIT License</a>.</p>
1+
<p>picturefill is licened under the <a href="https://raw.githubusercontent.com/scottjehl/picturefill/2.3.1/LICENSE">MIT License</a>.</p>

picturefill_2.3.0/picturefill.dnn renamed to picturefill_2.3.1/picturefill.dnn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<dotnetnuke type="Package" version="5.0">
22
<packages>
3-
<package name="picturefill" type="JavaScript_Library" version="2.3.0">
3+
<package name="picturefill" type="JavaScript_Library" version="2.3.1">
44
<friendlyName>Picturefill</friendlyName>
55
<description><![CDATA[A responsive image polyfill for <code>&lt;picture></code>, <code>srcset</code>, <code>sizes</code>, and more
66
<a href="http://scottjehl.github.com/picturefill/">http://scottjehl.github.com/picturefill/</a>]]></description>
@@ -24,7 +24,7 @@
2424
<libraryName>picturefill</libraryName>
2525
<fileName>picturefill.js</fileName>
2626
<preferredScriptLocation>BodyBottom</preferredScriptLocation>
27-
<CDNPath>https://cdn.jsdelivr.net/picturefill/2.3.0/picturefill.min.js</CDNPath>
27+
<CDNPath>https://cdn.jsdelivr.net/picturefill/2.3.1/picturefill.min.js</CDNPath>
2828
<objectName>picturefill</objectName>
2929
</javaScriptLibrary>
3030
</component>

picturefill_2.3.0/picturefill.js renamed to picturefill_2.3.1/picturefill.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Picturefill - v2.3.0 - 2015-03-23
1+
/*! Picturefill - v2.3.1 - 2015-04-09
22
* http://scottjehl.github.io/picturefill
33
* Copyright (c) 2015 https://github.com/scottjehl/picturefill/blob/master/Authors.txt; Licensed MIT */
44
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas, David Knight. Dual MIT/BSD license */
@@ -92,6 +92,7 @@ window.matchMedia || (window.matchMedia = function() {
9292
(function() {
9393
pf.srcsetSupported = "srcset" in image;
9494
pf.sizesSupported = "sizes" in image;
95+
pf.curSrcSupported = "currentSrc" in image;
9596
})();
9697

9798
// just a string trim workaround
@@ -504,7 +505,9 @@ window.matchMedia || (window.matchMedia = function() {
504505
picImg.src = bestCandidate.url;
505506
// currentSrc attribute and property to match
506507
// http://picture.responsiveimages.org/#the-img-element
507-
picImg.currentSrc = picImg.src;
508+
if ( !pf.curSrcSupported ) {
509+
picImg.currentSrc = picImg.src;
510+
}
508511

509512
pf.backfaceVisibilityFix( picImg );
510513
}
@@ -707,17 +710,13 @@ window.matchMedia || (window.matchMedia = function() {
707710
}
708711
}, 250 );
709712

713+
var resizeTimer;
714+
var handleResize = function() {
715+
picturefill({ reevaluate: true });
716+
};
710717
function checkResize() {
711-
var resizeThrottle;
712-
713-
if ( !w._picturefillWorking ) {
714-
w._picturefillWorking = true;
715-
w.clearTimeout( resizeThrottle );
716-
resizeThrottle = w.setTimeout( function() {
717-
picturefill({ reevaluate: true });
718-
w._picturefillWorking = false;
719-
}, 60 );
720-
}
718+
clearTimeout(resizeTimer);
719+
resizeTimer = setTimeout( handleResize, 60 );
721720
}
722721

723722
if ( w.addEventListener ) {

0 commit comments

Comments
 (0)