From 8e06d1108f2e8676ae21ceba7697e7adce986c85 Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Thu, 24 Sep 1998 17:47:25 +0000 Subject: [PATCH] Fixed block's max-element-size computation for child inline frames git-svn-id: svn://10.0.0.236/trunk@10926 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 11 ++++++----- mozilla/layout/generic/nsBlockReflowState.cpp | 11 ++++++----- mozilla/layout/generic/nsBlockReflowState.h | 11 ++++++----- mozilla/layout/html/base/src/nsBlockFrame.cpp | 11 ++++++----- mozilla/layout/html/base/src/nsBlockReflowState.cpp | 11 ++++++----- mozilla/layout/html/base/src/nsBlockReflowState.h | 11 ++++++----- 6 files changed, 36 insertions(+), 30 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 203bc5d3db4..7ca430d33f2 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -3179,14 +3179,15 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, } } + // Update max-element-size // Update max-element-size if (aState.mComputeMaxElementSize) { - nsSize& lineMaxElementSize = aState.mMaxElementSize; - if (lineMaxElementSize.width > aState.mMaxElementSize.width) { - aState.mMaxElementSize.width = lineMaxElementSize.width; + const nsSize& kidMaxElementSize = ir.GetMaxElementSize(); + if (kidMaxElementSize.width > aState.mMaxElementSize.width) { + aState.mMaxElementSize.width = kidMaxElementSize.width; } - if (lineMaxElementSize.height > aState.mMaxElementSize.height) { - aState.mMaxElementSize.height = lineMaxElementSize.height; + if (kidMaxElementSize.height > aState.mMaxElementSize.height) { + aState.mMaxElementSize.height = kidMaxElementSize.height; } } diff --git a/mozilla/layout/generic/nsBlockReflowState.cpp b/mozilla/layout/generic/nsBlockReflowState.cpp index 203bc5d3db4..7ca430d33f2 100644 --- a/mozilla/layout/generic/nsBlockReflowState.cpp +++ b/mozilla/layout/generic/nsBlockReflowState.cpp @@ -3179,14 +3179,15 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, } } + // Update max-element-size // Update max-element-size if (aState.mComputeMaxElementSize) { - nsSize& lineMaxElementSize = aState.mMaxElementSize; - if (lineMaxElementSize.width > aState.mMaxElementSize.width) { - aState.mMaxElementSize.width = lineMaxElementSize.width; + const nsSize& kidMaxElementSize = ir.GetMaxElementSize(); + if (kidMaxElementSize.width > aState.mMaxElementSize.width) { + aState.mMaxElementSize.width = kidMaxElementSize.width; } - if (lineMaxElementSize.height > aState.mMaxElementSize.height) { - aState.mMaxElementSize.height = lineMaxElementSize.height; + if (kidMaxElementSize.height > aState.mMaxElementSize.height) { + aState.mMaxElementSize.height = kidMaxElementSize.height; } } diff --git a/mozilla/layout/generic/nsBlockReflowState.h b/mozilla/layout/generic/nsBlockReflowState.h index 203bc5d3db4..7ca430d33f2 100644 --- a/mozilla/layout/generic/nsBlockReflowState.h +++ b/mozilla/layout/generic/nsBlockReflowState.h @@ -3179,14 +3179,15 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, } } + // Update max-element-size // Update max-element-size if (aState.mComputeMaxElementSize) { - nsSize& lineMaxElementSize = aState.mMaxElementSize; - if (lineMaxElementSize.width > aState.mMaxElementSize.width) { - aState.mMaxElementSize.width = lineMaxElementSize.width; + const nsSize& kidMaxElementSize = ir.GetMaxElementSize(); + if (kidMaxElementSize.width > aState.mMaxElementSize.width) { + aState.mMaxElementSize.width = kidMaxElementSize.width; } - if (lineMaxElementSize.height > aState.mMaxElementSize.height) { - aState.mMaxElementSize.height = lineMaxElementSize.height; + if (kidMaxElementSize.height > aState.mMaxElementSize.height) { + aState.mMaxElementSize.height = kidMaxElementSize.height; } } diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 203bc5d3db4..7ca430d33f2 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -3179,14 +3179,15 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, } } + // Update max-element-size // Update max-element-size if (aState.mComputeMaxElementSize) { - nsSize& lineMaxElementSize = aState.mMaxElementSize; - if (lineMaxElementSize.width > aState.mMaxElementSize.width) { - aState.mMaxElementSize.width = lineMaxElementSize.width; + const nsSize& kidMaxElementSize = ir.GetMaxElementSize(); + if (kidMaxElementSize.width > aState.mMaxElementSize.width) { + aState.mMaxElementSize.width = kidMaxElementSize.width; } - if (lineMaxElementSize.height > aState.mMaxElementSize.height) { - aState.mMaxElementSize.height = lineMaxElementSize.height; + if (kidMaxElementSize.height > aState.mMaxElementSize.height) { + aState.mMaxElementSize.height = kidMaxElementSize.height; } } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.cpp b/mozilla/layout/html/base/src/nsBlockReflowState.cpp index 203bc5d3db4..7ca430d33f2 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowState.cpp @@ -3179,14 +3179,15 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, } } + // Update max-element-size // Update max-element-size if (aState.mComputeMaxElementSize) { - nsSize& lineMaxElementSize = aState.mMaxElementSize; - if (lineMaxElementSize.width > aState.mMaxElementSize.width) { - aState.mMaxElementSize.width = lineMaxElementSize.width; + const nsSize& kidMaxElementSize = ir.GetMaxElementSize(); + if (kidMaxElementSize.width > aState.mMaxElementSize.width) { + aState.mMaxElementSize.width = kidMaxElementSize.width; } - if (lineMaxElementSize.height > aState.mMaxElementSize.height) { - aState.mMaxElementSize.height = lineMaxElementSize.height; + if (kidMaxElementSize.height > aState.mMaxElementSize.height) { + aState.mMaxElementSize.height = kidMaxElementSize.height; } } diff --git a/mozilla/layout/html/base/src/nsBlockReflowState.h b/mozilla/layout/html/base/src/nsBlockReflowState.h index 203bc5d3db4..7ca430d33f2 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowState.h +++ b/mozilla/layout/html/base/src/nsBlockReflowState.h @@ -3179,14 +3179,15 @@ nsBlockFrame::PlaceLine(nsBlockReflowState& aState, } } + // Update max-element-size // Update max-element-size if (aState.mComputeMaxElementSize) { - nsSize& lineMaxElementSize = aState.mMaxElementSize; - if (lineMaxElementSize.width > aState.mMaxElementSize.width) { - aState.mMaxElementSize.width = lineMaxElementSize.width; + const nsSize& kidMaxElementSize = ir.GetMaxElementSize(); + if (kidMaxElementSize.width > aState.mMaxElementSize.width) { + aState.mMaxElementSize.width = kidMaxElementSize.width; } - if (lineMaxElementSize.height > aState.mMaxElementSize.height) { - aState.mMaxElementSize.height = lineMaxElementSize.height; + if (kidMaxElementSize.height > aState.mMaxElementSize.height) { + aState.mMaxElementSize.height = kidMaxElementSize.height; } }