Skip to content

Commit

Permalink
Fix display style computation.
Browse files Browse the repository at this point in the history
This commit fixes a bug where the computed display property of a media
resource was not being properly determined. In particular, the isVisible
method was only considering the element style attribute of the supplied
element and its ancestors.
  • Loading branch information
squat committed Nov 7, 2013
1 parent ee6cbc9 commit 86d131e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/Postpone.html
Original file line number Diff line number Diff line change
Expand Up @@ -2372,7 +2372,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Postpone
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Wed Oct 23 2013 19:50:06 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Thu Nov 07 2013 11:36:37 GMT-0500 (EST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Postpone
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Wed Oct 23 2013 19:50:06 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Thu Nov 07 2013 11:36:37 GMT-0500 (EST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Postpone
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Wed Oct 23 2013 19:50:06 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Thu Nov 07 2013 11:36:37 GMT-0500 (EST)
</footer>

<script> prettyPrint(); </script>
Expand Down
4 changes: 2 additions & 2 deletions docs/index.js.html
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ <h1 class="page-title">Source: index.js</h1>
* hidden.
*/
while ( temp && temp.parentElement && isVisible ) {
isVisible = temp.style.display !== "none";
isVisible = temp.currentStyle ? temp.currentStyle.display !== "none" : document.defaultView.getComputedStyle( temp ).getPropertyValue( "display" ) !== "none";
temp = temp.parentElement;
}

Expand Down Expand Up @@ -466,7 +466,7 @@ <h2><a href="index.html">Index</a></h2><h3>Classes</h3><ul><li><a href="Postpone
<br clear="both">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Wed Oct 23 2013 19:50:06 GMT-0400 (EDT)
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.2.1</a> on Thu Nov 07 2013 11:36:37 GMT-0500 (EST)
</footer>

<script> prettyPrint(); </script>
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ Postpone.prototype.isVisible = function( el ) {
* hidden.
*/
while ( temp && temp.parentElement && isVisible ) {
isVisible = temp.style.display !== "none";
isVisible = temp.currentStyle ? temp.currentStyle.display !== "none" : document.defaultView.getComputedStyle( temp ).getPropertyValue( "display" ) !== "none";
temp = temp.parentElement;
}

Expand Down

0 comments on commit 86d131e

Please sign in to comment.