mirror of
https://github.com/Hopiu/jquery-mobile.git
synced 2026-04-19 22:00:59 +00:00
removed support tests for display, position, overflow, floatClear, as media query support infers these are all good to go!
This commit is contained in:
parent
de53cfb930
commit
7b37d7a7ab
1 changed files with 6 additions and 33 deletions
|
|
@ -25,43 +25,16 @@ $.media = (function() {
|
|||
};
|
||||
})();
|
||||
|
||||
var fakeBody = $( "<body>" ).prependTo( "html" );
|
||||
|
||||
$.extend( $.support, {
|
||||
orientation: "orientation" in window,
|
||||
touch: "ontouchend" in document,
|
||||
WebKitAnimationEvent: typeof WebKitTransitionEvent === "object",
|
||||
pushState: !!history.pushState,
|
||||
mediaquery: $.media('only all')
|
||||
mediaquery: $.media('only all'),
|
||||
cssPseudoElement: fakeBody[0].style.content !== undefined
|
||||
});
|
||||
|
||||
(function() {
|
||||
var fakeBody = $( "<body>" ).prependTo( "html" ),
|
||||
displayDiv = $( "<div style='height:5px;position:absolute;display:none;'/>" )
|
||||
.prependTo( fakeBody )[ 0 ],
|
||||
positionDiv = $( "<div style='position:absolute;left:10px;overflow:hidden;height:0;'>" +
|
||||
"<div style='height:10px;'/></div>").prependTo( fakeBody )[ 0 ],
|
||||
floatClearHtml = "<div style='width:5px;height:5px;float:left;'/>",
|
||||
floatClearWrap = $( "<div>" )
|
||||
.append( floatClearHtml + floatClearHtml )
|
||||
.prependTo( fakeBody ),
|
||||
floatClearDivs = floatClearWrap.children(),
|
||||
floatClearDiv1Top = floatClearDivs[ 0 ].offsetTop,
|
||||
floatClearDiv2 = floatClearDivs[ 1 ],
|
||||
supportFloatClear = false;
|
||||
|
||||
if ( floatClearDiv1Top === floatClearDiv2.offsetTop ) {
|
||||
floatClearDiv2.style.clear = "left";
|
||||
if ( floatClearDiv1Top !== floatClearDiv2.offsetTop ) {
|
||||
supportFloatClear = true;
|
||||
}
|
||||
}
|
||||
|
||||
$.extend( $.support, {
|
||||
display: displayDiv.offsetHeight === 0,
|
||||
position: positionDiv.offsetLeft === 10,
|
||||
overflow: positionDiv.offsetHeight === 0,
|
||||
floatclear: supportFloatClear,
|
||||
cssPseudoElement: fakeBody[0].style.content !== undefined
|
||||
});
|
||||
|
||||
fakeBody.remove();
|
||||
})();
|
||||
fakeBody.remove();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue