Backed out changeset 513192eb7df4 (bug 1148971) for causing bc2 memory leaks
This commit is contained in:
@@ -12,9 +12,11 @@
|
|||||||
#include "nsISupports.h"
|
#include "nsISupports.h"
|
||||||
#include "nsCOMPtr.h"
|
#include "nsCOMPtr.h"
|
||||||
#include "nsColor.h"
|
#include "nsColor.h"
|
||||||
#include "Units.h"
|
#include "nsSize.h"
|
||||||
|
|
||||||
struct nsRect;
|
struct nsRect;
|
||||||
|
struct nsIntRect;
|
||||||
|
class nsIntRegion;
|
||||||
struct nsFont;
|
struct nsFont;
|
||||||
struct nsIntMargin;
|
struct nsIntMargin;
|
||||||
class nsPresContext;
|
class nsPresContext;
|
||||||
@@ -114,7 +116,7 @@ public:
|
|||||||
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext,
|
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
mozilla::LayoutDeviceIntSize* aResult,
|
nsIntSize* aResult,
|
||||||
bool* aIsOverridable)=0;
|
bool* aIsOverridable)=0;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4567,7 +4567,7 @@ nsLayoutUtils::IntrinsicForContainer(nsRenderingContext *aRenderingContext,
|
|||||||
|
|
||||||
const nsStyleDisplay *disp = aFrame->StyleDisplay();
|
const nsStyleDisplay *disp = aFrame->StyleDisplay();
|
||||||
if (aFrame->IsThemed(disp)) {
|
if (aFrame->IsThemed(disp)) {
|
||||||
LayoutDeviceIntSize size;
|
nsIntSize size(0, 0);
|
||||||
bool canOverride = true;
|
bool canOverride = true;
|
||||||
nsPresContext *presContext = aFrame->PresContext();
|
nsPresContext *presContext = aFrame->PresContext();
|
||||||
presContext->GetTheme()->
|
presContext->GetTheme()->
|
||||||
|
|||||||
@@ -517,7 +517,7 @@ nsRangeFrame::GetValueAtEventPoint(WidgetGUIEvent* aEvent)
|
|||||||
// We need to get the size of the thumb from the theme.
|
// We need to get the size of the thumb from the theme.
|
||||||
nsPresContext *presContext = PresContext();
|
nsPresContext *presContext = PresContext();
|
||||||
bool notUsedCanOverride;
|
bool notUsedCanOverride;
|
||||||
LayoutDeviceIntSize size;
|
nsIntSize size;
|
||||||
presContext->GetTheme()->
|
presContext->GetTheme()->
|
||||||
GetMinimumWidgetSize(presContext, this, NS_THEME_RANGE_THUMB, &size,
|
GetMinimumWidgetSize(presContext, this, NS_THEME_RANGE_THUMB, &size,
|
||||||
¬UsedCanOverride);
|
¬UsedCanOverride);
|
||||||
|
|||||||
@@ -169,14 +169,14 @@ public:
|
|||||||
nscoord GetMainComponent(const nsSize& aSize) const {
|
nscoord GetMainComponent(const nsSize& aSize) const {
|
||||||
return GET_MAIN_COMPONENT(*this, aSize.width, aSize.height);
|
return GET_MAIN_COMPONENT(*this, aSize.width, aSize.height);
|
||||||
}
|
}
|
||||||
int32_t GetMainComponent(const LayoutDeviceIntSize& aIntSize) const {
|
int32_t GetMainComponent(const nsIntSize& aIntSize) const {
|
||||||
return GET_MAIN_COMPONENT(*this, aIntSize.width, aIntSize.height);
|
return GET_MAIN_COMPONENT(*this, aIntSize.width, aIntSize.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
nscoord GetCrossComponent(const nsSize& aSize) const {
|
nscoord GetCrossComponent(const nsSize& aSize) const {
|
||||||
return GET_CROSS_COMPONENT(*this, aSize.width, aSize.height);
|
return GET_CROSS_COMPONENT(*this, aSize.width, aSize.height);
|
||||||
}
|
}
|
||||||
int32_t GetCrossComponent(const LayoutDeviceIntSize& aIntSize) const {
|
int32_t GetCrossComponent(const nsIntSize& aIntSize) const {
|
||||||
return GET_CROSS_COMPONENT(*this, aIntSize.width, aIntSize.height);
|
return GET_CROSS_COMPONENT(*this, aIntSize.width, aIntSize.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1045,7 +1045,7 @@ nsFlexContainerFrame::GenerateFlexItemForChild(
|
|||||||
bool isFixedSizeWidget = false;
|
bool isFixedSizeWidget = false;
|
||||||
const nsStyleDisplay* disp = aChildFrame->StyleDisplay();
|
const nsStyleDisplay* disp = aChildFrame->StyleDisplay();
|
||||||
if (aChildFrame->IsThemed(disp)) {
|
if (aChildFrame->IsThemed(disp)) {
|
||||||
LayoutDeviceIntSize widgetMinSize;
|
nsIntSize widgetMinSize(0, 0);
|
||||||
bool canOverride = true;
|
bool canOverride = true;
|
||||||
aPresContext->GetTheme()->
|
aPresContext->GetTheme()->
|
||||||
GetMinimumWidgetSize(aPresContext, aChildFrame,
|
GetMinimumWidgetSize(aPresContext, aChildFrame,
|
||||||
|
|||||||
@@ -4295,7 +4295,7 @@ nsFrame::ComputeSize(nsRenderingContext *aRenderingContext,
|
|||||||
|
|
||||||
const nsStyleDisplay *disp = StyleDisplay();
|
const nsStyleDisplay *disp = StyleDisplay();
|
||||||
if (IsThemed(disp)) {
|
if (IsThemed(disp)) {
|
||||||
LayoutDeviceIntSize widget;
|
nsIntSize widget(0, 0);
|
||||||
bool canOverride = true;
|
bool canOverride = true;
|
||||||
nsPresContext *presContext = PresContext();
|
nsPresContext *presContext = PresContext();
|
||||||
presContext->GetTheme()->
|
presContext->GetTheme()->
|
||||||
|
|||||||
@@ -1039,7 +1039,7 @@ ScrollFrameHelper::GetNondisappearingScrollbarWidth(nsBoxLayoutState* aState)
|
|||||||
theme->ThemeSupportsWidget(aState->PresContext(),
|
theme->ThemeSupportsWidget(aState->PresContext(),
|
||||||
mVScrollbarBox,
|
mVScrollbarBox,
|
||||||
NS_THEME_SCROLLBAR_NON_DISAPPEARING)) {
|
NS_THEME_SCROLLBAR_NON_DISAPPEARING)) {
|
||||||
LayoutDeviceIntSize size;
|
nsIntSize size;
|
||||||
bool canOverride = true;
|
bool canOverride = true;
|
||||||
theme->GetMinimumWidgetSize(aState->PresContext(),
|
theme->GetMinimumWidgetSize(aState->PresContext(),
|
||||||
mVScrollbarBox,
|
mVScrollbarBox,
|
||||||
|
|||||||
@@ -681,7 +681,7 @@ nsIFrame::AddCSSMinSize(nsBoxLayoutState& aState, nsIFrame* aBox, nsSize& aSize,
|
|||||||
if (display->mAppearance) {
|
if (display->mAppearance) {
|
||||||
nsITheme *theme = aState.PresContext()->GetTheme();
|
nsITheme *theme = aState.PresContext()->GetTheme();
|
||||||
if (theme && theme->ThemeSupportsWidget(aState.PresContext(), aBox, display->mAppearance)) {
|
if (theme && theme->ThemeSupportsWidget(aState.PresContext(), aBox, display->mAppearance)) {
|
||||||
LayoutDeviceIntSize size;
|
nsIntSize size;
|
||||||
theme->GetMinimumWidgetSize(aState.PresContext(), aBox,
|
theme->GetMinimumWidgetSize(aState.PresContext(), aBox,
|
||||||
display->mAppearance, &size, &canOverride);
|
display->mAppearance, &size, &canOverride);
|
||||||
if (size.width) {
|
if (size.width) {
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ nsScrollbarFrame::GetMargin(nsMargin& aMargin)
|
|||||||
nsPresContext* presContext = PresContext();
|
nsPresContext* presContext = PresContext();
|
||||||
nsITheme* theme = presContext->GetTheme();
|
nsITheme* theme = presContext->GetTheme();
|
||||||
if (theme) {
|
if (theme) {
|
||||||
LayoutDeviceIntSize size;
|
nsIntSize size;
|
||||||
bool isOverridable;
|
bool isOverridable;
|
||||||
theme->GetMinimumWidgetSize(presContext, this, NS_THEME_SCROLLBAR, &size,
|
theme->GetMinimumWidgetSize(presContext, this, NS_THEME_SCROLLBAR, &size,
|
||||||
&isOverridable);
|
&isOverridable);
|
||||||
|
|||||||
@@ -2087,7 +2087,7 @@ nsTreeBodyFrame::GetTwistyRect(int32_t aRowIndex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (useTheme) {
|
if (useTheme) {
|
||||||
LayoutDeviceIntSize minTwistySizePx;
|
nsIntSize minTwistySizePx(0,0);
|
||||||
bool canOverride = true;
|
bool canOverride = true;
|
||||||
theme->GetMinimumWidgetSize(aPresContext, this, twistyDisplayData->mAppearance,
|
theme->GetMinimumWidgetSize(aPresContext, this, twistyDisplayData->mAppearance,
|
||||||
&minTwistySizePx, &canOverride);
|
&minTwistySizePx, &canOverride);
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ public:
|
|||||||
|
|
||||||
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
mozilla::LayoutDeviceIntSize* aResult, bool* aIsOverridable) override;
|
nsIntSize* aResult, bool* aIsOverridable) override;
|
||||||
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
|
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
|
||||||
nsIAtom* aAttribute, bool* aShouldRepaint) override;
|
nsIAtom* aAttribute, bool* aShouldRepaint) override;
|
||||||
NS_IMETHOD ThemeChanged() override;
|
NS_IMETHOD ThemeChanged() override;
|
||||||
|
|||||||
@@ -3163,7 +3163,7 @@ NS_IMETHODIMP
|
|||||||
nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
nsNativeThemeCocoa::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
LayoutDeviceIntSize* aResult,
|
nsIntSize* aResult,
|
||||||
bool* aIsOverridable)
|
bool* aIsOverridable)
|
||||||
{
|
{
|
||||||
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
NS_OBJC_BEGIN_TRY_ABORT_BLOCK_NSRESULT;
|
||||||
|
|||||||
@@ -1065,8 +1065,7 @@ nsNativeThemeGTK::GetWidgetOverflow(nsDeviceContext* aContext,
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
nsNativeThemeGTK::GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFrame, uint8_t aWidgetType,
|
nsIFrame* aFrame, uint8_t aWidgetType,
|
||||||
LayoutDeviceIntSize* aResult,
|
nsIntSize* aResult, bool* aIsOverridable)
|
||||||
bool* aIsOverridable)
|
|
||||||
{
|
{
|
||||||
aResult->width = aResult->height = 0;
|
aResult->width = aResult->height = 0;
|
||||||
*aIsOverridable = true;
|
*aIsOverridable = true;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
|
|
||||||
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext,
|
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFrame, uint8_t aWidgetType,
|
nsIFrame* aFrame, uint8_t aWidgetType,
|
||||||
mozilla::LayoutDeviceIntSize* aResult,
|
nsIntSize* aResult,
|
||||||
bool* aIsOverridable) override;
|
bool* aIsOverridable) override;
|
||||||
|
|
||||||
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
|
NS_IMETHOD WidgetStateChanged(nsIFrame* aFrame, uint8_t aWidgetType,
|
||||||
|
|||||||
@@ -353,7 +353,7 @@ static CaptionButtonPadding buttonData[3] = {
|
|||||||
|
|
||||||
// Adds "hot" caption button padding to minimum widget size.
|
// Adds "hot" caption button padding to minimum widget size.
|
||||||
static void
|
static void
|
||||||
AddPaddingRect(LayoutDeviceIntSize* aSize, CaptionButton button) {
|
AddPaddingRect(nsIntSize* aSize, CaptionButton button) {
|
||||||
if (!aSize)
|
if (!aSize)
|
||||||
return;
|
return;
|
||||||
RECT offset;
|
RECT offset;
|
||||||
@@ -2254,7 +2254,7 @@ nsNativeThemeWin::GetWidgetOverflow(nsDeviceContext* aContext,
|
|||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsNativeThemeWin::GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
nsNativeThemeWin::GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
LayoutDeviceIntSize* aResult, bool* aIsOverridable)
|
nsIntSize* aResult, bool* aIsOverridable)
|
||||||
{
|
{
|
||||||
(*aResult).width = (*aResult).height = 0;
|
(*aResult).width = (*aResult).height = 0;
|
||||||
*aIsOverridable = true;
|
*aIsOverridable = true;
|
||||||
@@ -2918,7 +2918,7 @@ nsNativeThemeWin::ClassicGetWidgetPadding(nsDeviceContext* aContext,
|
|||||||
nsresult
|
nsresult
|
||||||
nsNativeThemeWin::ClassicGetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
nsNativeThemeWin::ClassicGetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
LayoutDeviceIntSize* aResult, bool* aIsOverridable)
|
nsIntSize* aResult, bool* aIsOverridable)
|
||||||
{
|
{
|
||||||
(*aResult).width = (*aResult).height = 0;
|
(*aResult).width = (*aResult).height = 0;
|
||||||
*aIsOverridable = true;
|
*aIsOverridable = true;
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
#include "mozilla/TimeStamp.h"
|
#include "mozilla/TimeStamp.h"
|
||||||
#include "nsSize.h"
|
#include "nsSize.h"
|
||||||
|
|
||||||
|
struct nsIntRect;
|
||||||
|
|
||||||
class nsNativeThemeWin : private nsNativeTheme,
|
class nsNativeThemeWin : private nsNativeTheme,
|
||||||
public nsITheme {
|
public nsITheme {
|
||||||
virtual ~nsNativeThemeWin();
|
virtual ~nsNativeThemeWin();
|
||||||
@@ -50,7 +52,7 @@ public:
|
|||||||
|
|
||||||
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
NS_IMETHOD GetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
mozilla::LayoutDeviceIntSize* aResult,
|
nsIntSize* aResult,
|
||||||
bool* aIsOverridable);
|
bool* aIsOverridable);
|
||||||
|
|
||||||
virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType);
|
virtual Transparency GetWidgetTransparency(nsIFrame* aFrame, uint8_t aWidgetType);
|
||||||
@@ -103,7 +105,7 @@ protected:
|
|||||||
nsIntMargin* aResult);
|
nsIntMargin* aResult);
|
||||||
nsresult ClassicGetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
nsresult ClassicGetMinimumWidgetSize(nsPresContext* aPresContext, nsIFrame* aFrame,
|
||||||
uint8_t aWidgetType,
|
uint8_t aWidgetType,
|
||||||
mozilla::LayoutDeviceIntSize* aResult,
|
nsIntSize* aResult,
|
||||||
bool* aIsOverridable);
|
bool* aIsOverridable);
|
||||||
bool ClassicThemeSupportsWidget(nsPresContext* aPresContext,
|
bool ClassicThemeSupportsWidget(nsPresContext* aPresContext,
|
||||||
nsIFrame* aFrame,
|
nsIFrame* aFrame,
|
||||||
|
|||||||
Reference in New Issue
Block a user