Fix #7986. $.support.boxModel shan't be fooled by page-level CSS.

This commit is contained in:
Mike Sherov
2012-02-24 00:14:15 -05:00
committed by Dave Methvin
parent 1c35f3816a
commit a52391aa1d
5 changed files with 34 additions and 18 deletions

4
src/effects.js vendored
View File

@@ -157,7 +157,7 @@ jQuery.fn.extend({
prop[ name ] = prop[ p ];
delete prop[ p ];
}
if ( ( hooks = jQuery.cssHooks[ name ] ) && "expand" in hooks ) {
replace = hooks.expand( prop[ name ] );
delete prop[ name ];
@@ -676,7 +676,7 @@ function defaultDisplay( nodeName ) {
// document to it; WebKit & Firefox won't allow reusing the iframe document.
if ( !iframeDoc || !iframe.createElement ) {
iframeDoc = ( iframe.contentWindow || iframe.contentDocument ).document;
iframeDoc.write( ( document.compatMode === "CSS1Compat" ? "<!doctype html>" : "" ) + "<html><body>" );
iframeDoc.write( ( jQuery.support.boxModel ? "<!doctype html>" : "" ) + "<html><body>" );
iframeDoc.close();
}