mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
Bug 872254. Clear line/row cursors when overflow areas of lines or table rows change. r=bz
--HG-- extra : rebase_source : 81c1c4269e22ffad98433669ef152002b9d63533
This commit is contained in:
parent
072bee6956
commit
c74c28560e
@ -1502,6 +1502,10 @@ nsBlockFrame::UpdateOverflow()
|
||||
line->SetOverflowAreas(lineAreas);
|
||||
}
|
||||
|
||||
// Line cursor invariants depend on the overflow areas of the lines, so
|
||||
// we must clear the line cursor since those areas may have changed.
|
||||
ClearLineCursor();
|
||||
|
||||
return nsBlockFrameSuper::UpdateOverflow();
|
||||
}
|
||||
|
||||
|
21
layout/reftests/bugs/872254-1-ref.html
Normal file
21
layout/reftests/bugs/872254-1-ref.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<style>
|
||||
body { height:5000px; overflow:hidden; }
|
||||
div {
|
||||
position:relative;
|
||||
top:500px;
|
||||
width:300px;
|
||||
height:300px;
|
||||
background-color:red;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.scrollTo(0,500);
|
||||
</script>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
71
layout/reftests/bugs/872254-1.html
Normal file
71
layout/reftests/bugs/872254-1.html
Normal file
@ -0,0 +1,71 @@
|
||||
<!DOCTYPE html>
|
||||
<html class="reftest-wait">
|
||||
<body>
|
||||
<style>
|
||||
body { height:5000px; overflow:hidden; }
|
||||
div {
|
||||
position:relative;
|
||||
width:300px;
|
||||
height:300px;
|
||||
background-color:red;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
window.scrollTo(0,0);
|
||||
window.addEventListener("MozReftestInvalidate", function() {
|
||||
document.getElementsByTagName("div")[0].style.top = '500px';
|
||||
window.scrollTo(0,500);
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, false);
|
||||
</script>
|
||||
<table>
|
||||
<tr><td><div></div></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
<tr><td></td></tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
@ -1325,6 +1325,15 @@ nsTableRowGroupFrame::Reflow(nsPresContext* aPresContext,
|
||||
return rv;
|
||||
}
|
||||
|
||||
bool
|
||||
nsTableRowGroupFrame::UpdateOverflow()
|
||||
{
|
||||
// Row cursor invariants depend on the visual overflow area of the rows,
|
||||
// which may have changed, so we need to clear the cursor now.
|
||||
ClearRowCursor();
|
||||
return nsContainerFrame::UpdateOverflow();
|
||||
}
|
||||
|
||||
/* virtual */ void
|
||||
nsTableRowGroupFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
|
@ -111,6 +111,8 @@ public:
|
||||
const nsHTMLReflowState& aReflowState,
|
||||
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
||||
|
||||
virtual bool UpdateOverflow() MOZ_OVERRIDE;
|
||||
|
||||
/**
|
||||
* Get the "type" of the frame
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user