зеркало из https://github.com/mozilla/pjs.git
Set vertical resize flags on the root's reflow state when we're doing SizeToContent reflows. (Bug 562955) r=bzbarsky a2.0=blocking2.0:betaN
This commit is contained in:
Родитель
da27e07995
Коммит
a0c018edfe
|
@ -1153,6 +1153,8 @@ protected:
|
|||
|
||||
PRPackedBool mViewportOverridden;
|
||||
|
||||
PRPackedBool mLastRootReflowHadUnconstrainedHeight;
|
||||
|
||||
// This is used to protect ourselves from triggering reflow while in the
|
||||
// middle of frame construction and the like... it really shouldn't be
|
||||
// needed, one hopes, but it is for now.
|
||||
|
@ -7716,6 +7718,23 @@ PresShell::DoReflow(nsIFrame* target, PRBool aInterruptible)
|
|||
nsSize reflowSize(size.width, NS_UNCONSTRAINEDSIZE);
|
||||
nsHTMLReflowState reflowState(mPresContext, target, rcx, reflowSize);
|
||||
|
||||
if (rootFrame == target) {
|
||||
// When the root frame is being reflowed with unconstrained height
|
||||
// (which happens when we're called from
|
||||
// DocumentViewerImpl::SizeToContent), we're effectively doing a
|
||||
// vertical resize, since it changes the meaning of percentage
|
||||
// heights even if no heights actually changed. The same applies
|
||||
// when we reflow again after that computation. This is an unusual
|
||||
// case, and isn't caught by nsHTMLReflowState::InitResizeFlags.
|
||||
PRBool hasUnconstrainedHeight = size.height == NS_UNCONSTRAINEDSIZE;
|
||||
|
||||
if (hasUnconstrainedHeight || mLastRootReflowHadUnconstrainedHeight) {
|
||||
reflowState.mFlags.mVResize = PR_TRUE;
|
||||
}
|
||||
|
||||
mLastRootReflowHadUnconstrainedHeight = hasUnconstrainedHeight;
|
||||
}
|
||||
|
||||
// fix the computed height
|
||||
NS_ASSERTION(reflowState.mComputedMargin == nsMargin(0, 0, 0, 0),
|
||||
"reflow state should not set margin for reflow roots");
|
||||
|
|
|
@ -81,6 +81,7 @@ _TEST_FILES = \
|
|||
test_bug445810.html \
|
||||
test_bug449781.html \
|
||||
test_bug450930.xhtml \
|
||||
test_bug458898.html \
|
||||
test_bug465448.xul \
|
||||
test_bug469170.html \
|
||||
test_bug471126.html \
|
||||
|
@ -114,10 +115,8 @@ _TEST_FILES = \
|
|||
$(NULL)
|
||||
|
||||
# Tests for bugs 441782, 467672 and 570378 don't pass reliably on Windows, because of bug 469208
|
||||
# Test for bug 458898 doesn't pass on Windows 7. See bug 562955.
|
||||
ifeq (,$(filter windows,$(MOZ_WIDGET_TOOLKIT)))
|
||||
_TEST_FILES += \
|
||||
test_bug458898.html \
|
||||
bidi_numeral_test.js \
|
||||
test_bug332655-1.html \
|
||||
test_bug332655-2.html \
|
||||
|
|
Загрузка…
Ссылка в новой задаче