зеркало из https://github.com/mozilla/pjs.git
More memory leak fixes
This commit is contained in:
Родитель
93a3940010
Коммит
d13a326f96
|
@ -1,69 +0,0 @@
|
|||
<?xml version="1.0" standalone="no" encoding="UTF-8"?>
|
||||
<!DOCTYPE toolbar SYSTEM "http://kirkwood.mcom.com/ui.dtd">
|
||||
<UI>
|
||||
|
||||
<!-- This is the Toolbar XML
|
||||
Objects
|
||||
toolbar (type of container, generally a widget subclass)
|
||||
button (type of widget)
|
||||
|
||||
Tags
|
||||
|
||||
toolbar (all container properties apply)
|
||||
|
||||
name - specifies the id it is known by
|
||||
layout - specifies the type of layout to use for children in the container
|
||||
|
||||
showtext - true/false for displaying text or not
|
||||
showicons - true/false for displaying icon or not
|
||||
icons - mini, full for 2 different sizes of icons
|
||||
(If we want to support icon stretching, these can be twips)
|
||||
dockable - true/false for supports docking
|
||||
floatable - true/false supports floating toolbar
|
||||
tooltips - true/false - draw tooltips
|
||||
|
||||
button/editfield/separator (all widget properties apply)
|
||||
|
||||
name - specifies the id it is known by
|
||||
container - An associated container when clicked on, can be drop down list of sorts
|
||||
align - How is this item aligned (left, right,etc...)
|
||||
type - The type of widget to use (buttons, separators, text, etc...)
|
||||
commandkey - The command key equivalent
|
||||
shortcut - shortcut that applies
|
||||
miniimage - miniimage to use
|
||||
fullimage - fullimage to use
|
||||
rule - rule that gets applied, can modify appearance (or lack thereof)
|
||||
|
||||
(widget properties that typically are used)
|
||||
enable - TRUE is is enabled by default
|
||||
check - TRUE if checked. Must be a button type for this to apply
|
||||
|
||||
(problematic areas)
|
||||
onaction - What to do on an action event. currently the name of the control is sent.
|
||||
We need to map this to something simpler.
|
||||
|
||||
-->
|
||||
|
||||
<!-- This is the ToolBar Definition -->
|
||||
<toolbar backgroundcolor="#C0C0C0" name="ToolBar" layout="xbox" hgap="3" vgap="3" weightmajor="0" weightminor="0" icons="mini" dockable="true" floatable="true" tooltips="true">
|
||||
<xpbutton command="LoadUrl?resource://res/ui/demo/julian4.cal?target=content" weightmajor="0" halign="center" valign="bottom" weightminor="0" label="Portal" miniimage="images/intray_mini.gif" fullimage="resource://res/ui/images/intray_full.gif" fullhoverimage="resource://res/ui/images/intray_hover_full.gif" fullpressedimage="resource://res/ui/images/intray_pressed_full.gif"/>
|
||||
<xpbutton label="Agenda" halign="center" valign="bottom" enable="True" weightmajor="0" weightminor="0" miniimage="resource://res/ui/images/agenda_mini.gif" fullimage="resource://res/ui/images/agenda_full.gif" fullhoverimage="resource://res/ui/images/agenda_hover_full.gif" fullpressedimage="resource://res/ui/images/agenda_pressed_full.gif"/>
|
||||
<!--<xpbutton halign="center" valign="bottom" weightmajor="0" weightminor="0" label="Tasks" miniimage="tasks_mini.gif" fullimage="resource://res/ui/images/tasks_full.gif" fullhoverimage="resource://res/ui/images/tasks_hover_full.gif" fullpressedimage="resource://res/ui/images/tasks_pressed_full.gif"/>-->
|
||||
<object class="separator" weightmajor="0" weightminor="0"/>
|
||||
<xpbutton command="LoadUrl?resource://res/ui/julian_day.cal?target=content" halign="center" valign="bottom" label="Day" weightmajor="0" weightminor="0" miniimage="images/day_mini.gif" fullimage="resource://res/ui/images/day_full.gif" rule="ViewListRule" fullhoverimage="resource://res/ui/images/day_hover_full.gif" fullpressedimage="resource://res/ui/images/day_pressed_full.gif"/>
|
||||
<xpbutton command="LoadUrl?resource://res/ui/julian_week.cal?target=content" halign="center" valign="bottom" label="Week" weightmajor="0" weightminor="0" miniimage="images/week_mini.gif" fullimage="resource://res/ui/images/week_full.gif" rule="ViewListRule" fullhoverimage="resource://res/ui/images/week_hover_full.gif" fullpressedimage="resource://res/ui/images/week_pressed_full.gif"/>
|
||||
<xpbutton command="LoadUrl?resource://res/ui/julian_month_sum.cal?target=content" halign="center" valign="bottom" label="Month" weightmajor="0" weightminor="0" miniimage="images/month_mini.gif" fullimage="resource://res/ui/images/month_full.gif" rule="ViewListRule" fullhoverimage="resource://res/ui/images/month_hover_full.gif" fullpressedimage="resource://res/ui/images/month_pressed_full.gif"/>
|
||||
<object class="separator" weightmajor="0" weightminor="0"/>
|
||||
<xpbutton halign="center" valign="bottom" label="New Entry" weightmajor="0" weightminor="0" miniimage="images/newentry_mini.gif" fullimage="resource://res/ui/images/newentry_full.gif" fullhoverimage="resource://res/ui/images/newentry_hover_full.gif" fullpressedimage="resource://res/ui/images/newentry_pressed_full.gif"/>
|
||||
<!--<xpbutton halign="center" valign="bottom" label="New Task" weightmajor="0" weightminor="0" miniimage="images/newtask_mini.gif" fullimage="resource://res/ui/images/newtask_full.gif" fullhoverimage="resource://res/ui/images/newtask_hover_full.gif" fullpressedimage="resource://res/ui/images/newtask_pressed_full.gif"/>-->
|
||||
<object class="separator" weightmajor="0" weightminor="0" />
|
||||
<xpbutton halign="center" valign="bottom" label="Print..." weightmajor="0" weightminor="0" miniimage="images/print_mini.gif" fullimage="resource://res/ui/images/print_full.gif" fullhoverimage="resource://res/ui/images/print_hover_full.gif" fullpressedimage="resource://res/ui/images/print_pressed_full.gif"/>
|
||||
<object class="separator" weightmajor="0" weightminor="0"/>
|
||||
<xpbutton halign="right" valign="center" label="GOTO:" weightmajor="0" weightminor="0"/>
|
||||
<object class="editfield" weightmajor="1" weightminor="1" label="" command="LoadUrl?$label"/>
|
||||
<object class="separator"weightmajor="0" weightminor="0" />
|
||||
<button label="Throbber" weightmajor="0" weightminor="0" miniimage="throbber_mini##.gif" fullimage="throbber_full##.gif" align="right"/>
|
||||
</toolbar>
|
||||
|
||||
</UI>
|
||||
|
|
@ -2265,6 +2265,7 @@ void nsXPFCCanvas::Notify(nsIImageRequest *aImageRequest,
|
|||
{
|
||||
bounds.x = 0;
|
||||
bounds.y = 0;
|
||||
aImageRequest->RemoveObserver((nsIImageRequestObserver*)this);
|
||||
gXPFCToolkit->GetViewManager()->UpdateView(GetView(), bounds, NS_VMREFRESH_AUTO_DOUBLE_BUFFER | NS_VMREFRESH_NO_SYNC);
|
||||
}
|
||||
return ;
|
||||
|
@ -2273,6 +2274,7 @@ void nsXPFCCanvas::Notify(nsIImageRequest *aImageRequest,
|
|||
void nsXPFCCanvas::NotifyError(nsIImageRequest *aImageRequest,
|
||||
nsImageError aErrorType)
|
||||
{
|
||||
aImageRequest->RemoveObserver((nsIImageRequestObserver*)this);
|
||||
return ;
|
||||
}
|
||||
|
||||
|
|
|
@ -780,14 +780,14 @@ NS_IMETHODIMP nsXPFCXMLContentSink::AddToHierarchy(nsIXMLParserObject& aObject,
|
|||
{
|
||||
|
||||
nsIXPFCToolbar * container = nsnull;
|
||||
nsIXPFCToolbar * parent = nsnull;
|
||||
nsIXPFCCanvas * parent = nsnull;
|
||||
nsIXPFCCanvas * child_canvas = nsnull;
|
||||
|
||||
aObject.QueryInterface(kIXPFCCanvasIID,(void**)&child_canvas);
|
||||
|
||||
nsresult res = aObject.QueryInterface(kCIXPFCToolbarIID,(void**)&container);
|
||||
|
||||
parent = (nsIXPFCToolbar *) mXPFCStack->Top();
|
||||
parent = (nsIXPFCCanvas *) mXPFCStack->Top();
|
||||
|
||||
if (parent == nsnull)
|
||||
{
|
||||
|
@ -795,19 +795,9 @@ NS_IMETHODIMP nsXPFCXMLContentSink::AddToHierarchy(nsIXMLParserObject& aObject,
|
|||
|
||||
} else {
|
||||
|
||||
nsIXPFCCanvas * parent_canvas = nsnull;
|
||||
|
||||
if (child_canvas != nsnull)
|
||||
{
|
||||
res = parent->QueryInterface(kIXPFCCanvasIID,(void**)&parent_canvas);
|
||||
|
||||
if (NS_OK == res)
|
||||
{
|
||||
parent_canvas->AddChildCanvas(child_canvas);
|
||||
|
||||
NS_RELEASE(parent_canvas);
|
||||
}
|
||||
|
||||
parent->AddChildCanvas(child_canvas);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -59,6 +59,10 @@ nsXPButton :: nsXPButton(nsISupports* outer) : nsXPItem(outer)
|
|||
|
||||
nsXPButton :: ~nsXPButton()
|
||||
{
|
||||
NS_IF_RELEASE(mMiniHoverImageRequest);
|
||||
NS_IF_RELEASE(mFullHoverImageRequest);
|
||||
NS_IF_RELEASE(mMiniPressedImageRequest);
|
||||
NS_IF_RELEASE(mFullPressedImageRequest);
|
||||
}
|
||||
|
||||
nsresult nsXPButton::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
|
|
|
@ -57,6 +57,8 @@ nsXPFCButton :: nsXPFCButton(nsISupports* outer) : nsXPFCCanvas(outer)
|
|||
|
||||
nsXPFCButton :: ~nsXPFCButton()
|
||||
{
|
||||
if (GetLabel() == "Throbber")
|
||||
NS_IF_RELEASE(mThrobber);
|
||||
}
|
||||
|
||||
nsresult nsXPFCButton::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
|
|
|
@ -54,6 +54,8 @@ nsXPItem :: nsXPItem(nsISupports* outer) : nsXPFCCanvas(outer)
|
|||
|
||||
nsXPItem :: ~nsXPItem()
|
||||
{
|
||||
NS_IF_RELEASE(mMiniImageRequest);
|
||||
NS_IF_RELEASE(mFullImageRequest);
|
||||
}
|
||||
|
||||
nsresult nsXPItem::QueryInterface(REFNSIID aIID, void** aInstancePtr)
|
||||
|
|
Загрузка…
Ссылка в новой задаче