Bug 749816. When setting the display port for an element We only need to discard layer contents when we are hiding a document with a widget. r=roc

This commit is contained in:
Timothy Nikkel 2012-05-01 01:43:59 -05:00
Родитель 878c1e1e23
Коммит 0af4b79894
3 изменённых файлов: 21 добавлений и 2 удалений

Просмотреть файл

@ -359,8 +359,11 @@ nsDOMWindowUtils::SetDisplayPortForElement(float aXPx, float aYPx,
usingDisplayport ? rootDisplayport : rootFrame->GetVisualOverflowRect(),
nsIFrame::INVALIDATE_NO_THEBES_LAYERS);
// Send empty paint transaction in order to release retained layers
if (displayport.IsEmpty()) {
// If we are hiding something that is a display root then send empty paint
// transaction in order to release retained layers because it won't get
// any more paint requests when it is hidden.
if (displayport.IsEmpty() &&
rootFrame == nsLayoutUtils::GetDisplayRootFrame(rootFrame)) {
nsCOMPtr<nsIWidget> widget = GetWidget();
if (widget) {
bool isRetainingManager;

Просмотреть файл

@ -0,0 +1,15 @@
<html>
<head>
<title>crash in epoll_wait after changing display: table-column style to display:none on body</title>
<script>
function doe() {
document.body.style.display = 'none';
}
setTimeout(doe, 1000);
</script>
</head>
<body style="display: table-column;">
This page should not crash Fennec
</body>
</html>

Просмотреть файл

@ -355,3 +355,4 @@ load 727601.html
asserts(0-2) pref(dom.disable_open_during_load,false) load 735943.html # the assertion is bug 735966
asserts(0-2) load 736389-1.xhtml # sometimes the above assertions are delayed and is reported on this test instead
load 736924-1.html
load 749816-1.html