зеркало из https://github.com/mozilla/gecko-dev.git
Make BR-related parts of the quirky inline box model also quirky in almost-standards mode, to match the rest of the inline box model quirks. b=161691 sr=bzbarsky r=caillon
This commit is contained in:
Родитель
839c83ca5d
Коммит
6a85bf516a
|
@ -141,7 +141,10 @@ BRFrame::Reflow(nsIPresContext* aPresContext,
|
|||
// behave like a BR.
|
||||
nsLineLayout* ll = aReflowState.mLineLayout;
|
||||
if (ll) {
|
||||
if ( ll->CanPlaceFloaterNow() || ll->InStrictMode() ) {
|
||||
// Note that the compatibility mode check excludes AlmostStandards
|
||||
// mode, since this is the inline box model. See bug 161691.
|
||||
if ( ll->CanPlaceFloaterNow() ||
|
||||
ll->GetCompatMode() == eCompatibility_FullStandards ) {
|
||||
// If we can place a floater on the line now it means that the
|
||||
// line is effectively empty (there may be zero sized compressed
|
||||
// white-space frames on the line, but they are to be ignored).
|
||||
|
|
|
@ -2461,7 +2461,9 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
|||
yTop = pfd->mBounds.y - pfd->mMargin.top;
|
||||
yBottom = yTop + logicalHeight;
|
||||
}
|
||||
if (!preMode && !InStrictMode() && !logicalHeight ) {
|
||||
if (!preMode &&
|
||||
GetCompatMode() != eCompatibility_FullStandards &&
|
||||
!logicalHeight) {
|
||||
// Check if it's a BR frame that is not alone on its line (it
|
||||
// is given a height of zero to indicate this), and if so reset
|
||||
// yTop and yBottom so that BR frames don't influence the line.
|
||||
|
|
|
@ -215,11 +215,16 @@ public:
|
|||
SetFlag(LL_LINEENDSINBR, aOn);
|
||||
}
|
||||
|
||||
PRBool InStrictMode()
|
||||
PRBool InStrictMode() const
|
||||
{
|
||||
return mCompatMode != eCompatibility_NavQuirks;
|
||||
}
|
||||
|
||||
nsCompatibility GetCompatMode() const
|
||||
{
|
||||
return mCompatMode;
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// Inform the line-layout about the presence of a floating frame
|
||||
// XXX get rid of this: use get-frame-type?
|
||||
|
|
|
@ -141,7 +141,10 @@ BRFrame::Reflow(nsIPresContext* aPresContext,
|
|||
// behave like a BR.
|
||||
nsLineLayout* ll = aReflowState.mLineLayout;
|
||||
if (ll) {
|
||||
if ( ll->CanPlaceFloaterNow() || ll->InStrictMode() ) {
|
||||
// Note that the compatibility mode check excludes AlmostStandards
|
||||
// mode, since this is the inline box model. See bug 161691.
|
||||
if ( ll->CanPlaceFloaterNow() ||
|
||||
ll->GetCompatMode() == eCompatibility_FullStandards ) {
|
||||
// If we can place a floater on the line now it means that the
|
||||
// line is effectively empty (there may be zero sized compressed
|
||||
// white-space frames on the line, but they are to be ignored).
|
||||
|
|
|
@ -2461,7 +2461,9 @@ nsLineLayout::VerticalAlignFrames(PerSpanData* psd)
|
|||
yTop = pfd->mBounds.y - pfd->mMargin.top;
|
||||
yBottom = yTop + logicalHeight;
|
||||
}
|
||||
if (!preMode && !InStrictMode() && !logicalHeight ) {
|
||||
if (!preMode &&
|
||||
GetCompatMode() != eCompatibility_FullStandards &&
|
||||
!logicalHeight) {
|
||||
// Check if it's a BR frame that is not alone on its line (it
|
||||
// is given a height of zero to indicate this), and if so reset
|
||||
// yTop and yBottom so that BR frames don't influence the line.
|
||||
|
|
|
@ -215,11 +215,16 @@ public:
|
|||
SetFlag(LL_LINEENDSINBR, aOn);
|
||||
}
|
||||
|
||||
PRBool InStrictMode()
|
||||
PRBool InStrictMode() const
|
||||
{
|
||||
return mCompatMode != eCompatibility_NavQuirks;
|
||||
}
|
||||
|
||||
nsCompatibility GetCompatMode() const
|
||||
{
|
||||
return mCompatMode;
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// Inform the line-layout about the presence of a floating frame
|
||||
// XXX get rid of this: use get-frame-type?
|
||||
|
|
Загрузка…
Ссылка в новой задаче