зеркало из https://github.com/mozilla/pjs.git
Bug 534808. Need to clear descendant intrinsic widths on height changes, due to replaced elements. r=dbaron
This commit is contained in:
Родитель
7c27f673da
Коммит
99bd5c1a6a
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
table { border-spacing: 0; }
|
||||||
|
td { padding: 0; border: 1px solid; line-height: 1px; }
|
||||||
|
img { visibility: hidden; vertical-align: bottom; }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<table><tr><td>
|
||||||
|
<img src="solidblue.png">
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,20 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
table { border-spacing: 0; }
|
||||||
|
td { padding: 0; border: 1px solid; line-height: 1px; }
|
||||||
|
img { visibility: hidden; vertical-align: bottom; }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body onload="document.getElementById('forty').style.height = '';">
|
||||||
|
|
||||||
|
<table><tr><td><div style="height: 40px" id="forty"><div style="height: 100%">
|
||||||
|
<img src="solidblue.png" style="height: 75%">
|
||||||
|
</div></div></td></tr></table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
table { border-spacing: 0; }
|
||||||
|
td { padding: 0; border: 1px solid; line-height: 1px; }
|
||||||
|
img { visibility: hidden; vertical-align: bottom; }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- solidblue.png is a 16x16 image -->
|
||||||
|
|
||||||
|
<table><tr><td><div style="height: 40px">
|
||||||
|
<img src="solidblue.png" style="width: 32px">
|
||||||
|
</div></td></tr></table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -0,0 +1,22 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta http-equiv="Content-Style-Type" content="text/css">
|
||||||
|
<style type="text/css">
|
||||||
|
|
||||||
|
table { border-spacing: 0; }
|
||||||
|
td { padding: 0; border: 1px solid; line-height: 1px; }
|
||||||
|
img { visibility: hidden; vertical-align: bottom; }
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<!-- solidblue.png is a 16x16 image -->
|
||||||
|
|
||||||
|
<table><tr><td><div style="height: 40px" id="forty"><div style="height: 100%">
|
||||||
|
<img src="solidblue.png" style="height: 80%">
|
||||||
|
</div></div></td></tr></table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1359,4 +1359,6 @@ fails HTTP(..) == 518172-2b.html 518172-b-ref.html # bug 518172
|
||||||
== 530686-1.html 530686-1-ref.html
|
== 530686-1.html 530686-1-ref.html
|
||||||
== 531098-1.html 531098-1-ref.html
|
== 531098-1.html 531098-1-ref.html
|
||||||
== 531371-1.html 531371-1-ref.html
|
== 531371-1.html 531371-1-ref.html
|
||||||
|
== 534808-1.html 534808-1-ref.html
|
||||||
|
== 534808-2.html 534808-2-ref.html
|
||||||
== 534919-1.html 534919-1-ref.html
|
== 534919-1.html 534919-1-ref.html
|
||||||
|
|
|
@ -1106,14 +1106,13 @@ nsChangeHint nsStylePosition::CalcDifference(const nsStylePosition& aOther) cons
|
||||||
if (mHeight != aOther.mHeight ||
|
if (mHeight != aOther.mHeight ||
|
||||||
mMinHeight != aOther.mMinHeight ||
|
mMinHeight != aOther.mMinHeight ||
|
||||||
mMaxHeight != aOther.mMaxHeight) {
|
mMaxHeight != aOther.mMaxHeight) {
|
||||||
// Height changes can't affect descendant intrinsic sizes, but due to our
|
// Height changes can affect descendant intrinsic sizes due to replaced
|
||||||
// not-so-great computation of mVResize in nsHTMLReflowState, do need to
|
// elements with percentage heights in descendants which also have
|
||||||
// force reflow of the whole subtree.
|
// percentage heights. And due to our not-so-great computation of mVResize
|
||||||
// XXXbz due to XUL caching heights as well, height changes _do_
|
// in nsHTMLReflowState, they do need to force reflow of the whole subtree.
|
||||||
// need to clear ancestor intrinsics!
|
// XXXbz due to XUL caching heights as well, height changes also need to
|
||||||
return NS_CombineHint(hint,
|
// clear ancestor intrinsics!
|
||||||
NS_SubtractHint(nsChangeHint_ReflowFrame,
|
return NS_CombineHint(hint, nsChangeHint_ReflowFrame);
|
||||||
nsChangeHint_ClearDescendantIntrinsics));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((mWidth == aOther.mWidth) &&
|
if ((mWidth == aOther.mWidth) &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче