Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
Bug 680518 - Progress element should invalidate itself when the bar s…
Browse files Browse the repository at this point in the history
…ize changes. r=roc
  • Loading branch information
mounirlamouri committed Aug 22, 2011
1 parent 9aadc28 commit 6ee3256
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions layout/forms/nsProgressFrame.cpp
Expand Up @@ -249,6 +249,7 @@ nsProgressFrame::AttributeChanged(PRInt32 aNameSpaceID,
NS_ASSERTION(barFrame, "The progress frame should have a child with a frame!");
PresContext()->PresShell()->FrameNeedsReflow(barFrame, nsIPresShell::eResize,
NS_FRAME_IS_DIRTY);
Invalidate(GetVisualOverflowRectRelativeToSelf());
}
return nsHTMLContainerFrame::AttributeChanged(aNameSpaceID, aAttribute,
Expand Down
10 changes: 10 additions & 0 deletions layout/reftests/forms/progress/block-invalidate-ref.html
@@ -0,0 +1,10 @@
<!DOCTYPE html>
<html>
<link rel='stylesheet' type='text/css' href='style.css'>
<style>
progress { display: block; }
</style>
<body>
<progress value='0.5'></progress>
</body>
</html>
19 changes: 19 additions & 0 deletions layout/reftests/forms/progress/block-invalidate.html
@@ -0,0 +1,19 @@
<!DOCTYPE html>
<html class='reftest-wait'>
<link rel='stylesheet' type='text/css' href='style.css'>
<style>
progress { display: block; }
</style>
<script>
function loadHandler() {
setTimeout(function() {
var p = document.getElementsByTagName('progress')[0];
p.value = '0.5';
document.documentElement.className = '';
}, 0);
}
</script>
<body onload="loadHandler();">
<progress value='0'></progress>
</body>
</html>
3 changes: 3 additions & 0 deletions layout/reftests/forms/progress/reftest.list
Expand Up @@ -19,3 +19,6 @@
# transformations will not behave exactly the same for <progress> and two divs.
# However, it would be possible to manually check those.
# == transformations.html transformations-ref.html

# Tests for bugs:
== block-invalidate.html block-invalidate-ref.html

0 comments on commit 6ee3256

Please sign in to comment.