mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 841192. Part 13: Rename nsFrame::ApplyOverflowClipping to ShouldApplyOverflowClipping. r=mattwoodrow
We rename nsFrame::ApplyOverflowClipping to nsFrame::ShouldApplyOverflowClipping to reflect the fact that it doesn't cause any clipping. --HG-- extra : rebase_source : d3bd1ef902276526b37b27c510a8d3a9db6416dc
This commit is contained in:
parent
8efacba3aa
commit
b9592746c4
@ -1670,9 +1670,9 @@ RoundedBorderIntersectsRect(nsIFrame* aFrame,
|
||||
|
||||
nscoord radii[8];
|
||||
return !aFrame->GetBorderRadii(radii) ||
|
||||
RoundedRectIntersectsRect(nsRect(aFrameToReferenceFrame,
|
||||
aFrame->GetSize()),
|
||||
radii, aTestRect);
|
||||
nsLayoutUtils::RoundedRectIntersectsRect(nsRect(aFrameToReferenceFrame,
|
||||
aFrame->GetSize()),
|
||||
radii, aTestRect);
|
||||
}
|
||||
|
||||
// Returns TRUE if aContainedRect is guaranteed to be contained in
|
||||
|
@ -979,7 +979,7 @@ nsBlockFrame::Reflow(nsPresContext* aPresContext,
|
||||
// make sure our kids fit too.
|
||||
if (aReflowState.availableHeight != NS_UNCONSTRAINEDSIZE &&
|
||||
aReflowState.ComputedHeight() != NS_AUTOHEIGHT &&
|
||||
ApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
|
||||
ShouldApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
|
||||
nsMargin heightExtras = aReflowState.mComputedBorderPadding;
|
||||
if (GetSkipSides() & NS_SIDE_TOP) {
|
||||
heightExtras.top = 0;
|
||||
@ -1502,7 +1502,7 @@ nsBlockFrame::ComputeOverflowAreas(const nsRect& aBounds,
|
||||
// XXX_perf: This can be done incrementally. It is currently one of
|
||||
// the things that makes incremental reflow O(N^2).
|
||||
nsOverflowAreas areas(aBounds, aBounds);
|
||||
if (!ApplyOverflowClipping(this, aDisplay)) {
|
||||
if (!ShouldApplyOverflowClipping(this, aDisplay)) {
|
||||
for (line_iterator line = begin_lines(), line_end = end_lines();
|
||||
line != line_end;
|
||||
++line) {
|
||||
|
@ -1606,7 +1606,7 @@ static bool ApplyOverflowClipping(nsDisplayListBuilder* aBuilder,
|
||||
// We allow -moz-hidden-unscrollable to apply to any kind of frame. This
|
||||
// is required by comboboxes which make their display text (an inline frame)
|
||||
// have clipping.
|
||||
if (!nsFrame::ApplyOverflowClipping(aFrame, aDisp)) {
|
||||
if (!nsFrame::ShouldApplyOverflowClipping(aFrame, aDisp)) {
|
||||
return false;
|
||||
}
|
||||
*aRect = aFrame->GetPaddingRect() - aFrame->GetPosition();
|
||||
@ -6932,7 +6932,7 @@ nsIFrame::FinishAndStoreOverflow(nsOverflowAreas& aOverflowAreas,
|
||||
NS_ASSERTION((disp->mOverflowY == NS_STYLE_OVERFLOW_CLIP) ==
|
||||
(disp->mOverflowX == NS_STYLE_OVERFLOW_CLIP),
|
||||
"If one overflow is clip, the other should be too");
|
||||
if (nsFrame::ApplyOverflowClipping(this, disp)) {
|
||||
if (nsFrame::ShouldApplyOverflowClipping(this, disp)) {
|
||||
// The contents are actually clipped to the padding area
|
||||
aOverflowAreas.SetAllTo(bounds);
|
||||
}
|
||||
|
@ -591,8 +591,8 @@ public:
|
||||
/**
|
||||
* Returns true if aFrame should apply overflow clipping.
|
||||
*/
|
||||
static bool ApplyOverflowClipping(const nsIFrame* aFrame,
|
||||
const nsStyleDisplay* aDisp)
|
||||
static bool ShouldApplyOverflowClipping(const nsIFrame* aFrame,
|
||||
const nsStyleDisplay* aDisp)
|
||||
{
|
||||
// clip overflow:-moz-hidden-unscrollable ...
|
||||
if (MOZ_UNLIKELY(aDisp->mOverflowX == NS_STYLE_OVERFLOW_CLIP)) {
|
||||
|
@ -1786,7 +1786,7 @@ NS_METHOD nsTableFrame::Reflow(nsPresContext* aPresContext,
|
||||
// make sure the table overflow area does include the table rect.
|
||||
nsRect tableRect(0, 0, aDesiredSize.width, aDesiredSize.height) ;
|
||||
|
||||
if (!ApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
|
||||
if (!ShouldApplyOverflowClipping(this, aReflowState.mStyleDisplay)) {
|
||||
// collapsed border may leak out
|
||||
nsMargin bcMargin = GetExcludedOuterBCBorder();
|
||||
tableRect.Inflate(bcMargin);
|
||||
@ -1810,7 +1810,7 @@ nsTableFrame::UpdateOverflow()
|
||||
|
||||
// As above in Reflow, make sure the table overflow area includes the table
|
||||
// rect, and check for collapsed borders leaking out.
|
||||
if (!ApplyOverflowClipping(this, StyleDisplay())) {
|
||||
if (!ShouldApplyOverflowClipping(this, StyleDisplay())) {
|
||||
nsMargin bcMargin = GetExcludedOuterBCBorder();
|
||||
bounds.Inflate(bcMargin);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user