mirror of
https://github.com/jquery/jquery.git
synced 2026-02-06 18:14:55 -05:00
Merge branch 'x8908'
This commit is contained in:
10
src/css.js
10
src/css.js
@@ -198,6 +198,7 @@ jQuery.extend({
|
||||
|
||||
// If a hook was provided, use that value, otherwise just set the specified value
|
||||
if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) {
|
||||
|
||||
// Wrapped to prevent IE from throwing errors when 'invalid' values are provided
|
||||
// Fixes bug #5509
|
||||
try {
|
||||
@@ -515,6 +516,15 @@ jQuery.each([ "height", "width" ], function( i, name ) {
|
||||
};
|
||||
});
|
||||
|
||||
if ( !jQuery.support.clearCloneStyle ) {
|
||||
// #8908, this part for IE9 only; see gh-886
|
||||
jQuery.cssHooks.backgroundPosition = {
|
||||
set: function( elem, value ) {
|
||||
return value === "" ? "0% 0%" : value;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
if ( !jQuery.support.opacity ) {
|
||||
jQuery.cssHooks.opacity = {
|
||||
get: function( elem, computed ) {
|
||||
|
||||
@@ -596,8 +596,12 @@ jQuery.extend({
|
||||
clone;
|
||||
|
||||
if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) {
|
||||
clone = elem.cloneNode( true );
|
||||
// Break the original-clone style connection in IE9/10 (#8909)
|
||||
if ( !jQuery.support.clearCloneStyle && elem.nodeType === 1 ) {
|
||||
i = ( window.getComputedStyle( elem, null ) || {} ).backgroundPosition;
|
||||
}
|
||||
|
||||
clone = elem.cloneNode( true );
|
||||
// IE<=8 does not properly clone detached, unknown element nodes
|
||||
} else {
|
||||
fragmentDiv.innerHTML = elem.outerHTML;
|
||||
|
||||
@@ -169,6 +169,10 @@ jQuery.support = (function() {
|
||||
}
|
||||
}
|
||||
|
||||
div.style.backgroundClip = "content-box";
|
||||
div.cloneNode( true ).style.backgroundClip = "";
|
||||
support.clearCloneStyle = div.style.backgroundClip === "content-box";
|
||||
|
||||
// Run tests that need a body at doc ready
|
||||
jQuery(function() {
|
||||
var container, div, tds, marginDiv,
|
||||
|
||||
Reference in New Issue
Block a user