Merge last green changeset of mozilla-inbound to mozilla-central

This commit is contained in:
Ed Morley 2011-11-15 19:07:09 +00:00
Родитель 4aa0f5d48d f9080f5287
Коммит 4c050d1ea6
25 изменённых файлов: 239 добавлений и 238 удалений

10
.gitignore поставляемый
Просмотреть файл

@ -13,11 +13,11 @@ ID
.*.sw[a-z]
# User files that may appear at the root
.mozconfig
mozconfig
configure
config.cache
config.log
/.mozconfig*
/mozconfig
/configure
/config.cache
/config.log
# Empty marker file that's generated when we check out NSS
security/manager/.nss.checkout

Просмотреть файл

@ -52,7 +52,6 @@ import sys
import threading
import tempfile
import sqlite3
import zipfile
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
sys.path.insert(0, SCRIPT_DIR)
@ -98,69 +97,6 @@ _log.setLevel(logging.INFO)
_log.addHandler(handler)
class ZipFileReader(object):
"""
Class to read zip files in Python 2.5 and later. Limited to only what we
actually use.
"""
def __init__(self, filename):
self._zipfile = zipfile.ZipFile(filename, "r")
def __del__(self):
self._zipfile.close()
def _getnormalizedpath(self, path):
"""
Gets a normalized path from 'path' (or the current working directory if
'path' is None). Also asserts that the path exists.
"""
if path is None:
path = os.curdir
path = os.path.normpath(os.path.expanduser(path))
assert os.path.isdir(path)
return path
def _extractname(self, name, path):
"""
Extracts a file with the given name from the zip file to the given path.
Also creates any directories needed along the way.
"""
filename = os.path.normpath(os.path.join(path, name))
if name.endswith("/"):
os.makedirs(filename)
else:
path = os.path.split(filename)[0]
if not os.path.isdir(path):
os.makedirs(path)
with open(filename, "wb") as dest:
dest.write(self._zipfile.read(name))
def namelist(self):
return self._zipfile.namelist()
def read(self, name):
return self._zipfile.read(name)
def extract(self, name, path = None):
if hasattr(self._zipfile, "extract"):
return self._zipfile.extract(name, path)
# This will throw if name is not part of the zip file.
self._zipfile.getinfo(name)
self._extractname(name, self._getnormalizedpath(path))
def extractall(self, path = None):
if hasattr(self._zipfile, "extractall"):
return self._zipfile.extractall(path)
path = self._getnormalizedpath(path)
for name in self._zipfile.namelist():
self._extractname(name, path)
#################
# PROFILE SETUP #
#################
@ -1053,7 +989,7 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
os.makedirs(extensionsRootDir)
if os.path.isfile(extensionSource):
reader = ZipFileReader(extensionSource)
reader = automationutils.ZipFileReader(extensionSource)
for filename in reader.namelist():
# Sanity check the zip file.

Просмотреть файл

@ -36,11 +36,13 @@
#
# ***** END LICENSE BLOCK ***** */
import glob, logging, os, platform, shutil, subprocess, sys
from __future__ import with_statement
import glob, logging, os, platform, shutil, subprocess, sys, tempfile, urllib2, zipfile
import re
from urlparse import urlparse
__all__ = [
"ZipFileReader",
"addCommonOptions",
"checkForCrashes",
"dumpLeakLog",
@ -70,6 +72,68 @@ DEBUGGER_INFO = {
}
}
class ZipFileReader(object):
"""
Class to read zip files in Python 2.5 and later. Limited to only what we
actually use.
"""
def __init__(self, filename):
self._zipfile = zipfile.ZipFile(filename, "r")
def __del__(self):
self._zipfile.close()
def _getnormalizedpath(self, path):
"""
Gets a normalized path from 'path' (or the current working directory if
'path' is None). Also asserts that the path exists.
"""
if path is None:
path = os.curdir
path = os.path.normpath(os.path.expanduser(path))
assert os.path.isdir(path)
return path
def _extractname(self, name, path):
"""
Extracts a file with the given name from the zip file to the given path.
Also creates any directories needed along the way.
"""
filename = os.path.normpath(os.path.join(path, name))
if name.endswith("/"):
os.makedirs(filename)
else:
path = os.path.split(filename)[0]
if not os.path.isdir(path):
os.makedirs(path)
with open(filename, "wb") as dest:
dest.write(self._zipfile.read(name))
def namelist(self):
return self._zipfile.namelist()
def read(self, name):
return self._zipfile.read(name)
def extract(self, name, path = None):
if hasattr(self._zipfile, "extract"):
return self._zipfile.extract(name, path)
# This will throw if name is not part of the zip file.
self._zipfile.getinfo(name)
self._extractname(name, self._getnormalizedpath(path))
def extractall(self, path = None):
if hasattr(self._zipfile, "extractall"):
return self._zipfile.extractall(path)
path = self._getnormalizedpath(path)
for name in self._zipfile.namelist():
self._extractname(name, path)
log = logging.getLogger()
def isURL(thing):
@ -102,7 +166,6 @@ def addCommonOptions(parser, defaults={}):
def checkForCrashes(dumpDir, symbolsPath, testName=None):
stackwalkPath = os.environ.get('MINIDUMP_STACKWALK', None)
stackwalkCGI = os.environ.get('MINIDUMP_STACKWALK_CGI', None)
# try to get the caller's filename if no test name is given
if testName is None:
try:
@ -110,70 +173,70 @@ def checkForCrashes(dumpDir, symbolsPath, testName=None):
except:
testName = "unknown"
foundCrash = False
# Check preconditions
dumps = glob.glob(os.path.join(dumpDir, '*.dmp'))
for d in dumps:
log.info("PROCESS-CRASH | %s | application crashed (minidump found)", testName)
print "Crash dump filename: " + d
if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath):
p = subprocess.Popen([stackwalkPath, d, symbolsPath],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
(out, err) = p.communicate()
if len(out) > 3:
# minidump_stackwalk is chatty, so ignore stderr when it succeeds.
print out
else:
print "stderr from minidump_stackwalk:"
print err
if p.returncode != 0:
print "minidump_stackwalk exited with return code %d" % p.returncode
elif stackwalkCGI and symbolsPath and isURL(symbolsPath):
f = None
try:
f = open(d, "rb")
sys.path.append(os.path.join(os.path.dirname(__file__), "poster.zip"))
from poster.encode import multipart_encode
from poster.streaminghttp import register_openers
import urllib2
register_openers()
datagen, headers = multipart_encode({"minidump": f,
"symbols": symbolsPath})
request = urllib2.Request(stackwalkCGI, datagen, headers)
result = urllib2.urlopen(request).read()
if len(result) > 3:
print result
if len(dumps) == 0:
return False
foundCrash = False
removeSymbolsPath = False
# If our symbols are at a remote URL, download them now
if isURL(symbolsPath):
print "Downloading symbols from: " + symbolsPath
removeSymbolsPath = True
# Get the symbols and write them to a temporary zipfile
data = urllib2.urlopen(symbolsPath)
symbolsFile = tempfile.TemporaryFile()
symbolsFile.write(data.read())
# extract symbols to a temporary directory (which we'll delete after
# processing all crashes)
symbolsPath = tempfile.mkdtemp()
zfile = ZipFileReader(symbolsFile)
zfile.extractall(symbolsPath)
try:
for d in dumps:
log.info("PROCESS-CRASH | %s | application crashed (minidump found)", testName)
print "Crash dump filename: " + d
if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath):
# run minidump stackwalk
p = subprocess.Popen([stackwalkPath, d, symbolsPath],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
(out, err) = p.communicate()
if len(out) > 3:
# minidump_stackwalk is chatty, so ignore stderr when it succeeds.
print out
else:
print "stackwalkCGI returned nothing."
finally:
if f:
f.close()
else:
if not symbolsPath:
print "No symbols path given, can't process dump."
if not stackwalkPath and not stackwalkCGI:
print "Neither MINIDUMP_STACKWALK nor MINIDUMP_STACKWALK_CGI is set, can't process dump."
print "stderr from minidump_stackwalk:"
print err
if p.returncode != 0:
print "minidump_stackwalk exited with return code %d" % p.returncode
else:
if stackwalkPath and not os.path.exists(stackwalkPath):
if not symbolsPath:
print "No symbols path given, can't process dump."
if not stackwalkPath:
print "MINIDUMP_STACKWALK not set, can't process dump."
elif stackwalkPath and not os.path.exists(stackwalkPath):
print "MINIDUMP_STACKWALK binary not found: %s" % stackwalkPath
elif stackwalkCGI and not isURL(stackwalkCGI):
print "MINIDUMP_STACKWALK_CGI is not a URL: %s" % stackwalkCGI
elif symbolsPath and not isURL(symbolsPath):
print "symbolsPath is not a URL: %s" % symbolsPath
dumpSavePath = os.environ.get('MINIDUMP_SAVE_PATH', None)
if dumpSavePath:
shutil.move(d, dumpSavePath)
print "Saved dump as %s" % os.path.join(dumpSavePath,
os.path.basename(d))
else:
os.remove(d)
extra = os.path.splitext(d)[0] + ".extra"
if os.path.exists(extra):
os.remove(extra)
foundCrash = True
dumpSavePath = os.environ.get('MINIDUMP_SAVE_PATH', None)
if dumpSavePath:
shutil.move(d, dumpSavePath)
print "Saved dump as %s" % os.path.join(dumpSavePath,
os.path.basename(d))
else:
os.remove(d)
extra = os.path.splitext(d)[0] + ".extra"
if os.path.exists(extra):
os.remove(extra)
foundCrash = True
finally:
if removeSymbolsPath:
shutil.rmtree(symbolsPath)
return foundCrash
def getFullPath(directory, path):
"Get an absolute path relative to 'directory'."
return os.path.normpath(os.path.join(directory, os.path.expanduser(path)))

Двоичные данные
build/poster.zip

Двоичный файл не отображается.

Просмотреть файл

@ -427,7 +427,7 @@ nsSVGPathElement::ConstructPath(gfxContext *aCtx)
}
gfxFloat
nsSVGPathElement::GetScale()
nsSVGPathElement::GetPathLengthScale()
{
if (mPathLength.IsExplicitlySet()) {

Просмотреть файл

@ -98,7 +98,12 @@ public:
return nsGkAtoms::d;
}
gfxFloat GetScale();
/**
* Gets the ratio of the actual path length to the content author's estimated
* length (as provided by the <path> element's 'pathLength' attribute). This
* is used to scale stroke dashing, and to scale offsets along a textPath.
*/
gfxFloat GetPathLengthScale();
protected:

Просмотреть файл

@ -287,16 +287,27 @@ nsDOMStorageManager::Initialize()
if (!os)
return NS_OK;
os->AddObserver(gStorageManager, "cookie-changed", false);
os->AddObserver(gStorageManager, "offline-app-removed", false);
os->AddObserver(gStorageManager, NS_PRIVATE_BROWSING_SWITCH_TOPIC, false);
os->AddObserver(gStorageManager, "profile-after-change", false);
os->AddObserver(gStorageManager, "perm-changed", false);
os->AddObserver(gStorageManager, "browser:purge-domain-data", false);
nsresult rv;
rv = os->AddObserver(gStorageManager, "cookie-changed", false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, "offline-app-removed", false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, NS_PRIVATE_BROWSING_SWITCH_TOPIC,
false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, "profile-after-change", false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, "perm-changed", false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, "browser:purge-domain-data", false);
NS_ENSURE_SUCCESS(rv, rv);
// Used for temporary table flushing
os->AddObserver(gStorageManager, "profile-before-change", false);
os->AddObserver(gStorageManager, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
os->AddObserver(gStorageManager, NS_DOMSTORAGE_FLUSH_TIMER_TOPIC, false);
rv = os->AddObserver(gStorageManager, "profile-before-change", false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, NS_XPCOM_SHUTDOWN_OBSERVER_ID, false);
NS_ENSURE_SUCCESS(rv, rv);
rv = os->AddObserver(gStorageManager, NS_DOMSTORAGE_FLUSH_TIMER_TOPIC, false);
NS_ENSURE_SUCCESS(rv, rv);
return NS_OK;
}

Просмотреть файл

@ -358,7 +358,9 @@ abstract public class GeckoApp
} catch (Exception e) {
Log.e(LOG_FILE_NAME, "top level exception", e);
StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw));
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.flush();
GeckoAppShell.reportJavaCrash(sw.toString());
}
// resetting this is kinda pointless, but oh well

Просмотреть файл

@ -346,7 +346,7 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
// If animation mode is "loop once", it's time to stop animating
if (mAnimationMode == kLoopOnceAnimMode || mLoopCount == 0) {
mAnimationFinished = PR_TRUE;
mAnimationFinished = true;
EvaluateAnimation();
}
@ -383,7 +383,7 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
}
if (!(timeout > 0)) {
mAnimationFinished = PR_TRUE;
mAnimationFinished = true;
EvaluateAnimation();
}
@ -404,13 +404,13 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
nextFrame, nextFrameIndex))) {
// something went wrong, move on to next
NS_WARNING("RasterImage::AdvanceFrame(): Compositing of frame failed");
nextFrame->SetCompositingFailed(PR_TRUE);
nextFrame->SetCompositingFailed(true);
mAnim->currentAnimationFrameIndex = nextFrameIndex;
mAnim->currentAnimationFrameTime = aTime;
return false;
}
nextFrame->SetCompositingFailed(PR_FALSE);
nextFrame->SetCompositingFailed(false);
}
// Set currentAnimationFrameIndex at the last possible moment

Просмотреть файл

@ -124,10 +124,10 @@ jsd_ThrowHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
void* hookData;
if( ! jsdc || ! jsdc->inited )
return JSD_HOOK_RETURN_CONTINUE_THROW;
return JSTRAP_CONTINUE;
if( JSD_IS_DANGEROUS_THREAD(jsdc) )
return JSD_HOOK_RETURN_CONTINUE_THROW;
return JSTRAP_CONTINUE;
/* local in case jsdc->throwHook gets cleared on another thread */
JSD_LOCK();
@ -135,13 +135,13 @@ jsd_ThrowHandler(JSContext *cx, JSScript *script, jsbytecode *pc,
hookData = jsdc->throwHookData;
JSD_UNLOCK();
if (!hook)
return JSD_HOOK_RETURN_CONTINUE_THROW;
return JSTRAP_CONTINUE;
JSD_LOCK_SCRIPTS(jsdc);
jsdscript = jsd_FindOrCreateJSDScript(jsdc, cx, script, NULL);
JSD_UNLOCK_SCRIPTS(jsdc);
if( ! jsdscript )
return JSD_HOOK_RETURN_CONTINUE_THROW;
return JSTRAP_CONTINUE;
JS_GetPendingException(cx, rval);

Просмотреть файл

@ -49,6 +49,8 @@
#include "nsImageFrame.h"
#include "nsRenderingContext.h"
#include "mozilla/Preferences.h"
#ifdef DEBUG
#include <stdio.h>
#endif
@ -470,6 +472,27 @@ FrameLayerBuilder::DisplayItemDataEntry::HasNonEmptyContainerLayer()
return false;
}
void
FrameLayerBuilder::FlashPaint(gfxContext *aContext)
{
static bool sPaintFlashingEnabled;
static bool sPaintFlashingPrefCached = false;
if (!sPaintFlashingPrefCached) {
sPaintFlashingPrefCached = true;
mozilla::Preferences::AddBoolVarCache(&sPaintFlashingEnabled,
"nglayout.debug.paint_flashing");
}
if (sPaintFlashingEnabled) {
float r = float(rand()) / RAND_MAX;
float g = float(rand()) / RAND_MAX;
float b = float(rand()) / RAND_MAX;
aContext->SetColor(gfxRGBA(r, g, b, 0.2));
aContext->Paint();
}
}
/* static */ nsTArray<FrameLayerBuilder::DisplayItemData>*
FrameLayerBuilder::GetDisplayItemDataArrayForFrame(nsIFrame* aFrame)
{
@ -2127,6 +2150,8 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
if (setClipRect) {
aContext->Restore();
}
FlashPaint(aContext);
}
bool

Просмотреть файл

@ -441,6 +441,9 @@ protected:
// LayerManagerData needs to see DisplayItemDataEntry.
friend class LayerManagerData;
// Flash the area within the context clip if paint flashing is enabled.
static void FlashPaint(gfxContext *aContext);
/*
* Get the DisplayItemData array associated with this frame, or null if one
* doesn't exist.

Просмотреть файл

@ -120,7 +120,8 @@ nsSVGGeometryFrame::GetStrokeDashArray(gfxFloat **aDashes, PRUint32 *aCount)
gfxFloat pathScale = 1.0;
if (mContent->Tag() == nsGkAtoms::path) {
pathScale = static_cast<nsSVGPathElement*>(mContent)->GetScale();
pathScale =
static_cast<nsSVGPathElement*>(mContent)->GetPathLengthScale();
if (pathScale <= 0) {
return NS_OK;
}

Просмотреть файл

@ -751,7 +751,7 @@ nsSVGGlyphFrame::GetCharacterPositions(nsTArray<CharacterPosition>* aCharacterPo
if (!aCharacterPositions->SetLength(strLength))
return false;
gfxFloat pathScale = textPath->GetPathScale();
gfxFloat pathScale = textPath->GetOffsetScale();
CharacterPosition *cp = aCharacterPositions->Elements();
@ -877,7 +877,7 @@ nsSVGGlyphFrame::GetSubStringAdvance(PRUint32 aCharnum,
gfxFloat pathScale = 1.0;
nsSVGTextPathFrame *textPath = FindTextPathParent();
if (textPath)
pathScale = textPath->GetPathScale();
pathScale = textPath->GetOffsetScale();
if (dxcount > aFragmentChars)
dxcount = aFragmentChars;
for (PRUint32 i = aCharnum; i < dxcount; i++) {
@ -1101,7 +1101,7 @@ nsSVGGlyphFrame::SetGlyphPosition(gfxPoint *aPosition, bool aForceGlobalTransfor
gfxFloat pathScale = 1.0;
if (textPath)
pathScale = textPath->GetPathScale();
pathScale = textPath->GetOffsetScale();
nsTArray<float> dxList, dyList;
GetEffectiveDxDy(strLength, dxList, dyList);

Просмотреть файл

@ -166,17 +166,18 @@ nsSVGTextPathFrame::GetStartOffset()
nsRefPtr<gfxFlattenedPath> data = GetFlattenedPath();
return data ? (val * data->GetLength() / 100.0) : 0.0;
}
return val * GetPathScale();
return val * GetOffsetScale();
}
gfxFloat
nsSVGTextPathFrame::GetPathScale()
nsSVGTextPathFrame::GetOffsetScale()
{
nsIFrame *pathFrame = GetPathFrame();
if (!pathFrame)
return 1.0;
return static_cast<nsSVGPathElement*>(pathFrame->GetContent())->GetScale();
return static_cast<nsSVGPathElement*>(pathFrame->GetContent())->
GetPathLengthScale();
}
//----------------------------------------------------------------------

Просмотреть файл

@ -84,8 +84,20 @@ public:
already_AddRefed<gfxFlattenedPath> GetFlattenedPath();
nsIFrame *GetPathFrame();
/**
* Gets the scale by which offsets along this textPath must be scaled. This
* scaling is due to the user provided 'pathLength' attribute on the <path>
* element, which is a user provided estimate of the path length.
*/
gfxFloat GetOffsetScale();
/**
* Gets the offset from the start of the path at which the first character
* should be positioned. The value returned already takes GetOffsetScale
* into account.
*/
gfxFloat GetStartOffset();
gfxFloat GetPathScale();
protected:
virtual void GetXY(SVGUserUnitList *aX, SVGUserUnitList *aY);

Просмотреть файл

@ -84,7 +84,6 @@ _HARNESS_FILES = \
$(topsrcdir)/build/mobile/devicemanagerADB.py \
$(topsrcdir)/build/mobile/devicemanagerSUT.py \
$(topsrcdir)/build/automationutils.py \
$(topsrcdir)/build/poster.zip \
$(topsrcdir)/build/mobile/remoteautomation.py \
$(topsrcdir)/testing/mochitest/server.js \
$(topsrcdir)/build/pgo/server-locations.txt \

Просмотреть файл

@ -1,64 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 2011
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Dave Hyatt <hyatt@mozilla.org> (Original Author)
* Jan Varga <varga@ku.sk>
* Scott Johnson <sjohnson@mozilla.com>, Mozilla Corporation
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef nsITreeImageListener_h__
#define nsITreeImageListener_h__
// The interface for our image listener.
// {90586540-2D50-403e-8DCE-981CAA778444}
#define NS_ITREEIMAGELISTENER_IID \
{ 0x90586540, 0x2d50, 0x403e, { 0x8d, 0xce, 0x98, 0x1c, 0xaa, 0x77, 0x84, 0x44 } }
class nsITreeImageListener : public nsISupports
{
public:
NS_DECLARE_STATIC_IID_ACCESSOR(NS_ITREEIMAGELISTENER_IID)
NS_IMETHOD AddCell(PRInt32 aIndex, nsITreeColumn* aCol) = 0;
/**
* Clear the internal frame pointer to prevent dereferencing an object
* that no longer exists.
*/
NS_IMETHOD ClearFrame() = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsITreeImageListener, NS_ITREEIMAGELISTENER_IID)
#endif

Просмотреть файл

@ -2157,9 +2157,11 @@ nsTreeBodyFrame::GetImage(PRInt32 aRowIndex, nsTreeColumn* aCol, bool aUseContex
// We either aren't done loading, or we're animating. Add our row as a listener for invalidations.
nsCOMPtr<imgIDecoderObserver> obs;
imgReq->GetDecoderObserver(getter_AddRefs(obs));
nsCOMPtr<nsITreeImageListener> listener(do_QueryInterface(obs));
if (listener)
listener->AddCell(aRowIndex, aCol);
if (obs) {
static_cast<nsTreeImageListener*> (obs.get())->AddCell(aRowIndex, aCol);
}
return NS_OK;
}
}

Просмотреть файл

@ -61,7 +61,6 @@
#include "nsScrollbarFrame.h"
#include "nsThreadUtils.h"
#include "mozilla/LookAndFeel.h"
#include "nsITreeImageListener.h"
class nsOverflowChecker;
class nsTreeImageListener;

Просмотреть файл

@ -42,7 +42,7 @@
#include "imgIRequest.h"
#include "imgIContainer.h"
NS_IMPL_ISUPPORTS3(nsTreeImageListener, imgIDecoderObserver, imgIContainerObserver, nsITreeImageListener)
NS_IMPL_ISUPPORTS2(nsTreeImageListener, imgIDecoderObserver, imgIContainerObserver)
nsTreeImageListener::nsTreeImageListener(nsTreeBodyFrame* aTreeFrame)
: mTreeFrame(aTreeFrame),
@ -92,7 +92,7 @@ NS_IMETHODIMP nsTreeImageListener::FrameChanged(imgIContainer *aContainer,
}
NS_IMETHODIMP
void
nsTreeImageListener::AddCell(PRInt32 aIndex, nsITreeColumn* aCol)
{
if (!mInvalidationArea) {
@ -114,8 +114,6 @@ nsTreeImageListener::AddCell(PRInt32 aIndex, nsITreeColumn* aCol)
mInvalidationArea->AddRow(aIndex);
}
}
return NS_OK;
}

Просмотреть файл

@ -45,10 +45,9 @@
#include "nsITreeColumns.h"
#include "nsStubImageDecoderObserver.h"
#include "nsTreeBodyFrame.h"
#include "nsITreeImageListener.h"
// This class handles image load observation.
class nsTreeImageListener : public nsStubImageDecoderObserver, public nsITreeImageListener
class nsTreeImageListener : public nsStubImageDecoderObserver
{
public:
nsTreeImageListener(nsTreeBodyFrame *aTreeFrame);
@ -64,7 +63,6 @@ public:
NS_IMETHOD FrameChanged(imgIContainer *aContainer,
const nsIntRect *aDirtyRect);
NS_IMETHOD AddCell(PRInt32 aIndex, nsITreeColumn* aCol);
NS_IMETHOD ClearFrame();
friend class nsTreeBodyFrame;
@ -72,6 +70,7 @@ public:
protected:
void UnsuppressInvalidation() { mInvalidationSuppressed = false; }
void Invalidate();
void AddCell(PRInt32 aIndex, nsITreeColumn* aCol);
private:
nsTreeBodyFrame* mTreeFrame;

Просмотреть файл

@ -166,7 +166,8 @@ nsHttpPipeline::OnHeadersAvailable(nsAHttpTransaction *trans,
nsresult
nsHttpPipeline::ResumeSend()
{
NS_NOTREACHED("nsHttpPipeline::ResumeSend");
if (mConnection)
return mConnection->ResumeSend();
return NS_ERROR_UNEXPECTED;
}
@ -411,7 +412,17 @@ nsHttpPipeline::OnTransportStatus(nsITransport* transport,
bool
nsHttpPipeline::IsDone()
{
return (mRequestQ.Length() == 0) && (mResponseQ.Length() == 0);
bool done = true;
PRUint32 i, count = mRequestQ.Length();
for (i = 0; done && (i < count); i++)
done = Request(i)->IsDone();
count = mResponseQ.Length();
for (i = 0; done && (i < count); i++)
done = Response(i)->IsDone();
return done;
}
nsresult

Просмотреть файл

@ -82,7 +82,6 @@ _SERV_FILES = \
$(topsrcdir)/build/mobile/devicemanagerADB.py \
$(topsrcdir)/build/mobile/devicemanagerSUT.py \
$(topsrcdir)/build/automationutils.py \
$(topsrcdir)/build/poster.zip \
$(topsrcdir)/build/mobile/remoteautomation.py \
gen_template.pl \
server.js \

Просмотреть файл

@ -65,7 +65,6 @@ EXTRA_BUILD_FILES := \
automationutils.py \
manifestparser.py \
mozinfo.py \
poster.zip \
$(NULL)
# And files for running xpcshell remotely from $(topsrcdir)/build/mobile