Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tails
thunderbird
Commits
c45eb8dc
Commit
c45eb8dc
authored
Jan 15, 2013
by
Christoph Goehre
Browse files
Imported Upstream version 10.0.12
parent
317e64c0
Changes
46
Hide whitespace changes
Inline
Side-by-side
mail/config/version.txt
View file @
c45eb8dc
10.0.1
1
10.0.1
2
mailnews/base/src/nsMsgDBView.cpp
View file @
c45eb8dc
...
...
@@ -571,7 +571,7 @@ nsresult nsMsgDBView::FetchAccount(nsIMsgDBHdr * aHdr, nsAString& aAccount)
nsCOMPtr
<
nsIMsgIncomingServer
>
server
;
if
(
!
accountKey
.
IsEmpty
())
rv
=
accountManager
->
GetAccount
(
accountKey
,
getter_AddRefs
(
account
));
if
(
account
)
{
account
->
GetIncomingServer
(
getter_AddRefs
(
server
));
...
...
@@ -1798,7 +1798,7 @@ void nsMsgDBView::InsertMsgHdrAt(nsMsgViewIndex index, nsIMsgDBHdr *hdr,
m_levels
.
InsertElementAt
(
index
,
level
);
}
void
nsMsgDBView
::
SetMsgHdrAt
(
nsIMsgDBHdr
*
hdr
,
nsMsgViewIndex
index
,
void
nsMsgDBView
::
SetMsgHdrAt
(
nsIMsgDBHdr
*
hdr
,
nsMsgViewIndex
index
,
nsMsgKey
msgKey
,
PRUint32
flags
,
PRUint32
level
)
{
m_keys
[
index
]
=
msgKey
;
...
...
@@ -1975,7 +1975,7 @@ NS_IMETHODIMP nsMsgDBView::AddColumnHandler(const nsAString& column, nsIMsgCusto
for
(
PRUint32
i
=
0
;
i
<
m_sortColumns
.
Length
();
i
++
)
{
MsgViewSortColumnInfo
&
sortInfo
=
m_sortColumns
[
i
];
if
(
sortInfo
.
mSortType
==
nsMsgViewSortType
::
byCustom
&&
if
(
sortInfo
.
mSortType
==
nsMsgViewSortType
::
byCustom
&&
sortInfo
.
mCustomColumnName
.
Equals
(
column
))
sortInfo
.
mColHandler
=
handler
;
}
...
...
@@ -1999,7 +1999,7 @@ NS_IMETHODIMP nsMsgDBView::RemoveColumnHandler(const nsAString& aColID)
for
(
PRUint32
i
=
0
;
i
<
m_sortColumns
.
Length
();
i
++
)
{
MsgViewSortColumnInfo
&
sortInfo
=
m_sortColumns
[
i
];
if
(
sortInfo
.
mSortType
==
nsMsgViewSortType
::
byCustom
&&
if
(
sortInfo
.
mSortType
==
nsMsgViewSortType
::
byCustom
&&
sortInfo
.
mCustomColumnName
.
Equals
(
aColID
))
sortInfo
.
mColHandler
=
nsnull
;
}
...
...
@@ -2528,7 +2528,7 @@ NS_IMETHODIMP nsMsgDBView::GetURIsForSelection(PRUint32 *length, char ***uris)
NS_ENSURE_ARG_POINTER
(
length
);
*
length
=
0
;
NS_ENSURE_ARG_POINTER
(
uris
);
*
uris
=
nsnull
;
...
...
@@ -2561,7 +2561,7 @@ NS_IMETHODIMP nsMsgDBView::GetURIsForSelection(PRUint32 *length, char ***uris)
*
next
=
ToNewCString
(
tmpUri
);
if
(
!*
next
)
return
NS_ERROR_OUT_OF_MEMORY
;
next
++
;
}
...
...
@@ -2810,12 +2810,12 @@ NS_IMETHODIMP nsMsgDBView::GetCommandStatus(nsMsgViewCommandTypeValue command, b
}
// This method needs to be overridden by the various view classes
// that have different kinds of threads. For example, in a
// that have different kinds of threads. For example, in a
// threaded quick search db view, we'd only want to include children
// of the thread that fit the view (IMO). And when we have threaded
// cross folder views, we would include all the children of the
// cross-folder thread.
nsresult
nsMsgDBView
::
ListCollapsedChildren
(
nsMsgViewIndex
viewIndex
,
nsresult
nsMsgDBView
::
ListCollapsedChildren
(
nsMsgViewIndex
viewIndex
,
nsIMutableArray
*
messageArray
)
{
nsCOMPtr
<
nsIMsgDBHdr
>
msgHdr
;
...
...
@@ -2892,7 +2892,7 @@ nsresult nsMsgDBView::GetHeadersFromSelection(PRUint32 *indices,
if
(
NS_SUCCEEDED
(
rv
)
&&
msgHdr
)
{
rv
=
messageArray
->
AppendElement
(
msgHdr
,
PR_FALSE
);
if
(
NS_SUCCEEDED
(
rv
)
&&
includeCollapsedMsgs
&&
if
(
NS_SUCCEEDED
(
rv
)
&&
includeCollapsedMsgs
&&
viewIndexFlags
&
nsMsgMessageFlags
::
Elided
&&
viewIndexFlags
&
MSG_VIEW_FLAG_HASCHILDREN
&&
m_viewFlags
&
nsMsgViewFlagsType
::
kThreadedDisplay
)
...
...
@@ -3758,7 +3758,7 @@ void nsMsgDBView::ReverseSort()
nsCOMArray
<
nsIMsgFolder
>
*
folders
=
GetFolders
();
// go up half the array swapping values
for
(
PRUint32
bottomIndex
=
0
;
bottomIndex
<
--
topIndex
;
bottomIndex
++
)
for
(
PRUint32
bottomIndex
=
0
;
bottomIndex
<
--
topIndex
;
bottomIndex
++
)
{
// swap flags
PRUint32
tempFlags
=
m_flags
[
bottomIndex
];
...
...
@@ -3863,6 +3863,13 @@ const int kMaxLocationKey = 160; // also used for account
const
int
kMaxAuthorKey
=
160
;
const
int
kMaxRecipientKey
=
80
;
//
// There are cases when pFieldType is not set:
// one case returns NS_ERROR_UNEXPECTED;
// the other case now return NS_ERROR_NULL_POINTER (this is only when
// colHandler below is null, but is very unlikely).
// The latter case used to return NS_OK, which was incorrect.
//
nsresult
nsMsgDBView
::
GetFieldTypeAndLenForSort
(
nsMsgViewSortTypeValue
sortType
,
PRUint16
*
pMaxLen
,
eFieldType
*
pFieldType
)
{
NS_ENSURE_ARG_POINTER
(
pMaxLen
);
...
...
@@ -3922,10 +3929,20 @@ nsresult nsMsgDBView::GetFieldTypeAndLenForSort(nsMsgViewSortTypeValue sortType,
*
pMaxLen
=
0
;
}
}
else
{
NS_WARNING
(
"colHandler is null. *pFieldType is not set."
);
return
NS_ERROR_NULL_POINTER
;
}
break
;
}
default:
return
NS_ERROR_UNEXPECTED
;
{
nsCAutoString
message
(
"unexpected switch value: sortType="
);
message
.
AppendInt
(
sortType
);
NS_WARNING
(
message
.
get
());
return
NS_ERROR_UNEXPECTED
;
}
}
return
NS_OK
;
...
...
@@ -4090,7 +4107,7 @@ MsgViewSortColumnInfo::MsgViewSortColumnInfo(const MsgViewSortColumnInfo &other)
bool
MsgViewSortColumnInfo
::
operator
==
(
const
MsgViewSortColumnInfo
&
other
)
const
{
return
(
mSortType
==
nsMsgViewSortType
::
byCustom
)
?
return
(
mSortType
==
nsMsgViewSortType
::
byCustom
)
?
mCustomColumnName
.
Equals
(
other
.
mCustomColumnName
)
:
mSortType
==
other
.
mSortType
;
}
...
...
@@ -4279,7 +4296,7 @@ nsresult nsMsgDBView::SaveSortInfo(nsMsgViewSortTypeValue sortType, nsMsgViewSor
// save off sort type and order, view type and flags
folderInfo
->
SetSortType
(
sortType
);
folderInfo
->
SetSortOrder
(
sortOrder
);
nsString
sortColumnsString
;
rv
=
EncodeColumnSort
(
sortColumnsString
);
NS_ENSURE_SUCCESS
(
rv
,
rv
);
...
...
@@ -4291,12 +4308,12 @@ nsresult nsMsgDBView::SaveSortInfo(nsMsgViewSortTypeValue sortType, nsMsgViewSor
PRInt32
nsMsgDBView
::
SecondarySort
(
nsMsgKey
key1
,
nsISupports
*
supports1
,
nsMsgKey
key2
,
nsISupports
*
supports2
,
viewSortInfo
*
comparisonContext
)
{
// we need to make sure that in the case of the secondary sort field also matching,
// we don't recurse
// we don't recurse
if
(
comparisonContext
->
isSecondarySort
)
return
key1
>
key2
;
nsCOMPtr
<
nsIMsgFolder
>
folder1
,
folder2
;
nsCOMPtr
<
nsIMsgDBHdr
>
hdr1
,
hdr2
;
folder1
=
do_QueryInterface
(
supports1
);
...
...
@@ -4313,14 +4330,20 @@ PRInt32 nsMsgDBView::SecondarySort(nsMsgKey key1, nsISupports *supports1, nsMsg
eFieldType
fieldType
;
nsMsgViewSortTypeValue
sortType
=
comparisonContext
->
view
->
m_secondarySort
;
nsMsgViewSortOrderValue
sortOrder
=
comparisonContext
->
view
->
m_secondarySortOrder
;
// The following may leave fieldType undefined.
// In this case, we can return 0 right away since
// it is the value returned in the default case of
// switch (fieldType) statement below.
rv
=
GetFieldTypeAndLenForSort
(
sortType
,
&
maxLen
,
&
fieldType
);
NS_ENSURE_SUCCESS
(
rv
,
0
);
const
void
*
pValue1
=
&
EntryInfo1
,
*
pValue2
=
&
EntryInfo2
;
int
(
*
comparisonFun
)
(
const
void
*
pItem1
,
const
void
*
pItem2
,
void
*
privateData
)
=
nsnull
;
int
retStatus
=
0
;
hdr1
->
GetMessageKey
(
&
EntryInfo1
.
id
);
hdr2
->
GetMessageKey
(
&
EntryInfo2
.
id
);
//check if a custom column handler exists. If it does then grab it and pass it in
//to either GetCollationKey or GetLongField - we need the custom column handler for
// the previous sort, if any.
...
...
@@ -4329,7 +4352,7 @@ PRInt32 nsMsgDBView::SecondarySort(nsMsgKey key1, nsISupports *supports1, nsMsg
comparisonContext
->
view
->
m_sortColumns
.
Length
()
>
1
)
colHandler
=
comparisonContext
->
view
->
m_sortColumns
[
1
].
mColHandler
;
switch
(
fieldType
)
{
case
kCollationKey
:
...
...
@@ -4360,11 +4383,11 @@ PRInt32 nsMsgDBView::SecondarySort(nsMsgKey key1, nsISupports *supports1, nsMsg
{
if
(
sortType
==
nsMsgViewSortType
::
byId
)
EntryInfo2
.
dword
=
EntryInfo2
.
id
;
else
else
GetLongField
(
hdr2
,
sortType
,
&
EntryInfo2
.
dword
,
colHandler
);
}
retStatus
=
(
*
comparisonFun
)(
&
pValue1
,
&
pValue2
,
comparisonContext
);
comparisonContext
->
isSecondarySort
=
PR_FALSE
;
comparisonContext
->
ascendingSort
=
saveAscendingSort
;
...
...
@@ -4384,7 +4407,7 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOr
// same as it ever was. do nothing
if
(
m_sortOrder
==
sortOrder
)
return
NS_OK
;
// for secondary sort, remember the sort order on a per column basis.
if
(
m_sortColumns
.
Length
())
m_sortColumns
[
0
].
mSortOrder
=
sortOrder
;
...
...
@@ -4415,7 +4438,7 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOr
PushSort
(
sortColumnInfo
);
}
if
(
m_sortColumns
.
Length
()
>
1
)
{
m_secondarySort
=
m_sortColumns
[
1
].
mSortType
;
...
...
@@ -4426,6 +4449,8 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOr
PRUint16
maxLen
;
eFieldType
fieldType
;
// If we did not obtain proper fieldType, it needs to be checked
// because the subsequent code does not handle it very well.
rv
=
GetFieldTypeAndLenForSort
(
sortType
,
&
maxLen
,
&
fieldType
);
NS_ENSURE_SUCCESS
(
rv
,
rv
);
...
...
@@ -4490,6 +4515,7 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOr
// could be a problem here if the ones that appear here are different than the ones already in the array
PRUint32
actualFieldLen
=
0
;
if
(
fieldType
==
kCollationKey
)
{
rv
=
GetCollationKey
(
msgHdr
,
sortType
,
&
keyValue
,
&
actualFieldLen
,
colHandler
);
...
...
@@ -4674,7 +4700,7 @@ nsMsgViewIndex nsMsgDBView::GetThreadIndex(nsMsgViewIndex msgIndex)
}
nsMsgViewIndex
nsMsgDBView
::
ThreadIndexOfMsgHdr
(
nsIMsgDBHdr
*
msgHdr
,
nsMsgDBView
::
ThreadIndexOfMsgHdr
(
nsIMsgDBHdr
*
msgHdr
,
nsMsgViewIndex
msgIndex
,
PRInt32
*
pThreadCount
,
PRUint32
*
pFlags
)
...
...
@@ -4899,7 +4925,7 @@ nsresult nsMsgDBView::ToggleExpansion(nsMsgViewIndex index, PRUint32 *numChanged
rv
=
ExpandByIndex
(
threadIndex
,
numChanged
);
else
rv
=
CollapseByIndex
(
threadIndex
,
numChanged
);
// if we collaps/uncollapse a thread, this changes the selected URIs
SelectionChanged
();
return
rv
;
...
...
@@ -5099,12 +5125,12 @@ NS_IMETHODIMP nsMsgDBView::GetThreadContainingIndex(nsMsgViewIndex index, nsIMsg
return
GetThreadContainingMsgHdr
(
msgHdr
,
resultThread
);
}
nsMsgViewIndex
nsMsgViewIndex
nsMsgDBView
::
GetIndexForThread
(
nsIMsgDBHdr
*
msgHdr
)
{
// Take advantage of the fact that we're already sorted
// and find the insert index via a binary search, though expanded threads
// make that tricky.
// make that tricky.
nsMsgViewIndex
highIndex
=
m_keys
.
Length
();
nsMsgViewIndex
lowIndex
=
0
;
...
...
@@ -5115,7 +5141,13 @@ nsMsgDBView::GetIndexForThread(nsIMsgDBHdr *msgHdr)
nsresult
rv
;
PRUint16
maxLen
;
eFieldType
fieldType
;
// The following may leave fieldType undefined.
// In this case, we can return highIndex right away since
// it is the value returned in the default case of
// switch (fieldType) statement below.
rv
=
GetFieldTypeAndLenForSort
(
m_sortType
,
&
maxLen
,
&
fieldType
);
NS_ENSURE_SUCCESS
(
rv
,
highIndex
);
const
void
*
pValue1
=
&
EntryInfo1
,
*
pValue2
=
&
EntryInfo2
;
int
retStatus
=
0
;
...
...
@@ -5163,7 +5195,7 @@ nsMsgDBView::GetIndexForThread(nsIMsgDBHdr *msgHdr)
EntryInfo2
.
id
=
m_keys
[
tryIndex
];
GetFolderForViewIndex
(
tryIndex
,
&
EntryInfo2
.
folder
);
EntryInfo2
.
folder
->
Release
();
nsCOMPtr
<
nsIMsgDBHdr
>
tryHdr
;
nsCOMPtr
<
nsIMsgDatabase
>
db
;
// ### this should get the db from the folder...
...
...
@@ -5230,7 +5262,13 @@ nsMsgViewIndex nsMsgDBView::GetInsertIndexHelper(nsIMsgDBHdr *msgHdr, nsTArray<n
nsresult
rv
;
PRUint16
maxLen
;
eFieldType
fieldType
;
// The following may leave fieldType undefined.
// In this case, we can return highIndex right away since
// it is the value returned in the default case of
// switch (fieldType) statement below.
rv
=
GetFieldTypeAndLenForSort
(
sortType
,
&
maxLen
,
&
fieldType
);
NS_ENSURE_SUCCESS
(
rv
,
highIndex
);
const
void
*
pValue1
=
&
EntryInfo1
,
*
pValue2
=
&
EntryInfo2
;
int
(
*
comparisonFun
)
(
const
void
*
pItem1
,
const
void
*
pItem2
,
void
*
privateData
)
=
nsnull
;
...
...
@@ -5271,7 +5309,7 @@ nsMsgViewIndex nsMsgDBView::GetInsertIndexHelper(nsIMsgDBHdr *msgHdr, nsTArray<n
nsMsgViewIndex
tryIndex
=
(
lowIndex
+
highIndex
-
1
)
/
2
;
EntryInfo2
.
id
=
keys
[
tryIndex
];
EntryInfo2
.
folder
=
folders
?
folders
->
ObjectAt
(
tryIndex
)
:
m_folder
.
get
();
nsCOMPtr
<
nsIMsgDBHdr
>
tryHdr
;
EntryInfo2
.
folder
->
GetMessageHeader
(
EntryInfo2
.
id
,
getter_AddRefs
(
tryHdr
));
if
(
!
tryHdr
)
...
...
@@ -5491,8 +5529,8 @@ nsresult nsMsgDBView::ListIdsInThreadOrder(nsIMsgThread *threadHdr, nsMsgKey par
bool
nsMsgDBView
::
InsertEmptyRows
(
nsMsgViewIndex
viewIndex
,
PRInt32
numRows
)
{
return
m_keys
.
InsertElementsAt
(
viewIndex
,
numRows
,
0
)
&&
m_flags
.
InsertElementsAt
(
viewIndex
,
numRows
,
0
)
&&
m_levels
.
InsertElementsAt
(
viewIndex
,
numRows
,
1
);
m_flags
.
InsertElementsAt
(
viewIndex
,
numRows
,
0
)
&&
m_levels
.
InsertElementsAt
(
viewIndex
,
numRows
,
1
);
}
void
nsMsgDBView
::
RemoveRows
(
nsMsgViewIndex
viewIndex
,
PRInt32
numRows
)
...
...
@@ -5632,7 +5670,7 @@ PRInt32 nsMsgDBView::FindLevelInThread(nsIMsgDBHdr *msgHdr, nsMsgViewIndex start
}
// ### Can this be combined with GetIndexForThread??
nsMsgViewIndex
nsMsgViewIndex
nsMsgDBView
::
GetThreadRootIndex
(
nsIMsgDBHdr
*
msgHdr
)
{
if
(
!
msgHdr
)
...
...
@@ -5653,7 +5691,13 @@ nsMsgDBView::GetThreadRootIndex(nsIMsgDBHdr *msgHdr)
nsresult
rv
;
PRUint16
maxLen
;
eFieldType
fieldType
;
// The following may leave fieldType undefined.
// In this case, we can return highIndex right away since
// it is the value returned in the default case of
// switch (fieldType) statement below.
rv
=
GetFieldTypeAndLenForSort
(
m_sortType
,
&
maxLen
,
&
fieldType
);
NS_ENSURE_SUCCESS
(
rv
,
highIndex
);
const
void
*
pValue1
=
&
EntryInfo1
,
*
pValue2
=
&
EntryInfo2
;
int
retStatus
=
0
;
...
...
@@ -5701,7 +5745,7 @@ nsMsgDBView::GetThreadRootIndex(nsIMsgDBHdr *msgHdr)
EntryInfo2
.
id
=
m_keys
[
tryIndex
];
GetFolderForViewIndex
(
tryIndex
,
&
EntryInfo2
.
folder
);
EntryInfo2
.
folder
->
Release
();
nsCOMPtr
<
nsIMsgDBHdr
>
tryHdr
;
nsCOMPtr
<
nsIMsgDatabase
>
db
;
// ### this should get the db from the folder...
...
...
@@ -5780,7 +5824,9 @@ void nsMsgDBView::InitEntryInfoForIndex(nsMsgViewIndex i, IdKeyPtr &EntryInfo)
nsresult
rv
;
PRUint16
maxLen
;
eFieldType
fieldType
;
// The following may leave fieldType undefined.
rv
=
GetFieldTypeAndLenForSort
(
m_sortType
,
&
maxLen
,
&
fieldType
);
NS_ASSERTION
(
NS_SUCCEEDED
(
rv
),
"failed to obtain fieldType"
);
nsCOMPtr
<
nsIMsgDBHdr
>
msgHdr
;
GetMsgHdrForViewIndex
(
i
,
getter_AddRefs
(
msgHdr
));
...
...
@@ -5819,7 +5865,13 @@ void nsMsgDBView::ValidateSort()
PRUint16
maxLen
;
eFieldType
fieldType
;
GetFieldTypeAndLenForSort
(
m_sortType
,
&
maxLen
,
&
fieldType
);
// It is not entirely clear what we should do since,
// if fieldType is not available, there is no way to know
// how to compare the field to check for sorting.
// So we bomb out here. It is OK since this is debug code
// inside #ifdef DEBUG_David_Bienvenu
rv
=
GetFieldTypeAndLenForSort
(
m_sortType
,
&
maxLen
,
&
fieldType
);
NS_ASSERTION
(
NS_SUCCEEDED
(
rv
),
"failed to obtain fieldType"
);
viewSortInfo
comparisonContext
;
comparisonContext
.
view
=
this
;
...
...
@@ -5982,7 +6034,7 @@ NS_IMETHODIMP nsMsgDBView::OnHdrAdded(nsIMsgDBHdr *aHdrChanged, nsMsgKey aParent
}
NS_IMETHODIMP
nsMsgDBView
::
OnHdrPropertyChanged
(
nsIMsgDBHdr
*
aHdrToChange
,
bool
aPreChange
,
PRUint32
*
aStatus
,
nsMsgDBView
::
OnHdrPropertyChanged
(
nsIMsgDBHdr
*
aHdrToChange
,
bool
aPreChange
,
PRUint32
*
aStatus
,
nsIDBChangeListener
*
aInstigator
)
{
if
(
aPreChange
)
...
...
@@ -6935,7 +6987,7 @@ nsresult nsMsgDBView::SetSubthreadKilled(nsIMsgDBHdr *header, nsMsgViewIndex msg
rv
=
m_db
->
MarkHeaderKilled
(
header
,
ignored
,
this
);
NS_ENSURE_SUCCESS
(
rv
,
rv
);
if
(
ignored
)
{
nsCOMPtr
<
nsIMsgThread
>
thread
;
...
...
@@ -6963,10 +7015,10 @@ nsresult nsMsgDBView::SetSubthreadKilled(nsIMsgDBHdr *header, nsMsgViewIndex msg
{
nsCOMPtr
<
nsIMsgDBHdr
>
nextHdr
;
bool
isKilled
;
thread
->
GetChildHdrAt
(
current
,
getter_AddRefs
(
nextHdr
));
nextHdr
->
GetIsKilled
(
&
isKilled
);
// Ideally, the messages should stop processing here.
// However, the children are ordered not by thread...
if
(
isKilled
)
...
...
@@ -7052,7 +7104,7 @@ NS_IMETHODIMP nsMsgDBView::GetNumMsgsInView(PRInt32 *aNumMsgs)
NS_ERROR_FAILURE
;
}
/**
* @note For the IMAP delete model, this applies to both deleting and
* @note For the IMAP delete model, this applies to both deleting and
* undeleting a message.
*/
NS_IMETHODIMP
...
...
@@ -7079,7 +7131,7 @@ nsMsgDBView::GetMsgToSelectAfterDelete(nsMsgViewIndex *msgToSelectAfterDelete)
{
rv
=
mTreeSelection
->
GetRangeAt
(
i
,
&
startRange
,
&
endRange
);
// save off the first range in case we need it later
// save off the first range in case we need it later
if
(
i
==
0
)
{
startFirstRange
=
startRange
;
endFirstRange
=
endRange
;
...
...
@@ -7087,7 +7139,7 @@ nsMsgDBView::GetMsgToSelectAfterDelete(nsMsgViewIndex *msgToSelectAfterDelete)
// If the tree selection is goofy (eg adjacent or overlapping ranges),
// complain about it, but don't try and cope. Just live with the fact
// that one of the deleted messages is going to end up selected.
NS_WARN_IF_FALSE
(
endFirstRange
!=
startRange
,
NS_WARN_IF_FALSE
(
endFirstRange
!=
startRange
,
"goofy tree selection state: two ranges are adjacent!"
);
}
*
msgToSelectAfterDelete
=
NS_MIN
(
*
msgToSelectAfterDelete
,
...
...
@@ -7271,7 +7323,7 @@ bool nsMsgDBView::OfflineMsgSelected(nsMsgViewIndex * indices, PRInt32 numIndice
bool
nsMsgDBView
::
NonDummyMsgSelected
(
nsMsgViewIndex
*
indices
,
PRInt32
numIndices
)
{
bool
includeCollapsedMsgs
=
OperateOnMsgsInCollapsedThreads
();
for
(
nsMsgViewIndex
index
=
0
;
index
<
(
nsMsgViewIndex
)
numIndices
;
index
++
)
{
PRUint32
flags
=
m_flags
[
indices
[
index
]];
...
...
mozilla/accessible/src/base/nsDocAccessible.cpp
View file @
c45eb8dc
...
...
@@ -1818,6 +1818,23 @@ nsDocAccessible::UpdateTree(nsAccessible* aContainer, nsIContent* aChildNode,
if
(
child
)
{
updateFlags
|=
UpdateTreeInternal
(
child
,
aIsInsert
);
// XXX: since select change insertion point of option contained by optgroup
// then we need to have special processing for them (bug 690417).
if
(
!
aIsInsert
&&
aChildNode
->
IsHTML
(
nsGkAtoms
::
optgroup
)
&&
aContainer
->
GetContent
()
->
IsHTML
(
nsGkAtoms
::
select
))
{
for
(
nsIContent
*
optContent
=
aChildNode
->
GetFirstChild
();
optContent
;
optContent
=
optContent
->
GetNextSibling
())
{
if
(
optContent
->
IsHTML
(
nsGkAtoms
::
option
))
{
nsAccessible
*
option
=
GetAccessible
(
optContent
);
if
(
option
)
{
NS_ASSERTION
(
option
->
Parent
()
==
aContainer
,
"Not expected hierarchy on HTML select!"
);
if
(
option
->
Parent
()
==
aContainer
)
updateFlags
|=
UpdateTreeInternal
(
option
,
aIsInsert
);
}
}
}
}
}
else
{
nsAccTreeWalker
walker
(
mWeakShell
,
aChildNode
,
aContainer
->
GetAllowsAnonChildAccessibles
(),
true
);
...
...
mozilla/browser/app/blocklist.xml
View file @
c45eb8dc
<?xml version="1.0"?>
<blocklist
xmlns=
"http://www.mozilla.org/2006/addons-blocklist"
lastupdate=
"1352
136253
000"
>
<blocklist
xmlns=
"http://www.mozilla.org/2006/addons-blocklist"
lastupdate=
"1352
745754
000"
>
<emItems>
<emItem
blockID=
"i58"
id=
"webmaster@buzzzzvideos.info"
>
<versionRange
minVersion=
"0"
maxVersion=
"*"
>
...
...
@@ -511,14 +511,14 @@
<pluginItem
blockID=
"p176"
>
<match
name=
"filename"
exp=
"(NPSWF32\.dll)|(Flash\ Player\.plugin)"
/>
<versionRange
minVersion=
"0"
maxVersion=
"10.3.183.18.999"
severity=
"0"
vulnerabilitystatus=
"1"
>
<targetApplication
id=
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
>
<versionRange
minVersion=
"1
7
.0"
maxVersion=
"*"
/>
<versionRange
minVersion=
"1
8
.0
a1
"
maxVersion=
"*"
/>
</targetApplication>
</versionRange>
</pluginItem>
<pluginItem
blockID=
"p178"
>
<match
name=
"filename"
exp=
"(NPSWF[0-9_]*\.dll)|(Flash\ Player\.plugin)"
/>
<versionRange
minVersion=
"11.0"
maxVersion=
"11.4.402.286.999"
severity=
"0"
vulnerabilitystatus=
"1"
>
<targetApplication
id=
"{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
>
<versionRange
minVersion=
"1
7
.0"
maxVersion=
"*"
/>
<versionRange
minVersion=
"1
8
.0
a1
"
maxVersion=
"*"
/>
</targetApplication>
</versionRange>
</pluginItem>
...
...
@@ -582,6 +582,12 @@
<gfxBlacklistEntry
blockID=
"g150"
>
<os>
All
</os>
<vendor>
0x1002
</vendor>
<feature>
DIRECT3D_9_LAYERS
</feature>
<featureStatus>
BLOCKED_DRIVER_VERSION
</featureStatus>
<driverVersion>
8.982.0.0
</driverVersion>
<driverVersionComparator>
EQUAL
</driverVersionComparator>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g192"
>
<os>
WINNT 6.2
</os>
<vendor>
0x1002
</vendor>
<feature>
DIRECT2D
</feature>
<featureStatus>
BLOCKED_DRIVER_VERSION
</featureStatus>
<driverVersion>
9.10.8.0
</driverVersion>
<driverVersionComparator>
LESS_THAN_OR_EQUAL
</driverVersionComparator>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g194"
>
<os>
WINNT 6.2
</os>
<vendor>
0x1022
</vendor>
<feature>
DIRECT2D
</feature>
<featureStatus>
BLOCKED_DRIVER_VERSION
</featureStatus>
<driverVersion>
9.10.8.0
</driverVersion>
<driverVersionComparator>
LESS_THAN_OR_EQUAL
</driverVersionComparator>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g198"
>
<os>
Darwin 10
</os>
<vendor>
0x10de
</vendor>
<feature>
WEBGL_MSAA
</feature>
<featureStatus>
BLOCKED_DEVICE
</featureStatus>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g200"
>
<os>
Darwin 11
</os>
<vendor>
0x10de
</vendor>
<featureStatus>
WEBGL_MSAA
</featureStatus>
<driverVersion>
BLOCKED_DEVICE
</driverVersion>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g202"
>
<os>
Darwin 12
</os>
<vendor>
0x10de
</vendor>
<feature>
WEBGL_MSAA
</feature>
<featureStatus>
BLOCKED_DEVICE
</featureStatus>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g204"
>
<os>
Darwin 10
</os>
<vendor>
0x8086
</vendor>
<feature>
WEBGL_MSAA
</feature>
<featureStatus>
BLOCKED_DEVICE
</featureStatus>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g206"
>
<os>
Darwin 11
</os>
<vendor>
0x8086
</vendor>
<feature>
WEBGL_MSAA
</feature>
<featureStatus>
BLOCKED_DEVICE
</featureStatus>
</gfxBlacklistEntry>
<gfxBlacklistEntry
blockID=
"g208"
>
<os>
Darwin 12
</os>
<vendor>
0x8086
</vendor>
<feature>
WEBGL_MSAA
</feature>
<featureStatus>
BLOCKED_DEVICE
</featureStatus>
</gfxBlacklistEntry>
</gfxItems>
...
...
mozilla/browser/base/content/browser.js
View file @
c45eb8dc
...
...
@@ -2520,6 +2520,10 @@ function URLBarSetURI(aURI) {
if
(
value
==
null
)
{
let
uri
=
aURI
||
getWebNavigation
().
currentURI
;
// Strip off "wyciwyg://" and passwords for the location bar
try
{
uri
=
Services
.
uriFixup
.
createExposableURI
(
uri
);
}
catch
(
e
)
{}
// Replace initial page URIs with an empty string
// only if there's no opener (bug 370555).
...
...
@@ -4695,12 +4699,7 @@ var XULBrowserWindow = {
}
if
(
gURLBar
)
{
// Strip off "wyciwyg://" and passwords for the location bar
let
uri
=
aLocationURI
;
try
{
uri
=
this
.
_uriFixup
.
createExposableURI
(
uri
);
}
catch
(
e
)
{}
URLBarSetURI
(
uri
);
URLBarSetURI
(
aLocationURI
);
// Update starring UI
PlacesStarButton
.
updateState
();
...
...
mozilla/browser/base/content/test/Makefile.in
View file @
c45eb8dc
...
...
@@ -258,6 +258,7 @@ _BROWSER_FILES = \
browser_middleMouse_inherit.js
\
browser_tabDrop.js
\
browser_bug734076.js
\
browser_URLBarSetURI.js
\
$(NULL)
ifneq
(cocoa,$(MOZ_WIDGET_TOOLKIT))
...
...
mozilla/browser/base/content/test/browser_URLBarSetURI.js
0 → 100644
View file @
c45eb8dc
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
function
test
()
{
waitForExplicitFinish
();
// avoid prompting about phishing
Services
.
prefs
.
setIntPref
(
phishyUserPassPref
,
32
);
registerCleanupFunction
(
function
()
{
Services
.
prefs
.
clearUserPref
(
phishyUserPassPref
);
});
nextTest
();
}
const
phishyUserPassPref
=
"
network.http.phishy-userpass-length
"
;
function
nextTest
()
{
let
test
=
tests
.
shift
();
if
(
test
)
{
test
(
function
()
{
executeSoon
(
nextTest
);
});
}
else
{
executeSoon
(
finish
);
}
}
let
tests
=
[
function
revert
(
next
)
{
loadTabInWindow
(
window
,
function
(
tab
)
{
gURLBar
.
handleRevert
();
is
(
gURLBar
.
value
,
"
example.com
"
,
"
URL bar had user/pass stripped after reverting
"
);
gBrowser
.
removeTab
(
tab
);
next
();
});
}
];
function
loadTabInWindow
(
win
,
callback
)
{
info
(
"
Loading tab
"
);
let
url
=
"
http://user:pass@example.com/
"
;
let
tab
=
win
.
gBrowser
.
selectedTab
=
win
.
gBrowser
.
addTab
(
url
);
tab
.
linkedBrowser
.
addEventListener
(
"
load
"
,
function
listener
()
{
info
(
"
Tab loaded
"
);
if
(
tab
.
linkedBrowser
.
currentURI
.
spec
!=
url
)
return
;
tab
.
linkedBrowser
.
removeEventListener
(
"
load
"
,
listener
,
true
);
is
(
win
.
gURLBar
.
value
,
"
example.com
"
,
"
URL bar had user/pass stripped initially
"
);
callback
(
tab
);
},
true
);
}
mozilla/browser/config/version.txt
View file @
c45eb8dc
10.0.11
10.0.11
esrpre
mozilla/config/milestone.txt
View file @
c45eb8dc
...
...
@@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
10.0.1
1
10.0.1
2
mozilla/content/base/src/nsDocumentEncoder.cpp
View file @
c45eb8dc
...
...
@@ -1152,12 +1152,18 @@ nsDocumentEncoder::EncodeToStream(nsIOutputStream* aStream)
NS_ENSURE_SUCCESS
(
rv
,
rv
);
}
mStream
=
aStream
;
bool
chromeCaller
=
nsContentUtils
::
IsCallerChrome
();
if
(
chromeCaller
)
{
mStream
=
aStream
;
}
nsAutoString
buf
;
rv
=
EncodeToString
(
buf
);
if
(
!
chromeCaller
)
{