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] .*.sw[a-z]
# User files that may appear at the root # User files that may appear at the root
.mozconfig /.mozconfig*
mozconfig /mozconfig
configure /configure
config.cache /config.cache
config.log /config.log
# Empty marker file that's generated when we check out NSS # Empty marker file that's generated when we check out NSS
security/manager/.nss.checkout security/manager/.nss.checkout

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

@ -52,7 +52,6 @@ import sys
import threading import threading
import tempfile import tempfile
import sqlite3 import sqlite3
import zipfile
SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0]))) SCRIPT_DIR = os.path.abspath(os.path.realpath(os.path.dirname(sys.argv[0])))
sys.path.insert(0, SCRIPT_DIR) sys.path.insert(0, SCRIPT_DIR)
@ -98,69 +97,6 @@ _log.setLevel(logging.INFO)
_log.addHandler(handler) _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 # # PROFILE SETUP #
################# #################
@ -1053,7 +989,7 @@ user_pref("camino.use_system_proxy_settings", false); // Camino-only, harmless t
os.makedirs(extensionsRootDir) os.makedirs(extensionsRootDir)
if os.path.isfile(extensionSource): if os.path.isfile(extensionSource):
reader = ZipFileReader(extensionSource) reader = automationutils.ZipFileReader(extensionSource)
for filename in reader.namelist(): for filename in reader.namelist():
# Sanity check the zip file. # Sanity check the zip file.

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

@ -36,11 +36,13 @@
# #
# ***** END LICENSE BLOCK ***** */ # ***** 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 import re
from urlparse import urlparse from urlparse import urlparse
__all__ = [ __all__ = [
"ZipFileReader",
"addCommonOptions", "addCommonOptions",
"checkForCrashes", "checkForCrashes",
"dumpLeakLog", "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() log = logging.getLogger()
def isURL(thing): def isURL(thing):
@ -102,7 +166,6 @@ def addCommonOptions(parser, defaults={}):
def checkForCrashes(dumpDir, symbolsPath, testName=None): def checkForCrashes(dumpDir, symbolsPath, testName=None):
stackwalkPath = os.environ.get('MINIDUMP_STACKWALK', 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 # try to get the caller's filename if no test name is given
if testName is None: if testName is None:
try: try:
@ -110,70 +173,70 @@ def checkForCrashes(dumpDir, symbolsPath, testName=None):
except: except:
testName = "unknown" testName = "unknown"
foundCrash = False # Check preconditions
dumps = glob.glob(os.path.join(dumpDir, '*.dmp')) dumps = glob.glob(os.path.join(dumpDir, '*.dmp'))
for d in dumps: if len(dumps) == 0:
log.info("PROCESS-CRASH | %s | application crashed (minidump found)", testName) return False
print "Crash dump filename: " + d
if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath): foundCrash = False
p = subprocess.Popen([stackwalkPath, d, symbolsPath], removeSymbolsPath = False
stdout=subprocess.PIPE,
stderr=subprocess.PIPE) # If our symbols are at a remote URL, download them now
(out, err) = p.communicate() if isURL(symbolsPath):
if len(out) > 3: print "Downloading symbols from: " + symbolsPath
# minidump_stackwalk is chatty, so ignore stderr when it succeeds. removeSymbolsPath = True
print out # Get the symbols and write them to a temporary zipfile
else: data = urllib2.urlopen(symbolsPath)
print "stderr from minidump_stackwalk:" symbolsFile = tempfile.TemporaryFile()
print err symbolsFile.write(data.read())
if p.returncode != 0: # extract symbols to a temporary directory (which we'll delete after
print "minidump_stackwalk exited with return code %d" % p.returncode # processing all crashes)
elif stackwalkCGI and symbolsPath and isURL(symbolsPath): symbolsPath = tempfile.mkdtemp()
f = None zfile = ZipFileReader(symbolsFile)
try: zfile.extractall(symbolsPath)
f = open(d, "rb")
sys.path.append(os.path.join(os.path.dirname(__file__), "poster.zip")) try:
from poster.encode import multipart_encode for d in dumps:
from poster.streaminghttp import register_openers log.info("PROCESS-CRASH | %s | application crashed (minidump found)", testName)
import urllib2 print "Crash dump filename: " + d
register_openers() if symbolsPath and stackwalkPath and os.path.exists(stackwalkPath):
datagen, headers = multipart_encode({"minidump": f, # run minidump stackwalk
"symbols": symbolsPath}) p = subprocess.Popen([stackwalkPath, d, symbolsPath],
request = urllib2.Request(stackwalkCGI, datagen, headers) stdout=subprocess.PIPE,
result = urllib2.urlopen(request).read() stderr=subprocess.PIPE)
if len(result) > 3: (out, err) = p.communicate()
print result if len(out) > 3:
# minidump_stackwalk is chatty, so ignore stderr when it succeeds.
print out
else: else:
print "stackwalkCGI returned nothing." print "stderr from minidump_stackwalk:"
finally: print err
if f: if p.returncode != 0:
f.close() print "minidump_stackwalk exited with return code %d" % p.returncode
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."
else: 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 print "MINIDUMP_STACKWALK binary not found: %s" % stackwalkPath
elif stackwalkCGI and not isURL(stackwalkCGI): dumpSavePath = os.environ.get('MINIDUMP_SAVE_PATH', None)
print "MINIDUMP_STACKWALK_CGI is not a URL: %s" % stackwalkCGI if dumpSavePath:
elif symbolsPath and not isURL(symbolsPath): shutil.move(d, dumpSavePath)
print "symbolsPath is not a URL: %s" % symbolsPath print "Saved dump as %s" % os.path.join(dumpSavePath,
dumpSavePath = os.environ.get('MINIDUMP_SAVE_PATH', None) os.path.basename(d))
if dumpSavePath: else:
shutil.move(d, dumpSavePath) os.remove(d)
print "Saved dump as %s" % os.path.join(dumpSavePath, extra = os.path.splitext(d)[0] + ".extra"
os.path.basename(d)) if os.path.exists(extra):
else: os.remove(extra)
os.remove(d) foundCrash = True
extra = os.path.splitext(d)[0] + ".extra" finally:
if os.path.exists(extra): if removeSymbolsPath:
os.remove(extra) shutil.rmtree(symbolsPath)
foundCrash = True
return foundCrash return foundCrash
def getFullPath(directory, path): def getFullPath(directory, path):
"Get an absolute path relative to 'directory'." "Get an absolute path relative to 'directory'."
return os.path.normpath(os.path.join(directory, os.path.expanduser(path))) return os.path.normpath(os.path.join(directory, os.path.expanduser(path)))

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

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

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

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

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

@ -98,7 +98,12 @@ public:
return nsGkAtoms::d; 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: protected:

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

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

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

@ -358,7 +358,9 @@ abstract public class GeckoApp
} catch (Exception e) { } catch (Exception e) {
Log.e(LOG_FILE_NAME, "top level exception", e); Log.e(LOG_FILE_NAME, "top level exception", e);
StringWriter sw = new StringWriter(); StringWriter sw = new StringWriter();
e.printStackTrace(new PrintWriter(sw)); PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw);
pw.flush();
GeckoAppShell.reportJavaCrash(sw.toString()); GeckoAppShell.reportJavaCrash(sw.toString());
} }
// resetting this is kinda pointless, but oh well // 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 animation mode is "loop once", it's time to stop animating
if (mAnimationMode == kLoopOnceAnimMode || mLoopCount == 0) { if (mAnimationMode == kLoopOnceAnimMode || mLoopCount == 0) {
mAnimationFinished = PR_TRUE; mAnimationFinished = true;
EvaluateAnimation(); EvaluateAnimation();
} }
@ -383,7 +383,7 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
} }
if (!(timeout > 0)) { if (!(timeout > 0)) {
mAnimationFinished = PR_TRUE; mAnimationFinished = true;
EvaluateAnimation(); EvaluateAnimation();
} }
@ -404,13 +404,13 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
nextFrame, nextFrameIndex))) { nextFrame, nextFrameIndex))) {
// something went wrong, move on to next // something went wrong, move on to next
NS_WARNING("RasterImage::AdvanceFrame(): Compositing of frame failed"); NS_WARNING("RasterImage::AdvanceFrame(): Compositing of frame failed");
nextFrame->SetCompositingFailed(PR_TRUE); nextFrame->SetCompositingFailed(true);
mAnim->currentAnimationFrameIndex = nextFrameIndex; mAnim->currentAnimationFrameIndex = nextFrameIndex;
mAnim->currentAnimationFrameTime = aTime; mAnim->currentAnimationFrameTime = aTime;
return false; return false;
} }
nextFrame->SetCompositingFailed(PR_FALSE); nextFrame->SetCompositingFailed(false);
} }
// Set currentAnimationFrameIndex at the last possible moment // Set currentAnimationFrameIndex at the last possible moment

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

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

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

@ -49,6 +49,8 @@
#include "nsImageFrame.h" #include "nsImageFrame.h"
#include "nsRenderingContext.h" #include "nsRenderingContext.h"
#include "mozilla/Preferences.h"
#ifdef DEBUG #ifdef DEBUG
#include <stdio.h> #include <stdio.h>
#endif #endif
@ -470,6 +472,27 @@ FrameLayerBuilder::DisplayItemDataEntry::HasNonEmptyContainerLayer()
return false; 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>* /* static */ nsTArray<FrameLayerBuilder::DisplayItemData>*
FrameLayerBuilder::GetDisplayItemDataArrayForFrame(nsIFrame* aFrame) FrameLayerBuilder::GetDisplayItemDataArrayForFrame(nsIFrame* aFrame)
{ {
@ -2127,6 +2150,8 @@ FrameLayerBuilder::DrawThebesLayer(ThebesLayer* aLayer,
if (setClipRect) { if (setClipRect) {
aContext->Restore(); aContext->Restore();
} }
FlashPaint(aContext);
} }
bool bool

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

@ -441,6 +441,9 @@ protected:
// LayerManagerData needs to see DisplayItemDataEntry. // LayerManagerData needs to see DisplayItemDataEntry.
friend class LayerManagerData; 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 * Get the DisplayItemData array associated with this frame, or null if one
* doesn't exist. * doesn't exist.

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

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

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

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

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

@ -166,17 +166,18 @@ nsSVGTextPathFrame::GetStartOffset()
nsRefPtr<gfxFlattenedPath> data = GetFlattenedPath(); nsRefPtr<gfxFlattenedPath> data = GetFlattenedPath();
return data ? (val * data->GetLength() / 100.0) : 0.0; return data ? (val * data->GetLength() / 100.0) : 0.0;
} }
return val * GetPathScale(); return val * GetOffsetScale();
} }
gfxFloat gfxFloat
nsSVGTextPathFrame::GetPathScale() nsSVGTextPathFrame::GetOffsetScale()
{ {
nsIFrame *pathFrame = GetPathFrame(); nsIFrame *pathFrame = GetPathFrame();
if (!pathFrame) if (!pathFrame)
return 1.0; 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(); already_AddRefed<gfxFlattenedPath> GetFlattenedPath();
nsIFrame *GetPathFrame(); 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 GetStartOffset();
gfxFloat GetPathScale();
protected: protected:
virtual void GetXY(SVGUserUnitList *aX, SVGUserUnitList *aY); virtual void GetXY(SVGUserUnitList *aX, SVGUserUnitList *aY);

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

@ -84,7 +84,6 @@ _HARNESS_FILES = \
$(topsrcdir)/build/mobile/devicemanagerADB.py \ $(topsrcdir)/build/mobile/devicemanagerADB.py \
$(topsrcdir)/build/mobile/devicemanagerSUT.py \ $(topsrcdir)/build/mobile/devicemanagerSUT.py \
$(topsrcdir)/build/automationutils.py \ $(topsrcdir)/build/automationutils.py \
$(topsrcdir)/build/poster.zip \
$(topsrcdir)/build/mobile/remoteautomation.py \ $(topsrcdir)/build/mobile/remoteautomation.py \
$(topsrcdir)/testing/mochitest/server.js \ $(topsrcdir)/testing/mochitest/server.js \
$(topsrcdir)/build/pgo/server-locations.txt \ $(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. // We either aren't done loading, or we're animating. Add our row as a listener for invalidations.
nsCOMPtr<imgIDecoderObserver> obs; nsCOMPtr<imgIDecoderObserver> obs;
imgReq->GetDecoderObserver(getter_AddRefs(obs)); imgReq->GetDecoderObserver(getter_AddRefs(obs));
nsCOMPtr<nsITreeImageListener> listener(do_QueryInterface(obs));
if (listener) if (obs) {
listener->AddCell(aRowIndex, aCol); static_cast<nsTreeImageListener*> (obs.get())->AddCell(aRowIndex, aCol);
}
return NS_OK; return NS_OK;
} }
} }

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

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

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

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

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

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

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

@ -166,7 +166,8 @@ nsHttpPipeline::OnHeadersAvailable(nsAHttpTransaction *trans,
nsresult nsresult
nsHttpPipeline::ResumeSend() nsHttpPipeline::ResumeSend()
{ {
NS_NOTREACHED("nsHttpPipeline::ResumeSend"); if (mConnection)
return mConnection->ResumeSend();
return NS_ERROR_UNEXPECTED; return NS_ERROR_UNEXPECTED;
} }
@ -411,7 +412,17 @@ nsHttpPipeline::OnTransportStatus(nsITransport* transport,
bool bool
nsHttpPipeline::IsDone() 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 nsresult

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

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

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

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