From 3f369421584c59eb6f26e3722d146f642519ee0d Mon Sep 17 00:00:00 2001 From: "kipp%netscape.com" Date: Sat, 20 Mar 1999 21:56:11 +0000 Subject: [PATCH] Added crazy macros --- layout/generic/nsHTMLContainerFrame.h | 9 +++++++++ layout/html/base/src/nsHTMLContainerFrame.h | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/layout/generic/nsHTMLContainerFrame.h b/layout/generic/nsHTMLContainerFrame.h index aabd398bb12..82c4ef87186 100644 --- a/layout/generic/nsHTMLContainerFrame.h +++ b/layout/generic/nsHTMLContainerFrame.h @@ -25,6 +25,15 @@ class nsPlaceholderFrame; struct nsStyleDisplay; struct nsStylePosition; +// Some macros for container classes to do sanity checking on +// width/height/x/y values computed during reflow. +#ifdef DEBUG +#define CRAZY_W 500000 +#define CRAZY_H 500000 +#define CRAZY_WIDTH(_x) (((_x) < -CRAZY_W) || ((_x) > CRAZY_W)) +#define CRAZY_HEIGHT(_y) (((_y) < -CRAZY_H) || ((_y) > CRAZY_H)) +#endif + // Base class for html container frames that provides common // functionality. class nsHTMLContainerFrame : public nsContainerFrame { diff --git a/layout/html/base/src/nsHTMLContainerFrame.h b/layout/html/base/src/nsHTMLContainerFrame.h index aabd398bb12..82c4ef87186 100644 --- a/layout/html/base/src/nsHTMLContainerFrame.h +++ b/layout/html/base/src/nsHTMLContainerFrame.h @@ -25,6 +25,15 @@ class nsPlaceholderFrame; struct nsStyleDisplay; struct nsStylePosition; +// Some macros for container classes to do sanity checking on +// width/height/x/y values computed during reflow. +#ifdef DEBUG +#define CRAZY_W 500000 +#define CRAZY_H 500000 +#define CRAZY_WIDTH(_x) (((_x) < -CRAZY_W) || ((_x) > CRAZY_W)) +#define CRAZY_HEIGHT(_y) (((_y) < -CRAZY_H) || ((_y) > CRAZY_H)) +#endif + // Base class for html container frames that provides common // functionality. class nsHTMLContainerFrame : public nsContainerFrame {