From e727c63ed515980e723b1e278a93cdcd55a35bae Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Wed, 22 Jul 1998 02:46:00 +0000 Subject: [PATCH] Changed nsCSSRendering::PaintBorder() so the entire rect is used and not just the width and height git-svn-id: svn://10.0.0.236/trunk@6136 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsCSSRendering.cpp | 2 +- mozilla/layout/base/nsCSSRendering.h | 3 +++ .../layout/css/layout/src/nsCSSBlockFrame.cpp | 3 ++- .../layout/generic/nsHTMLContainerFrame.cpp | 3 ++- mozilla/layout/generic/nsLeafFrame.cpp | 3 ++- .../html/base/src/nsHTMLContainerFrame.cpp | 3 ++- mozilla/layout/html/base/src/nsLeafFrame.cpp | 3 ++- mozilla/layout/html/document/src/ua.css | 22 ++++++++++++++----- .../layout/html/style/src/nsCSSRendering.cpp | 2 +- .../layout/html/style/src/nsCSSRendering.h | 3 +++ .../html/table/src/nsTableCellFrame.cpp | 3 ++- .../layout/html/table/src/nsTableFrame.cpp | 3 ++- mozilla/layout/style/ua.css | 22 ++++++++++++++----- mozilla/layout/tables/nsTableCellFrame.cpp | 3 ++- mozilla/layout/tables/nsTableFrame.cpp | 3 ++- 15 files changed, 58 insertions(+), 23 deletions(-) diff --git a/mozilla/layout/base/nsCSSRendering.cpp b/mozilla/layout/base/nsCSSRendering.cpp index 152f5bad86f..8e58d7cf841 100644 --- a/mozilla/layout/base/nsCSSRendering.cpp +++ b/mozilla/layout/base/nsCSSRendering.cpp @@ -792,7 +792,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext, } - nsRect inside(0, 0, aBounds.width, aBounds.height); + nsRect inside(aBounds); nsRect outside(inside); outside.Deflate(border); diff --git a/mozilla/layout/base/nsCSSRendering.h b/mozilla/layout/base/nsCSSRendering.h index b3d0f5816b6..811e0214e1a 100644 --- a/mozilla/layout/base/nsCSSRendering.h +++ b/mozilla/layout/base/nsCSSRendering.h @@ -28,6 +28,9 @@ public: * Render the border for an element using css rendering rules * for borders. aSkipSides is a bitmask of the sides to skip * when rendering. If 0 then no sides are skipped. + * + * Both aDirtyRect and aBounds are in the local coordinate space + * of aForFrame */ static void PaintBorder(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp b/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp index 1cee5d85cdf..0f98e0dadf9 100644 --- a/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp +++ b/mozilla/layout/css/layout/src/nsCSSBlockFrame.cpp @@ -3903,7 +3903,8 @@ nsCSSBlockFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *color); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *spacing, skipSides); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *spacing, skipSides); } PaintChildren(aPresContext, aRenderingContext, aDirtyRect); diff --git a/mozilla/layout/generic/nsHTMLContainerFrame.cpp b/mozilla/layout/generic/nsHTMLContainerFrame.cpp index 3b5d6c35e04..115cca322b2 100644 --- a/mozilla/layout/generic/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/generic/nsHTMLContainerFrame.cpp @@ -69,7 +69,8 @@ NS_METHOD nsHTMLContainerFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *color); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *spacing, skipSides); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *spacing, skipSides); } PaintChildren(aPresContext, aRenderingContext, aDirtyRect); diff --git a/mozilla/layout/generic/nsLeafFrame.cpp b/mozilla/layout/generic/nsLeafFrame.cpp index a1bb5d80c4b..fc152bf9c12 100644 --- a/mozilla/layout/generic/nsLeafFrame.cpp +++ b/mozilla/layout/generic/nsLeafFrame.cpp @@ -45,7 +45,8 @@ NS_METHOD nsLeafFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *myColor); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *mySpacing, 0); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *mySpacing, 0); } return NS_OK; } diff --git a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp index 3b5d6c35e04..115cca322b2 100644 --- a/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp +++ b/mozilla/layout/html/base/src/nsHTMLContainerFrame.cpp @@ -69,7 +69,8 @@ NS_METHOD nsHTMLContainerFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *color); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *spacing, skipSides); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *spacing, skipSides); } PaintChildren(aPresContext, aRenderingContext, aDirtyRect); diff --git a/mozilla/layout/html/base/src/nsLeafFrame.cpp b/mozilla/layout/html/base/src/nsLeafFrame.cpp index a1bb5d80c4b..fc152bf9c12 100644 --- a/mozilla/layout/html/base/src/nsLeafFrame.cpp +++ b/mozilla/layout/html/base/src/nsLeafFrame.cpp @@ -45,7 +45,8 @@ NS_METHOD nsLeafFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *myColor); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *mySpacing, 0); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *mySpacing, 0); } return NS_OK; } diff --git a/mozilla/layout/html/document/src/ua.css b/mozilla/layout/html/document/src/ua.css index ed1e9a6c542..d210facdd8b 100644 --- a/mozilla/layout/html/document/src/ua.css +++ b/mozilla/layout/html/document/src/ua.css @@ -108,8 +108,8 @@ TABLE { display: table; border-style: outset; border-color: #C0C0C0; - cell-spacing: 4px; - cell-padding: 4px; + cell-spacing: 2px; + cell-padding: 2px; margin-top: 0; margin-bottom: 0; } @@ -183,22 +183,30 @@ A:out-of-date { A:link IMG { display: inline; border: 2px solid blue; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } A:visited IMG { display: inline; border: 2px solid purple; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } A:active IMG { display: inline; border: 2px solid lime; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } A:out-of-date IMG { display: inline; border: 2px solid red; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } B, STRONG { display: inline; @@ -321,6 +329,8 @@ BR { } IMG { display: inline; + font-family: sans-serif; + font-size: 8.5pt; } SPACER { display: inline; diff --git a/mozilla/layout/html/style/src/nsCSSRendering.cpp b/mozilla/layout/html/style/src/nsCSSRendering.cpp index 152f5bad86f..8e58d7cf841 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.cpp +++ b/mozilla/layout/html/style/src/nsCSSRendering.cpp @@ -792,7 +792,7 @@ void nsCSSRendering::PaintBorder(nsIPresContext& aPresContext, } - nsRect inside(0, 0, aBounds.width, aBounds.height); + nsRect inside(aBounds); nsRect outside(inside); outside.Deflate(border); diff --git a/mozilla/layout/html/style/src/nsCSSRendering.h b/mozilla/layout/html/style/src/nsCSSRendering.h index b3d0f5816b6..811e0214e1a 100644 --- a/mozilla/layout/html/style/src/nsCSSRendering.h +++ b/mozilla/layout/html/style/src/nsCSSRendering.h @@ -28,6 +28,9 @@ public: * Render the border for an element using css rendering rules * for borders. aSkipSides is a bitmask of the sides to skip * when rendering. If 0 then no sides are skipped. + * + * Both aDirtyRect and aBounds are in the local coordinate space + * of aForFrame */ static void PaintBorder(nsIPresContext& aPresContext, nsIRenderingContext& aRenderingContext, diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 54abab38e5b..3468f5aaec5 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -91,7 +91,8 @@ NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext, aDirtyRect, mRect, *myColor); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *mySpacing, 0); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *mySpacing, 0); } // for debug... diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 9d38c7f1c43..f78657ea24b 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -1066,7 +1066,8 @@ NS_METHOD nsTableFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *color); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *spacing, 0); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *spacing, 0); } // for debug... diff --git a/mozilla/layout/style/ua.css b/mozilla/layout/style/ua.css index ed1e9a6c542..d210facdd8b 100644 --- a/mozilla/layout/style/ua.css +++ b/mozilla/layout/style/ua.css @@ -108,8 +108,8 @@ TABLE { display: table; border-style: outset; border-color: #C0C0C0; - cell-spacing: 4px; - cell-padding: 4px; + cell-spacing: 2px; + cell-padding: 2px; margin-top: 0; margin-bottom: 0; } @@ -183,22 +183,30 @@ A:out-of-date { A:link IMG { display: inline; border: 2px solid blue; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } A:visited IMG { display: inline; border: 2px solid purple; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } A:active IMG { display: inline; border: 2px solid lime; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } A:out-of-date IMG { display: inline; border: 2px solid red; - text-decoration: underline; + font-family: sans-serif; + font-size: 8.5pt; + text-decoration: none; } B, STRONG { display: inline; @@ -321,6 +329,8 @@ BR { } IMG { display: inline; + font-family: sans-serif; + font-size: 8.5pt; } SPACER { display: inline; diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 54abab38e5b..3468f5aaec5 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -91,7 +91,8 @@ NS_METHOD nsTableCellFrame::Paint(nsIPresContext& aPresContext, aDirtyRect, mRect, *myColor); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *mySpacing, 0); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *mySpacing, 0); } // for debug... diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 9d38c7f1c43..f78657ea24b 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -1066,7 +1066,8 @@ NS_METHOD nsTableFrame::Paint(nsIPresContext& aPresContext, nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this, aDirtyRect, mRect, *color); nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this, - aDirtyRect, mRect, *spacing, 0); + aDirtyRect, nsRect(0, 0, mRect.width, mRect.height), + *spacing, 0); } // for debug...