mirror of
https://github.com/classilla/tenfourfox.git
synced 2025-02-20 20:29:15 +00:00
prerequisite for #375: M1347759
This commit is contained in:
parent
b1831fc750
commit
8e58b5c8fb
@ -262,22 +262,6 @@ nsAbsoluteContainingBlock::FrameDependsOnContainer(nsIFrame* f,
|
|||||||
!IsFixedMarginSize(margin->mMargin.GetIEnd(wm))) {
|
!IsFixedMarginSize(margin->mMargin.GetIEnd(wm))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!wm.IsBidiLTR()) {
|
|
||||||
// Note that even if 'istart' is a length, our position can
|
|
||||||
// still depend on the containing block isze, because if
|
|
||||||
// 'iend' is also a length we will discard 'istart' and be
|
|
||||||
// positioned relative to the containing block iend edge.
|
|
||||||
// 'istart' length and 'iend' auto is the only combination
|
|
||||||
// we can be sure of.
|
|
||||||
if (!IsFixedOffset(pos->mOffset.GetIStart(wm)) ||
|
|
||||||
pos->mOffset.GetIEndUnit(wm) != eStyleUnit_Auto) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (!IsFixedOffset(pos->mOffset.GetIStart(wm))) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (wm.IsVertical() ? aCBWidthChanged : aCBHeightChanged) {
|
if (wm.IsVertical() ? aCBWidthChanged : aCBHeightChanged) {
|
||||||
// See if f's block-size might have changed.
|
// See if f's block-size might have changed.
|
||||||
@ -302,10 +286,42 @@ nsAbsoluteContainingBlock::FrameDependsOnContainer(nsIFrame* f,
|
|||||||
!IsFixedMarginSize(margin->mMargin.GetBEnd(wm))) {
|
!IsFixedMarginSize(margin->mMargin.GetBEnd(wm))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!IsFixedOffset(pos->mOffset.GetBStart(wm))) {
|
}
|
||||||
|
|
||||||
|
// Since we store coordinates relative to top and left, the position
|
||||||
|
// of a frame depends on that of its container if it is fixed relative
|
||||||
|
// to the right or bottom, or if it is positioned using percentages
|
||||||
|
// relative to the left or top. Because of the dependency on the
|
||||||
|
// sides (left and top) that we use to store coordinates, these tests
|
||||||
|
// are easier to do using physical coordinates rather than logical.
|
||||||
|
if (aCBWidthChanged) {
|
||||||
|
if (!IsFixedOffset(pos->mOffset.GetLeft())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// Note that even if 'left' is a length, our position can still
|
||||||
|
// depend on the containing block width, because if our direction or
|
||||||
|
// writing-mode moves from right to left (in either block or inline
|
||||||
|
// progression) and 'right' is not 'auto', we will discard 'left'
|
||||||
|
// and be positioned relative to the containing block right edge.
|
||||||
|
// 'left' length and 'right' auto is the only combination we can be
|
||||||
|
// sure of.
|
||||||
|
if ((wm.GetInlineDir() == WritingMode::eInlineRTL ||
|
||||||
|
wm.GetBlockDir() == WritingMode::eBlockRL) &&
|
||||||
|
pos->mOffset.GetRightUnit() != eStyleUnit_Auto) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (aCBHeightChanged) {
|
||||||
|
if (!IsFixedOffset(pos->mOffset.GetTop())) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
// See comment above for width changes.
|
||||||
|
if (wm.GetInlineDir() == WritingMode::eInlineBTT &&
|
||||||
|
pos->mOffset.GetBottomUnit() != eStyleUnit_Auto) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user