mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 543681. Update the dirty region of view properly when scrolling. r=roc
--HG-- extra : rebase_source : b2c66757fb896a7f075eb059c85db42bb2fd3f45
This commit is contained in:
parent
6710bd9634
commit
9d1ebd2487
18
layout/reftests/invalidation/543681-1-ref.html
Normal file
18
layout/reftests/invalidation/543681-1-ref.html
Normal file
@ -0,0 +1,18 @@
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
|
||||
function doTest() {
|
||||
window.location.href = "#two";
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: 200px;">spacer</div>
|
||||
<div id="one" style="background: blue; width: 200px; height: 200px; display: none;">div one</div>
|
||||
<div id="two" style="background: red; width: 200px; height: 200px;">div two</div>
|
||||
<div style="height: 10000px;">spacer</div>
|
||||
</body>
|
||||
</html>
|
22
layout/reftests/invalidation/543681-1.html
Normal file
22
layout/reftests/invalidation/543681-1.html
Normal file
@ -0,0 +1,22 @@
|
||||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
|
||||
function doTest() {
|
||||
var one = document.getElementById("one");
|
||||
var two = document.getElementById("two");
|
||||
one.style.display = "none";
|
||||
two.style.display = "";
|
||||
window.location.href = "#two";
|
||||
document.documentElement.className = "";
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div style="height: 200px;">spacer</div>
|
||||
<div id="one" style="background: blue; width: 200px; height: 200px;">div one</div>
|
||||
<div id="two" style="background: red; width: 200px; height: 200px; display: none;">div two</div>
|
||||
<div style="height: 10000px;">spacer</div>
|
||||
</body>
|
||||
</html>
|
@ -3,3 +3,4 @@
|
||||
== table-repaint-c.html table-repaint-c-ref.html
|
||||
== table-repaint-d.html table-repaint-d-ref.html
|
||||
== 540247-1.xul 540247-1-ref.xul
|
||||
== 543681-1.html 543681-1-ref.html
|
||||
|
@ -582,13 +582,11 @@ nsViewManager::WillBitBlit(nsIView* aView, const nsRect& aRect,
|
||||
++mScrollCnt;
|
||||
|
||||
nsView* v = static_cast<nsView*>(aView);
|
||||
|
||||
// Since the view is actually moving the widget by -aScrollAmount, that's the
|
||||
// offset we want to use when accumulating dirty rects.
|
||||
if (v->HasNonEmptyDirtyRegion()) {
|
||||
nsRegion* dirty = v->GetDirtyRegion();
|
||||
nsRegion intersection;
|
||||
intersection.And(*dirty, aRect);
|
||||
nsRegion intersection = *dirty;
|
||||
intersection.MoveBy(-aCopyDelta);
|
||||
intersection.And(intersection, aRect);
|
||||
if (!intersection.IsEmpty()) {
|
||||
dirty->Or(*dirty, intersection);
|
||||
// Random simplification number...
|
||||
|
Loading…
Reference in New Issue
Block a user