зеркало из https://github.com/mozilla/pjs.git
Bug 539356 - Part 27 - Make nsImageFrame's overflow include the AltFeedback image if it will use one. r=roc
This commit is contained in:
Родитель
6e40061630
Коммит
07c0b565fc
|
@ -864,6 +864,21 @@ nsImageFrame::Reflow(nsPresContext* aPresContext,
|
|||
}
|
||||
|
||||
aMetrics.SetOverflowAreasToDesiredBounds();
|
||||
nsEventStates contentState = mContent->AsElement()->State();
|
||||
bool imageOK = IMAGE_OK(contentState, true);
|
||||
|
||||
// Determine if the size is available
|
||||
bool haveSize = false;
|
||||
if (loadStatus & imgIRequest::STATUS_SIZE_AVAILABLE) {
|
||||
haveSize = true;
|
||||
}
|
||||
|
||||
if (!imageOK || !haveSize) {
|
||||
nsRect altFeedbackSize(0, 0,
|
||||
2*(nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+ICON_PADDING+ALT_BORDER_WIDTH)),
|
||||
2*(nsPresContext::CSSPixelsToAppUnits(ICON_SIZE+ICON_PADDING+ALT_BORDER_WIDTH)));
|
||||
aMetrics.mOverflowAreas.UnionAllWith(altFeedbackSize);
|
||||
}
|
||||
FinishAndStoreOverflow(&aMetrics);
|
||||
|
||||
NS_FRAME_TRACE(NS_FRAME_TRACE_CALLS,
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
function doTest() {
|
||||
window.frames[0].document.body.innerHTML =
|
||||
"<img src='passouter.png' " +
|
||||
"onload='window.parent.document.documentElement.className = ""'>";
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -2,11 +2,12 @@
|
|||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
function doTest() {
|
||||
window.frames[0].document.body.innerHTML =
|
||||
"<img src='passouter.png' " +
|
||||
"onload='window.parent.document.documentElement.className = ""'>";
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
function doTest() {
|
||||
window.frames[0].location =
|
||||
'javascript:document.write(""); document.close(); ' +
|
||||
'parent.continueTest();'
|
||||
|
@ -16,6 +16,7 @@
|
|||
"onload='window.parent.document.documentElement.className = ""'>";
|
||||
}, 0);
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html class="reftest-wait">
|
||||
<head>
|
||||
<script>
|
||||
window.onload = function() {
|
||||
function doTest() {
|
||||
window.frames[0].location =
|
||||
'javascript:document.write(""); document.close(); ' +
|
||||
'parent.continueTest();'
|
||||
|
@ -16,6 +16,7 @@
|
|||
"onload='window.parent.document.documentElement.className = ""'>";
|
||||
}, 0);
|
||||
}
|
||||
document.addEventListener("MozReftestInvalidate", doTest, false);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
|
Загрузка…
Ссылка в новой задаче