зеркало из https://github.com/mozilla/pjs.git
Bustage fixes for bug 221316 no longer needed thanks to bug 221525.
This commit is contained in:
Родитель
770f0634e4
Коммит
831e32541e
|
@ -1221,24 +1221,19 @@ nsHTMLDocument::InternalAddStyleSheet(nsIStyleSheet* aSheet, PRUint32 aFlags)
|
|||
{
|
||||
if (aSheet == mAttrStyleSheet) { // always first
|
||||
NS_ASSERTION(mStyleSheets.Count() == 0 ||
|
||||
mAttrStyleSheet !=
|
||||
NS_STATIC_CAST(nsIStyleSheet*, mStyleSheets[0]),
|
||||
mAttrStyleSheet != mStyleSheets[0],
|
||||
"Adding attr sheet twice!");
|
||||
mStyleSheets.InsertObjectAt(aSheet, 0);
|
||||
}
|
||||
else if (aSheet == mStyleAttrStyleSheet) { // always last
|
||||
NS_ASSERTION(mStyleSheets.Count() == 0 ||
|
||||
NS_STATIC_CAST(nsIStyleSheet*,
|
||||
mStyleSheets[mStyleSheets.Count() - 1]) !=
|
||||
mStyleAttrStyleSheet,
|
||||
mStyleSheets[mStyleSheets.Count() - 1] != mStyleAttrStyleSheet,
|
||||
"Adding style attr sheet twice!");
|
||||
mStyleSheets.AppendObject(aSheet);
|
||||
}
|
||||
else {
|
||||
PRInt32 count = mStyleSheets.Count();
|
||||
if (count != 0 &&
|
||||
mStyleAttrStyleSheet ==
|
||||
NS_STATIC_CAST(nsIStyleSheet*, mStyleSheets[count - 1])) {
|
||||
if (count != 0 && mStyleAttrStyleSheet == mStyleSheets[count - 1]) {
|
||||
// keep attr sheet last
|
||||
mStyleSheets.InsertObjectAt(aSheet, count - 1);
|
||||
}
|
||||
|
@ -1287,9 +1282,7 @@ PRInt32
|
|||
nsHTMLDocument::InternalGetNumberOfStyleSheets()
|
||||
{
|
||||
PRInt32 count = mStyleSheets.Count();
|
||||
if (count != 0 &&
|
||||
mStyleAttrStyleSheet ==
|
||||
NS_STATIC_CAST(nsIStyleSheet*, mStyleSheets[count - 1]))
|
||||
if (count != 0 && mStyleAttrStyleSheet == mStyleSheets[count - 1])
|
||||
--count;
|
||||
--count; // for the attr sheet
|
||||
NS_ASSERTION(count >= 0, "Why did we end up with a negative count?");
|
||||
|
|
Загрузка…
Ссылка в новой задаче