зеркало из https://github.com/mozilla/pjs.git
Reduce code size by using PaintSelf member function to paint background, border, and outline. b=184702 r+sr=roc
This commit is contained in:
Родитель
fdc7ba698e
Коммит
818581d1d9
|
@ -49,7 +49,6 @@
|
||||||
#include "nsLineLayout.h"
|
#include "nsLineLayout.h"
|
||||||
#include "nsPlaceholderFrame.h"
|
#include "nsPlaceholderFrame.h"
|
||||||
#include "nsStyleConsts.h"
|
#include "nsStyleConsts.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsIFrameManager.h"
|
#include "nsIFrameManager.h"
|
||||||
#include "nsIPresContext.h"
|
#include "nsIPresContext.h"
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
|
@ -5652,7 +5651,7 @@ nsBlockFrame::Paint(nsIPresContext* aPresContext,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRBool paintingSuppressed = PR_FALSE;
|
PRBool paintingSuppressed = PR_FALSE;
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "nsISizeOfHandler.h"
|
#include "nsISizeOfHandler.h"
|
||||||
#include "nsIFrameManager.h"
|
#include "nsIFrameManager.h"
|
||||||
|
#include "nsCSSRendering.h"
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
#include "nsIAccessibilityService.h"
|
#include "nsIAccessibilityService.h"
|
||||||
#include "nsIAccessible.h"
|
#include "nsIAccessible.h"
|
||||||
|
@ -945,6 +946,44 @@ nsFrame::Paint(nsIPresContext* aPresContext,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nsFrame::PaintSelf(nsIPresContext* aPresContext,
|
||||||
|
nsIRenderingContext& aRenderingContext,
|
||||||
|
const nsRect& aDirtyRect,
|
||||||
|
PRIntn aSkipSides)
|
||||||
|
{
|
||||||
|
// The visibility check belongs here since child elements have the
|
||||||
|
// opportunity to override the visibility property and display even if
|
||||||
|
// their parent is hidden.
|
||||||
|
|
||||||
|
PRBool isVisible;
|
||||||
|
if (mRect.height == 0 || mRect.width == 0 ||
|
||||||
|
NS_FAILED(IsVisibleForPainting(aPresContext, aRenderingContext,
|
||||||
|
PR_TRUE, &isVisible)) ||
|
||||||
|
!isVisible) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paint our background and border
|
||||||
|
const nsStyleBorder* border;
|
||||||
|
::GetStyleData(mStyleContext, &border);
|
||||||
|
const nsStylePadding* padding;
|
||||||
|
::GetStyleData(mStyleContext, &padding);
|
||||||
|
const nsStyleOutline* outline;
|
||||||
|
::GetStyleData(mStyleContext, &outline);
|
||||||
|
|
||||||
|
nsRect rect(0, 0, mRect.width, mRect.height);
|
||||||
|
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, rect, *border, *padding,
|
||||||
|
0, 0);
|
||||||
|
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, rect, *border, mStyleContext,
|
||||||
|
aSkipSides);
|
||||||
|
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, rect, *border, *outline,
|
||||||
|
mStyleContext, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -469,6 +469,16 @@ protected:
|
||||||
nsFrame();
|
nsFrame();
|
||||||
virtual ~nsFrame();
|
virtual ~nsFrame();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To be called by |Paint| of this class or derived classes to paint
|
||||||
|
* the background, border, and outline, when in the correct layer to
|
||||||
|
* do so.
|
||||||
|
*/
|
||||||
|
void PaintSelf(nsIPresContext* aPresContext,
|
||||||
|
nsIRenderingContext& aRenderingContext,
|
||||||
|
const nsRect& aDirtyRect,
|
||||||
|
PRIntn aSkipSides = 0);
|
||||||
|
|
||||||
PRInt16 DisplaySelection(nsIPresContext* aPresContext, PRBool isOkToTurnOn = PR_FALSE);
|
PRInt16 DisplaySelection(nsIPresContext* aPresContext, PRBool isOkToTurnOn = PR_FALSE);
|
||||||
|
|
||||||
//this will modify aPos and return the next frame ect.
|
//this will modify aPos and return the next frame ect.
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "nsIView.h"
|
#include "nsIView.h"
|
||||||
#include "nsIViewManager.h"
|
#include "nsIViewManager.h"
|
||||||
#include "nsHTMLContainerFrame.h"
|
#include "nsHTMLContainerFrame.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsIScrollableView.h"
|
#include "nsIScrollableView.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
#include "nsGfxScrollFrame.h"
|
#include "nsGfxScrollFrame.h"
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
#include "nsIStyleContext.h"
|
#include "nsIStyleContext.h"
|
||||||
#include "nsStyleConsts.h"
|
#include "nsStyleConsts.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsLayoutAtoms.h"
|
#include "nsLayoutAtoms.h"
|
||||||
#include "nsCSSAnonBoxes.h"
|
#include "nsCSSAnonBoxes.h"
|
||||||
|
@ -82,52 +81,13 @@ nsHTMLContainerFrame::Paint(nsIPresContext* aPresContext,
|
||||||
// others in the background (bug 36710). (nsInlineFrame::Paint does
|
// others in the background (bug 36710). (nsInlineFrame::Paint does
|
||||||
// this differently.)
|
// this differently.)
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nsHTMLContainerFrame::PaintSelf(nsIPresContext* aPresContext,
|
|
||||||
nsIRenderingContext& aRenderingContext,
|
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
PRUint32 aFlags)
|
|
||||||
{
|
|
||||||
// The visibility check belongs here since child elements have the
|
|
||||||
// opportunity to override the visibility property and display even if
|
|
||||||
// their parent is hidden.
|
|
||||||
|
|
||||||
PRBool isVisible;
|
|
||||||
if (NS_FAILED(IsVisibleForPainting(aPresContext, aRenderingContext,
|
|
||||||
PR_TRUE, &isVisible)) ||
|
|
||||||
!isVisible ||
|
|
||||||
mRect.width == 0 || mRect.height == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paint our background and border
|
|
||||||
PRIntn skipSides = GetSkipSides();
|
|
||||||
const nsStyleBorder* border;
|
|
||||||
::GetStyleData(mStyleContext, &border);
|
|
||||||
const nsStylePadding* padding;
|
|
||||||
::GetStyleData(mStyleContext, &padding);
|
|
||||||
const nsStyleOutline* outline;
|
|
||||||
::GetStyleData(mStyleContext, &outline);
|
|
||||||
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *padding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, mStyleContext,
|
|
||||||
skipSides);
|
|
||||||
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *outline,
|
|
||||||
mStyleContext, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLContainerFrame::PaintDecorationsAndChildren(
|
nsHTMLContainerFrame::PaintDecorationsAndChildren(
|
||||||
nsIPresContext* aPresContext,
|
nsIPresContext* aPresContext,
|
||||||
|
|
|
@ -123,15 +123,12 @@ public:
|
||||||
protected:
|
protected:
|
||||||
virtual PRIntn GetSkipSides() const = 0;
|
virtual PRIntn GetSkipSides() const = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* To be called by |Paint| of this class or derived classes to paint
|
|
||||||
* the background, border, and outline, when in the correct layer to
|
|
||||||
* do so.
|
|
||||||
*/
|
|
||||||
void PaintSelf(nsIPresContext* aPresContext,
|
void PaintSelf(nsIPresContext* aPresContext,
|
||||||
nsIRenderingContext& aRenderingContext,
|
nsIRenderingContext& aRenderingContext,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect) {
|
||||||
PRUint32 aFlags);
|
nsContainerFrame::PaintSelf(aPresContext, aRenderingContext,
|
||||||
|
aDirtyRect, GetSkipSides());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To be called *instead* of |PaintChildren| by frames that paint text
|
* To be called *instead* of |PaintChildren| by frames that paint text
|
||||||
|
|
|
@ -399,7 +399,7 @@ CanvasFrame::Paint(nsIPresContext* aPresContext,
|
||||||
shell->IsPaintingSuppressed(&paintingSuppressed);
|
shell->IsPaintingSuppressed(&paintingSuppressed);
|
||||||
if (paintingSuppressed) {
|
if (paintingSuppressed) {
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1302,21 +1302,7 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
|
||||||
? NS_FRAME_PAINT_LAYER_BACKGROUND
|
? NS_FRAME_PAINT_LAYER_BACKGROUND
|
||||||
: NS_FRAME_PAINT_LAYER_FOREGROUND;
|
: NS_FRAME_PAINT_LAYER_FOREGROUND;
|
||||||
if (aWhichLayer == backgroundLayer) {
|
if (aWhichLayer == backgroundLayer) {
|
||||||
const nsStyleVisibility* vis =
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
(const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
|
||||||
if (vis->IsVisibleOrCollapsed()) {
|
|
||||||
const nsStyleBorder* myBorder = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* myPadding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder, *myPadding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder,
|
|
||||||
mStyleContext, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<imgIContainer> imgCon;
|
nsCOMPtr<imgIContainer> imgCon;
|
||||||
|
|
|
@ -337,7 +337,7 @@ nsInlineFrame::Paint(nsIPresContext* aPresContext,
|
||||||
|
|
||||||
// Paint inline element backgrounds in the foreground layer (bug 36710).
|
// Paint inline element backgrounds in the foreground layer (bug 36710).
|
||||||
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) {
|
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The sole purpose of this is to trigger display of the selection
|
// The sole purpose of this is to trigger display of the selection
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsLeafFrame.h"
|
#include "nsLeafFrame.h"
|
||||||
#include "nsHTMLContainerFrame.h"
|
#include "nsHTMLContainerFrame.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsHTMLParts.h"
|
#include "nsHTMLParts.h"
|
||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
#include "nsIPresContext.h"
|
#include "nsIPresContext.h"
|
||||||
#include "nsIStyleContext.h"
|
|
||||||
|
|
||||||
nsLeafFrame::~nsLeafFrame()
|
nsLeafFrame::~nsLeafFrame()
|
||||||
{
|
{
|
||||||
|
@ -56,33 +54,7 @@ nsLeafFrame::Paint(nsIPresContext* aPresContext,
|
||||||
PRUint32 aFlags)
|
PRUint32 aFlags)
|
||||||
{
|
{
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PRBool isVisible;
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_FALSE, &isVisible)) &&
|
|
||||||
!isVisible) {// just checks selection painting
|
|
||||||
return NS_OK; // not visibility
|
|
||||||
}
|
|
||||||
|
|
||||||
const nsStyleVisibility* vis =
|
|
||||||
(const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
|
||||||
|
|
||||||
if (vis->IsVisibleOrCollapsed()) {
|
|
||||||
const nsStyleBorder* myBorder = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* myPadding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
const nsStyleOutline* myOutline = (const nsStyleOutline*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Outline);
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder, *myPadding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder,
|
|
||||||
mStyleContext, 0);
|
|
||||||
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder,
|
|
||||||
*myOutline, mStyleContext, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame", &aRenderingContext);
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame", &aRenderingContext);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
@ -49,7 +49,6 @@
|
||||||
#include "nsLineLayout.h"
|
#include "nsLineLayout.h"
|
||||||
#include "nsPlaceholderFrame.h"
|
#include "nsPlaceholderFrame.h"
|
||||||
#include "nsStyleConsts.h"
|
#include "nsStyleConsts.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsIFrameManager.h"
|
#include "nsIFrameManager.h"
|
||||||
#include "nsIPresContext.h"
|
#include "nsIPresContext.h"
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
|
@ -5652,7 +5651,7 @@ nsBlockFrame::Paint(nsIPresContext* aPresContext,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRBool paintingSuppressed = PR_FALSE;
|
PRBool paintingSuppressed = PR_FALSE;
|
||||||
|
|
|
@ -58,6 +58,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include "nsISizeOfHandler.h"
|
#include "nsISizeOfHandler.h"
|
||||||
#include "nsIFrameManager.h"
|
#include "nsIFrameManager.h"
|
||||||
|
#include "nsCSSRendering.h"
|
||||||
#ifdef ACCESSIBILITY
|
#ifdef ACCESSIBILITY
|
||||||
#include "nsIAccessibilityService.h"
|
#include "nsIAccessibilityService.h"
|
||||||
#include "nsIAccessible.h"
|
#include "nsIAccessible.h"
|
||||||
|
@ -945,6 +946,44 @@ nsFrame::Paint(nsIPresContext* aPresContext,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
nsFrame::PaintSelf(nsIPresContext* aPresContext,
|
||||||
|
nsIRenderingContext& aRenderingContext,
|
||||||
|
const nsRect& aDirtyRect,
|
||||||
|
PRIntn aSkipSides)
|
||||||
|
{
|
||||||
|
// The visibility check belongs here since child elements have the
|
||||||
|
// opportunity to override the visibility property and display even if
|
||||||
|
// their parent is hidden.
|
||||||
|
|
||||||
|
PRBool isVisible;
|
||||||
|
if (mRect.height == 0 || mRect.width == 0 ||
|
||||||
|
NS_FAILED(IsVisibleForPainting(aPresContext, aRenderingContext,
|
||||||
|
PR_TRUE, &isVisible)) ||
|
||||||
|
!isVisible) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Paint our background and border
|
||||||
|
const nsStyleBorder* border;
|
||||||
|
::GetStyleData(mStyleContext, &border);
|
||||||
|
const nsStylePadding* padding;
|
||||||
|
::GetStyleData(mStyleContext, &padding);
|
||||||
|
const nsStyleOutline* outline;
|
||||||
|
::GetStyleData(mStyleContext, &outline);
|
||||||
|
|
||||||
|
nsRect rect(0, 0, mRect.width, mRect.height);
|
||||||
|
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, rect, *border, *padding,
|
||||||
|
0, 0);
|
||||||
|
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, rect, *border, mStyleContext,
|
||||||
|
aSkipSides);
|
||||||
|
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
||||||
|
aDirtyRect, rect, *border, *outline,
|
||||||
|
mStyleContext, 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -469,6 +469,16 @@ protected:
|
||||||
nsFrame();
|
nsFrame();
|
||||||
virtual ~nsFrame();
|
virtual ~nsFrame();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* To be called by |Paint| of this class or derived classes to paint
|
||||||
|
* the background, border, and outline, when in the correct layer to
|
||||||
|
* do so.
|
||||||
|
*/
|
||||||
|
void PaintSelf(nsIPresContext* aPresContext,
|
||||||
|
nsIRenderingContext& aRenderingContext,
|
||||||
|
const nsRect& aDirtyRect,
|
||||||
|
PRIntn aSkipSides = 0);
|
||||||
|
|
||||||
PRInt16 DisplaySelection(nsIPresContext* aPresContext, PRBool isOkToTurnOn = PR_FALSE);
|
PRInt16 DisplaySelection(nsIPresContext* aPresContext, PRBool isOkToTurnOn = PR_FALSE);
|
||||||
|
|
||||||
//this will modify aPos and return the next frame ect.
|
//this will modify aPos and return the next frame ect.
|
||||||
|
|
|
@ -45,7 +45,6 @@
|
||||||
#include "nsIView.h"
|
#include "nsIView.h"
|
||||||
#include "nsIViewManager.h"
|
#include "nsIViewManager.h"
|
||||||
#include "nsHTMLContainerFrame.h"
|
#include "nsHTMLContainerFrame.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsIScrollableView.h"
|
#include "nsIScrollableView.h"
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
#include "nsGfxScrollFrame.h"
|
#include "nsGfxScrollFrame.h"
|
||||||
|
|
|
@ -40,7 +40,6 @@
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
#include "nsIStyleContext.h"
|
#include "nsIStyleContext.h"
|
||||||
#include "nsStyleConsts.h"
|
#include "nsStyleConsts.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsIContent.h"
|
#include "nsIContent.h"
|
||||||
#include "nsLayoutAtoms.h"
|
#include "nsLayoutAtoms.h"
|
||||||
#include "nsCSSAnonBoxes.h"
|
#include "nsCSSAnonBoxes.h"
|
||||||
|
@ -82,52 +81,13 @@ nsHTMLContainerFrame::Paint(nsIPresContext* aPresContext,
|
||||||
// others in the background (bug 36710). (nsInlineFrame::Paint does
|
// others in the background (bug 36710). (nsInlineFrame::Paint does
|
||||||
// this differently.)
|
// this differently.)
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
PaintChildren(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer, aFlags);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
nsHTMLContainerFrame::PaintSelf(nsIPresContext* aPresContext,
|
|
||||||
nsIRenderingContext& aRenderingContext,
|
|
||||||
const nsRect& aDirtyRect,
|
|
||||||
PRUint32 aFlags)
|
|
||||||
{
|
|
||||||
// The visibility check belongs here since child elements have the
|
|
||||||
// opportunity to override the visibility property and display even if
|
|
||||||
// their parent is hidden.
|
|
||||||
|
|
||||||
PRBool isVisible;
|
|
||||||
if (NS_FAILED(IsVisibleForPainting(aPresContext, aRenderingContext,
|
|
||||||
PR_TRUE, &isVisible)) ||
|
|
||||||
!isVisible ||
|
|
||||||
mRect.width == 0 || mRect.height == 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paint our background and border
|
|
||||||
PRIntn skipSides = GetSkipSides();
|
|
||||||
const nsStyleBorder* border;
|
|
||||||
::GetStyleData(mStyleContext, &border);
|
|
||||||
const nsStylePadding* padding;
|
|
||||||
::GetStyleData(mStyleContext, &padding);
|
|
||||||
const nsStyleOutline* outline;
|
|
||||||
::GetStyleData(mStyleContext, &outline);
|
|
||||||
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *padding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, mStyleContext,
|
|
||||||
skipSides);
|
|
||||||
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *outline,
|
|
||||||
mStyleContext, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
nsHTMLContainerFrame::PaintDecorationsAndChildren(
|
nsHTMLContainerFrame::PaintDecorationsAndChildren(
|
||||||
nsIPresContext* aPresContext,
|
nsIPresContext* aPresContext,
|
||||||
|
|
|
@ -123,15 +123,12 @@ public:
|
||||||
protected:
|
protected:
|
||||||
virtual PRIntn GetSkipSides() const = 0;
|
virtual PRIntn GetSkipSides() const = 0;
|
||||||
|
|
||||||
/**
|
|
||||||
* To be called by |Paint| of this class or derived classes to paint
|
|
||||||
* the background, border, and outline, when in the correct layer to
|
|
||||||
* do so.
|
|
||||||
*/
|
|
||||||
void PaintSelf(nsIPresContext* aPresContext,
|
void PaintSelf(nsIPresContext* aPresContext,
|
||||||
nsIRenderingContext& aRenderingContext,
|
nsIRenderingContext& aRenderingContext,
|
||||||
const nsRect& aDirtyRect,
|
const nsRect& aDirtyRect) {
|
||||||
PRUint32 aFlags);
|
nsContainerFrame::PaintSelf(aPresContext, aRenderingContext,
|
||||||
|
aDirtyRect, GetSkipSides());
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* To be called *instead* of |PaintChildren| by frames that paint text
|
* To be called *instead* of |PaintChildren| by frames that paint text
|
||||||
|
|
|
@ -399,7 +399,7 @@ CanvasFrame::Paint(nsIPresContext* aPresContext,
|
||||||
shell->IsPaintingSuppressed(&paintingSuppressed);
|
shell->IsPaintingSuppressed(&paintingSuppressed);
|
||||||
if (paintingSuppressed) {
|
if (paintingSuppressed) {
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1302,21 +1302,7 @@ nsImageFrame::Paint(nsIPresContext* aPresContext,
|
||||||
? NS_FRAME_PAINT_LAYER_BACKGROUND
|
? NS_FRAME_PAINT_LAYER_BACKGROUND
|
||||||
: NS_FRAME_PAINT_LAYER_FOREGROUND;
|
: NS_FRAME_PAINT_LAYER_FOREGROUND;
|
||||||
if (aWhichLayer == backgroundLayer) {
|
if (aWhichLayer == backgroundLayer) {
|
||||||
const nsStyleVisibility* vis =
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
(const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
|
||||||
if (vis->IsVisibleOrCollapsed()) {
|
|
||||||
const nsStyleBorder* myBorder = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* myPadding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder, *myPadding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder,
|
|
||||||
mStyleContext, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<imgIContainer> imgCon;
|
nsCOMPtr<imgIContainer> imgCon;
|
||||||
|
|
|
@ -337,7 +337,7 @@ nsInlineFrame::Paint(nsIPresContext* aPresContext,
|
||||||
|
|
||||||
// Paint inline element backgrounds in the foreground layer (bug 36710).
|
// Paint inline element backgrounds in the foreground layer (bug 36710).
|
||||||
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) {
|
if (aWhichLayer == NS_FRAME_PAINT_LAYER_FOREGROUND) {
|
||||||
PaintSelf(aPresContext, aRenderingContext, aDirtyRect, aFlags);
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
}
|
}
|
||||||
|
|
||||||
// The sole purpose of this is to trigger display of the selection
|
// The sole purpose of this is to trigger display of the selection
|
||||||
|
|
|
@ -37,12 +37,10 @@
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsLeafFrame.h"
|
#include "nsLeafFrame.h"
|
||||||
#include "nsHTMLContainerFrame.h"
|
#include "nsHTMLContainerFrame.h"
|
||||||
#include "nsCSSRendering.h"
|
|
||||||
#include "nsHTMLParts.h"
|
#include "nsHTMLParts.h"
|
||||||
#include "nsHTMLAtoms.h"
|
#include "nsHTMLAtoms.h"
|
||||||
#include "nsIPresShell.h"
|
#include "nsIPresShell.h"
|
||||||
#include "nsIPresContext.h"
|
#include "nsIPresContext.h"
|
||||||
#include "nsIStyleContext.h"
|
|
||||||
|
|
||||||
nsLeafFrame::~nsLeafFrame()
|
nsLeafFrame::~nsLeafFrame()
|
||||||
{
|
{
|
||||||
|
@ -56,33 +54,7 @@ nsLeafFrame::Paint(nsIPresContext* aPresContext,
|
||||||
PRUint32 aFlags)
|
PRUint32 aFlags)
|
||||||
{
|
{
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
PRBool isVisible;
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
if (NS_SUCCEEDED(IsVisibleForPainting(aPresContext, aRenderingContext, PR_FALSE, &isVisible)) &&
|
|
||||||
!isVisible) {// just checks selection painting
|
|
||||||
return NS_OK; // not visibility
|
|
||||||
}
|
|
||||||
|
|
||||||
const nsStyleVisibility* vis =
|
|
||||||
(const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
|
||||||
|
|
||||||
if (vis->IsVisibleOrCollapsed()) {
|
|
||||||
const nsStyleBorder* myBorder = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* myPadding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
const nsStyleOutline* myOutline = (const nsStyleOutline*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Outline);
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder, *myPadding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder,
|
|
||||||
mStyleContext, 0);
|
|
||||||
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder,
|
|
||||||
*myOutline, mStyleContext, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame", &aRenderingContext);
|
DO_GLOBAL_REFLOW_COUNT_DSP("nsLeafFrame", &aRenderingContext);
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
|
@ -261,27 +261,8 @@ nsMathMLmactionFrame::Paint(nsIPresContext* aPresContext,
|
||||||
nsFramePaintLayer aWhichLayer,
|
nsFramePaintLayer aWhichLayer,
|
||||||
PRUint32 aFlags)
|
PRUint32 aFlags)
|
||||||
{
|
{
|
||||||
const nsStyleVisibility* visib = NS_STATIC_CAST(const nsStyleVisibility*,
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Visibility));
|
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
if (visib->IsVisible() && mRect.width && mRect.height) {
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
// Paint our background and border
|
|
||||||
PRIntn skipSides = GetSkipSides();
|
|
||||||
const nsStyleBorder* border = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* padding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
const nsStyleOutline* outline = (const nsStyleOutline*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Outline);
|
|
||||||
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *padding, 0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, mStyleContext, skipSides);
|
|
||||||
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *outline, mStyleContext, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
nsIFrame* childFrame = GetSelectedFrame();
|
nsIFrame* childFrame = GetSelectedFrame();
|
||||||
|
|
|
@ -1465,43 +1465,13 @@ nsBoxFrame::Paint(nsIPresContext* aPresContext,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
nsCOMPtr<nsIAtom> frameType;
|
|
||||||
GetFrameType(getter_AddRefs(frameType));
|
|
||||||
|
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
if (vis->IsVisible() && mRect.width && mRect.height) {
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
// Paint our background and border
|
|
||||||
PRIntn skipSides = GetSkipSides();
|
|
||||||
const nsStyleBorder* border = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* padding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
const nsStyleOutline* outline = (const nsStyleOutline*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Outline);
|
|
||||||
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *padding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, mStyleContext, skipSides);
|
|
||||||
nsCSSRendering::PaintOutline(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *outline, mStyleContext, 0);
|
|
||||||
|
|
||||||
// The sole purpose of this is to trigger display
|
|
||||||
// of the selection window for Named Anchors,
|
|
||||||
// which don't have any children and normally don't
|
|
||||||
// have any size, but in Editor we use CSS to display
|
|
||||||
// an image to represent this "hidden" element.
|
|
||||||
if (!mFrames.FirstChild())
|
|
||||||
{
|
|
||||||
nsFrame::Paint(aPresContext,
|
|
||||||
aRenderingContext, aDirtyRect, aWhichLayer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (frameType.get() == nsLayoutAtoms::rootFrame) {
|
nsCOMPtr<nsIAtom> frameType;
|
||||||
|
GetFrameType(getter_AddRefs(frameType));
|
||||||
|
if (frameType == nsLayoutAtoms::rootFrame) {
|
||||||
// We are wrapping the root frame of a XUL document. We
|
// We are wrapping the root frame of a XUL document. We
|
||||||
// need to check the pres shell to find out if painting is locked
|
// need to check the pres shell to find out if painting is locked
|
||||||
// down (because we're still in the early stages of document
|
// down (because we're still in the early stages of document
|
||||||
|
|
|
@ -232,9 +232,6 @@ protected:
|
||||||
nsFramePaintLayer aWhichLayer,
|
nsFramePaintLayer aWhichLayer,
|
||||||
PRUint32 aFlags = 0);
|
PRUint32 aFlags = 0);
|
||||||
|
|
||||||
virtual PRIntn GetSkipSides() const { return 0; }
|
|
||||||
|
|
||||||
|
|
||||||
virtual PRBool GetInitialEqualSize(PRBool& aEqualSize);
|
virtual PRBool GetInitialEqualSize(PRBool& aEqualSize);
|
||||||
virtual void GetInitialOrientation(PRBool& aIsHorizontal);
|
virtual void GetInitialOrientation(PRBool& aIsHorizontal);
|
||||||
virtual void GetInitialDirection(PRBool& aIsNormal);
|
virtual void GetInitialDirection(PRBool& aIsNormal);
|
||||||
|
|
|
@ -322,21 +322,7 @@ nsDeckFrame::Paint(nsIPresContext* aPresContext,
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
|
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
if (vis->IsVisible() && mRect.width && mRect.height) {
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
// Paint our background and border
|
|
||||||
PRIntn skipSides = GetSkipSides();
|
|
||||||
const nsStyleBorder* border = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* padding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, *padding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *border, mStyleContext, skipSides);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// only paint the seleced box
|
// only paint the seleced box
|
||||||
|
|
|
@ -126,7 +126,7 @@ nsGroupBoxFrame::Paint(nsIPresContext* aPresContext,
|
||||||
(const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
(const nsStyleVisibility*)mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
||||||
|
|
||||||
if (vis->IsVisible() && mRect.width && mRect.height) {
|
if (vis->IsVisible() && mRect.width && mRect.height) {
|
||||||
PRIntn skipSides = GetSkipSides();
|
PRIntn skipSides = 0;
|
||||||
const nsStyleBorder* borderStyleData =
|
const nsStyleBorder* borderStyleData =
|
||||||
(const nsStyleBorder*)mStyleContext->GetStyleData(eStyleStruct_Border);
|
(const nsStyleBorder*)mStyleContext->GetStyleData(eStyleStruct_Border);
|
||||||
const nsStylePadding* paddingStyleData =
|
const nsStylePadding* paddingStyleData =
|
||||||
|
|
|
@ -634,12 +634,6 @@ nsScrollBoxFrame::Paint(nsIPresContext* aPresContext,
|
||||||
return nsFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
return nsFrame::Paint(aPresContext, aRenderingContext, aDirtyRect, aWhichLayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
PRIntn
|
|
||||||
nsScrollBoxFrame::GetSkipSides() const
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
nsScrollBoxFrame::GetContentOf(nsIContent** aContent)
|
nsScrollBoxFrame::GetContentOf(nsIContent** aContent)
|
||||||
{
|
{
|
||||||
|
|
|
@ -120,7 +120,6 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
nsScrollBoxFrame(nsIPresShell* aShell);
|
nsScrollBoxFrame(nsIPresShell* aShell);
|
||||||
virtual PRIntn GetSkipSides() const;
|
|
||||||
|
|
||||||
// Creation of the widget for the scrolling view is factored into a virtual method so
|
// Creation of the widget for the scrolling view is factored into a virtual method so
|
||||||
// that sub-classes may control widget creation.
|
// that sub-classes may control widget creation.
|
||||||
|
|
|
@ -308,20 +308,7 @@ nsSliderFrame::Paint(nsIPresContext* aPresContext,
|
||||||
if (crect.width < thumbRect.width || crect.height < thumbRect.height)
|
if (crect.width < thumbRect.width || crect.height < thumbRect.height)
|
||||||
{
|
{
|
||||||
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
if (NS_FRAME_PAINT_LAYER_BACKGROUND == aWhichLayer) {
|
||||||
const nsStyleVisibility* vis = (const nsStyleVisibility*)
|
PaintSelf(aPresContext, aRenderingContext, aDirtyRect);
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Visibility);
|
|
||||||
if (vis->IsVisibleOrCollapsed()) {
|
|
||||||
const nsStyleBorder* myBorder = (const nsStyleBorder*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Border);
|
|
||||||
const nsStylePadding* myPadding = (const nsStylePadding*)
|
|
||||||
mStyleContext->GetStyleData(eStyleStruct_Padding);
|
|
||||||
nsRect rect(0, 0, mRect.width, mRect.height);
|
|
||||||
nsCSSRendering::PaintBackground(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder, *myPadding,
|
|
||||||
0, 0);
|
|
||||||
nsCSSRendering::PaintBorder(aPresContext, aRenderingContext, this,
|
|
||||||
aDirtyRect, rect, *myBorder, mStyleContext, 0);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -228,10 +228,6 @@ public:
|
||||||
NS_IMETHOD_(void) Notify(nsITimer *timer);
|
NS_IMETHOD_(void) Notify(nsITimer *timer);
|
||||||
//friend nsSliderMediator;
|
//friend nsSliderMediator;
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
virtual PRIntn GetSkipSides() const { return 0; }
|
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче