Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge from mozilla-inbound to mozilla-central

  • Loading branch information...
commit e1fb2d3d3b71f5a65537334560c05a08130e1367 2 parents 629521d + daf9b5a
@mbrubeck mbrubeck authored
Showing with 3,437 additions and 448 deletions.
  1. +2 −2 browser/base/content/test/browser_save_video.js
  2. +0 −1  browser/installer/package-manifest.in
  3. +7 −0 config/rules.mk
  4. +5 −2 content/html/content/test/test_bug500885.html
  5. +2 −1  content/html/content/test/test_bug592802.html
  6. +32 −0 content/svg/content/src/nsSVGElement.cpp
  7. +1 −0  content/svg/content/src/nsSVGElement.h
  8. +3 −0  content/svg/content/src/nsSVGLength2.h
  9. +14 −0 content/svg/content/src/nsSVGSVGElement.cpp
  10. +8 −1 dom/workers/WorkerPrivate.cpp
  11. +6 −0 dom/workers/WorkerScope.cpp
  12. +20 −7 gfx/skia/Makefile.in
  13. +7 −0 js/src/config/rules.mk
  14. +2 −2 layout/forms/test/test_bug36619.html
  15. +2 −2 layout/forms/test/test_bug377624.html
  16. +2 −2 layout/forms/test/test_bug536567.html
  17. +1 −0  layout/media/symbols.def.in
  18. +38 −0 layout/reftests/bugs/531200-1-ref.html
  19. +38 −0 layout/reftests/bugs/531200-1.html
  20. +13 −0 layout/reftests/bugs/711359-1-ref.html
  21. +32 −0 layout/reftests/bugs/711359-1.html
  22. +31 −0 layout/reftests/bugs/712849-1-ref.html
  23. +39 −0 layout/reftests/bugs/712849-1.html
  24. +3 −0  layout/reftests/bugs/reftest.list
  25. +0 −52 layout/reftests/svg/sizing/dynamic--inline-resize-cb-height.xhtml
  26. +0 −52 layout/reftests/svg/sizing/dynamic--inline-resize-cb-width.xhtml
  27. +0 −4 layout/reftests/svg/sizing/reftest.list
  28. +16 −1 layout/style/viewsource.css
  29. +1 −1  layout/svg/crashtests/crashtests.list
  30. +10 −4 layout/tables/nsCellMap.cpp
  31. +9 −21 layout/tables/nsTableRowFrame.cpp
  32. +5 −0 layout/tables/nsTableRowGroupFrame.cpp
  33. +1 −1  memory/mozutils/mozutils.def.in
  34. +45 −19 mobile/android/base/AwesomeBar.java
  35. +1 −1  mobile/android/base/GeckoPreferences.java
  36. +1 −1  mobile/android/base/Tabs.java
  37. +2 −0  mobile/android/base/ui/PanZoomController.java
  38. +2 −1  mobile/android/chrome/content/about.xhtml
  39. +9 −7 mobile/android/chrome/content/browser.js
  40. +5 −11 mobile/android/locales/en-US/chrome/about.dtd
  41. +1 −1  mobile/android/themes/core/aboutPage.css
  42. +27 −24 parser/htmlparser/tests/reftest/bug482921-1-ref.html
  43. +28 −25 parser/htmlparser/tests/reftest/bug482921-2-ref.html
  44. +17 −13 parser/htmlparser/tests/reftest/bug535530-2-ref.html
  45. +4 −1 parser/htmlparser/tests/reftest/bug704667-1-ref.html
  46. +40 −9 testing/mochitest/MockFilePicker.jsm
  47. +7 −4 testing/mozbase/README
  48. +9 −0 testing/mozbase/docs.manifest
  49. +5 −5 testing/mozbase/manifestdestiny/README.md
  50. +8 −2 testing/mozbase/mozinstall/mozinstall/mozinstall.py
  51. +18 −6 testing/mozbase/mozprocess/mozprocess/processhandler.py
  52. +1 −1  testing/mozbase/mozprocess/mozprocess/winprocess.py
  53. +2 −2 testing/mozbase/mozprocess/setup.py
  54. +57 −0 testing/mozbase/mozprocess/tests/Makefile
  55. +6 −0 testing/mozbase/mozprocess/tests/iniparser/AUTHORS
  56. +15 −0 testing/mozbase/mozprocess/tests/iniparser/INSTALL
  57. +21 −0 testing/mozbase/mozprocess/tests/iniparser/LICENSE
  58. +118 −0 testing/mozbase/mozprocess/tests/iniparser/Makefile
  59. +12 −0 testing/mozbase/mozprocess/tests/iniparser/README
  60. +407 −0 testing/mozbase/mozprocess/tests/iniparser/dictionary.c
  61. +176 −0 testing/mozbase/mozprocess/tests/iniparser/dictionary.h
  62. +648 −0 testing/mozbase/mozprocess/tests/iniparser/iniparser.c
  63. +273 −0 testing/mozbase/mozprocess/tests/iniparser/iniparser.h
  64. +2 −0  testing/mozbase/mozprocess/tests/manifest.ini
  65. +187 −0 testing/mozbase/mozprocess/tests/mozprocess1.py
  66. +177 −0 testing/mozbase/mozprocess/tests/mozprocess2.py
  67. +11 −0 testing/mozbase/mozprocess/tests/process_normal_finish.ini
  68. +11 −0 testing/mozbase/mozprocess/tests/process_waittimeout.ini
  69. +8 −0 testing/mozbase/mozprocess/tests/process_waittimeout_10s.ini
  70. +189 −0 testing/mozbase/mozprocess/tests/proclaunch.c
  71. +64 −3 testing/mozbase/mozprofile/README.md
  72. +1 −1  testing/mozbase/mozprofile/mozprofile/addons.py
  73. +10 −2 testing/mozbase/mozprofile/mozprofile/profile.py
  74. +146 −0 testing/mozbase/mozprofile/tests/addonid.py
  75. +3 −0  testing/mozbase/mozprofile/tests/manifest.ini
  76. +65 −0 testing/mozbase/mozprofile/tests/server_locations.py
  77. +141 −0 testing/mozbase/mozprofile/tests/testprofile.py
  78. +28 −125 testing/mozbase/mozrunner/mozrunner/runner.py
  79. +1 −1  testing/mozbase/mozrunner/setup.py
  80. +5 −0 testing/mozbase/test-manifest.ini
  81. +62 −0 testing/mozbase/test.py
  82. +2 −2 toolkit/content/tests/browser/browser_save_resend_postdata.js
  83. +2 −2 toolkit/mozapps/downloads/tests/unit/test_privatebrowsing_downloadLastDir.js
  84. +2 −2 toolkit/mozapps/extensions/test/browser/browser_bug567127.js
  85. +2 −2 toolkit/mozapps/extensions/test/browser/browser_inlinesettings.js
  86. +0 −1  tools/profiler/sps/platform-linux.cc
  87. +0 −1  tools/profiler/sps/platform-macos.cc
  88. +0 −1  tools/profiler/sps/platform-win32.cc
  89. +2 −11 tools/profiler/sps/platform.h
  90. +1 −5 tools/profiler/sps/v8-support.h
View
4 browser/base/content/test/browser_save_video.js
@@ -2,7 +2,7 @@
http://creativecommons.org/publicdomain/zero/1.0/ */
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.reset();
+MockFilePicker.init();
/**
* TestCase for bug 564387
@@ -54,7 +54,7 @@ function test() {
registerCleanupFunction(function () {
mockTransferRegisterer.unregister();
- MockFilePicker.reset();
+ MockFilePicker.cleanup();
destDir.remove(true);
});
View
1  browser/installer/package-manifest.in
@@ -14,7 +14,6 @@
; Mac bundle stuff
@APPNAME@/Contents/Info.plist
@APPNAME@/Contents/PkgInfo
-@APPNAME@/Contents/Plug-Ins/
@APPNAME@/Contents/Resources/
#endif
View
7 config/rules.mk
@@ -373,6 +373,13 @@ ifdef MAPFILE
OS_LDFLAGS += -MAP:$(MAPFILE)
endif
+else #!GNU_CC
+
+ifdef DEFFILE
+OS_LDFLAGS += $(call normalizepath,$(DEFFILE))
+EXTRA_DEPS += $(DEFFILE)
+endif
+
endif # !GNU_CC
endif # WINNT
View
7 content/html/content/test/test_bug500885.html
@@ -18,7 +18,7 @@
<script type="text/javascript">
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.reset();
+MockFilePicker.init();
MockFilePicker.returnValue = MockFilePicker.returnOK;
function test() {
@@ -47,7 +47,10 @@
is(domActivateEvents, 1, "click on button should fire 1 DOMActivate event");
} finally {
- SimpleTest.executeSoon(SimpleTest.finish);
+ SimpleTest.executeSoon(function() {
+ MockFilePicker.cleanup();
+ SimpleTest.finish();
+ });
}
}
View
3  content/html/content/test/test_bug592802.html
@@ -26,7 +26,7 @@
SimpleTest.waitForExplicitFinish();
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.reset();
+MockFilePicker.init();
var testData = [
/* visibility | display | multiple */
@@ -43,6 +43,7 @@
function finished()
{
+ MockFilePicker.cleanup();
SimpleTest.finish();
}
View
32 content/svg/content/src/nsSVGElement.cpp
@@ -1112,6 +1112,24 @@ nsSVGElement::UpdateContentStyleRule()
if (!attrName->IsAtom() || !IsAttributeMapped(attrName->Atom()))
continue;
+ if (Tag() == nsGkAtoms::svg) {
+ // Special case: we don't want <svg> 'width'/'height' mapped into style
+ // if the attribute value isn't a valid <length> according to SVG (which
+ // only supports a subset of the CSS <length> values). We don't enforce
+ // this by checking the attribute value in nsSVGSVGElement::
+ // IsAttributeMapped since we don't want that method to depend on the
+ // value of the attribute that is being checked. Rather we just prevent
+ // the actual mapping here, as necessary.
+ if (attrName->Atom() == nsGkAtoms::width &&
+ !GetAnimatedLength(nsGkAtoms::width)->HasBaseVal()) {
+ continue;
+ }
+ if (attrName->Atom() == nsGkAtoms::height &&
+ !GetAnimatedLength(nsGkAtoms::height)->HasBaseVal()) {
+ continue;
+ }
+ }
+
nsAutoString value;
mAttrsAndChildren.AttrAt(i)->ToString(value);
mappedAttrParser.ParseMappedAttrValue(attrName->Atom(), value);
@@ -1314,6 +1332,20 @@ nsSVGElement::DidAnimateLength(PRUint8 aAttrEnum)
}
}
+nsSVGLength2*
+nsSVGElement::GetAnimatedLength(const nsIAtom *aAttrName)
+{
+ LengthAttributesInfo lengthInfo = GetLengthInfo();
+
+ for (PRUint32 i = 0; i < lengthInfo.mLengthCount; i++) {
+ if (aAttrName == *lengthInfo.mLengthInfo[i].mName) {
+ return &lengthInfo.mLengths[i];
+ }
+ }
+ NS_ABORT_IF_FALSE(false, "no matching length found");
+ return nsnull;
+}
+
void
nsSVGElement::GetAnimatedLengthValues(float *aFirst, ...)
{
View
1  content/svg/content/src/nsSVGElement.h
@@ -195,6 +195,7 @@ class nsSVGElement : public nsSVGElementBase // nsIContent
virtual void DidAnimateTransformList();
virtual void DidAnimateString(PRUint8 aAttrEnum);
+ nsSVGLength2* GetAnimatedLength(const nsIAtom *aAttrName);
void GetAnimatedLengthValues(float *aFirst, ...);
void GetAnimatedNumberValues(float *aFirst, ...);
void GetAnimatedIntegerValues(PRInt32 *aFirst, ...);
View
3  content/svg/content/src/nsSVGLength2.h
@@ -100,6 +100,9 @@ class nsSVGLength2
float GetAnimValue(nsSVGSVGElement* aCtx) const
{ return mAnimVal / GetUnitScaleFactor(aCtx, mSpecifiedUnitType); }
+ bool HasBaseVal() const {
+ return mIsBaseSet;
+ }
// Returns true if the animated value of this length has been explicitly
// set (either by animation, or by taking on the base value which has been
// explicitly set by markup or a DOM call), false otherwise.
View
14 content/svg/content/src/nsSVGSVGElement.cpp
@@ -883,6 +883,20 @@ nsSVGSVGElement::GetTimedDocumentRoot()
NS_IMETHODIMP_(bool)
nsSVGSVGElement::IsAttributeMapped(const nsIAtom* name) const
{
+ // We want to map the 'width' and 'height' attributes into style for
+ // outer-<svg>, except when the attributes aren't set (since their default
+ // values of '100%' can cause unexpected and undesirable behaviour for SVG
+ // inline in HTML). We rely on nsSVGElement::UpdateContentStyleRule() to
+ // prevent mapping of the default values into style (it only maps attributes
+ // that are set). We also rely on a check in nsSVGElement::
+ // UpdateContentStyleRule() to prevent us mapping the attributes when they're
+ // given a <length> value that is not currently recognized by the SVG
+ // specification.
+
+ if (!IsInner() && (name == nsGkAtoms::width || name == nsGkAtoms::height)) {
+ return true;
+ }
+
static const MappedAttributeEntry* const map[] = {
sColorMap,
sFEFloodMap,
View
9 dom/workers/WorkerPrivate.cpp
@@ -79,6 +79,9 @@
#include "Worker.h"
#include "WorkerFeature.h"
#include "WorkerScope.h"
+#ifdef ANDROID
+#include <android/log.h>
+#endif
#include "WorkerInlines.h"
@@ -1149,7 +1152,11 @@ class ReportErrorRunnable : public WorkerRunnable
}
if (!logged) {
- fputs(NS_ConvertUTF16toUTF8(aMessage).get(), stderr);
+ NS_ConvertUTF16toUTF8 msg(aMessage);
+#ifdef ANDROID
+ __android_log_print(ANDROID_LOG_INFO, "Gecko", msg.get());
+#endif
+ fputs(msg.get(), stderr);
fflush(stderr);
}
View
6 dom/workers/WorkerScope.cpp
@@ -61,6 +61,9 @@
#include "Worker.h"
#include "WorkerPrivate.h"
#include "XMLHttpRequest.h"
+#ifdef ANDROID
+#include <android/log.h>
+#endif
#include "WorkerInlines.h"
@@ -517,6 +520,9 @@ class WorkerGlobalScope : public events::EventTarget
return false;
}
+#ifdef ANDROID
+ __android_log_print(ANDROID_LOG_INFO, "Gecko", buffer.ptr());
+#endif
fputs(buffer.ptr(), stderr);
fflush(stderr);
}
View
27 gfx/skia/Makefile.in
@@ -302,22 +302,15 @@ EXPORTS_skia += \
$(NULL)
CPPSRCS += \
SkFontHost_mac_coretext.cpp \
- SkBitmapProcState_opts_SSE2.cpp \
- SkBlitRow_opts_SSE2.cpp \
- SkUtils_opts_SSE2.cpp \
- opts_check_SSE2.cpp \
SkTime_Unix.cpp \
$(NULL)
endif
ifeq (android,$(MOZ_WIDGET_TOOLKIT))
CPPSRCS += \
- SkBitmapProcState_opts_arm.cpp \
- SkBlitRow_opts_arm.cpp \
SkFontHost_FreeType.cpp \
SkFontHost_android.cpp \
SkFontHost_gamma.cpp \
- SkUtils_opts_none.cpp \
SkMMapStream.cpp \
SkTime_Unix.cpp \
$(NULL)
@@ -334,11 +327,31 @@ EXPORTS_skia += \
CPPSRCS += \
SkFontHost_win.cpp \
SkTime_win.cpp \
+ $(NULL)
+endif
+
+ifneq (,$(INTEL_ARCHITECTURE))
+CPPSRCS += \
SkBitmapProcState_opts_SSE2.cpp \
SkBlitRow_opts_SSE2.cpp \
SkUtils_opts_SSE2.cpp \
opts_check_SSE2.cpp \
$(NULL)
+else
+ifeq ($(CPU_ARCH)_$(GNU_CC),arm_1)
+CPPSRCS += \
+ SkBitmapProcState_opts_arm.cpp \
+ SkBlitRow_opts_arm.cpp \
+ opts_check_arm.cpp \
+ $(NULL)
+SSRCS += memset.arm.S
+else
+CPPSRCS += \
+ SkBitmapProcState_opts_none.cpp \
+ SkBlitRow_opts_none.cpp \
+ SkUtils_opts_none.cpp \
+ $(NULL)
+endif
endif
include $(topsrcdir)/config/rules.mk
View
7 js/src/config/rules.mk
@@ -373,6 +373,13 @@ ifdef MAPFILE
OS_LDFLAGS += -MAP:$(MAPFILE)
endif
+else #!GNU_CC
+
+ifdef DEFFILE
+OS_LDFLAGS += $(call normalizepath,$(DEFFILE))
+EXTRA_DEPS += $(DEFFILE)
+endif
+
endif # !GNU_CC
endif # WINNT
View
4 layout/forms/test/test_bug36619.html
@@ -24,7 +24,7 @@
SimpleTest.waitForExplicitFinish();
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.reset();
+MockFilePicker.init();
// enable popups the first time
SpecialPowers.pushPrefEnv({'set': [
@@ -45,7 +45,7 @@
document.getElementById("a").click();
SimpleTest.executeSoon(function() {
ok(!MockFilePicker.shown, "File picker show method should not have been called");
- MockFilePicker.reset();
+ MockFilePicker.cleanup();
SimpleTest.finish();
});
View
4 layout/forms/test/test_bug377624.html
@@ -33,7 +33,7 @@
SimpleTest.waitForExplicitFinish();
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.reset();
+MockFilePicker.init();
var testData = [["a", MockFilePicker.filterImages, 1],
["b", MockFilePicker.filterAudio, 1],
@@ -88,7 +88,7 @@
"File picker should show the correct filter index");
if (++currentTest == testData.length) {
- MockFilePicker.reset();
+ MockFilePicker.cleanup();
SimpleTest.finish();
} else {
launchNextTest();
View
4 layout/forms/test/test_bug536567.html
@@ -24,7 +24,7 @@
const Cm = Components.manager;
var MockFilePicker = SpecialPowers.MockFilePicker;
-MockFilePicker.reset();
+MockFilePicker.init();
var ioSvc = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
var dirSvc = Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties);
@@ -134,7 +134,7 @@
dirs[i].remove(true);
}
- MockFilePicker.reset();
+ MockFilePicker.cleanup();
SimpleTest.finish();
}
View
1  layout/media/symbols.def.in
@@ -20,6 +20,7 @@ nestegg_track_type
nestegg_track_video_params
nestegg_tstamp_scale
#ifndef MOZ_NATIVE_LIBVPX
+vpx_codec_control_
vpx_codec_dec_init_ver
vpx_codec_decode
vpx_codec_destroy
View
38 layout/reftests/bugs/531200-1-ref.html
@@ -0,0 +1,38 @@
+<html class="reftest-print">
+<head>
+<title>push rowspan on to next page if it can't be splitted</title>
+<style>
+img {
+ width: 10px;
+ height: 30px;
+}
+</style>
+</head>
+<body>
+ <div style="height: 110px"></div>
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td></td>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr style="page-break-after:always">
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="2">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ <td rowspan="2"></td>
+ </tr>
+ <tr>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
View
38 layout/reftests/bugs/531200-1.html
@@ -0,0 +1,38 @@
+<html class="reftest-print">
+<head>
+<title>push rowspan on to next page if it can't be splitted</title>
+<style>
+img {
+ width: 10px;
+ height: 30px;
+}
+</style>
+</head>
+<body>
+ <div style="height: 110px"></div>
+ <table cellpadding="0" cellspacing="0" border="0">
+ <tr>
+ <td></td>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ <tr>
+ <td rowspan="2">
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ <td rowspan="2"></td>
+ </tr>
+ <tr>
+ <td>
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRF/wAAAAAAQaMSAwAAABJJREFUeNpiYBgFo2AwAIAAAwACigABtnCV2AAAAABJRU5ErkJggg==">
+ </td>
+ </tr>
+ </table>
+</body>
+</html>
View
13 layout/reftests/bugs/711359-1-ref.html
@@ -0,0 +1,13 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<body>
+ <table style="border-collapse: collapse;" border="1">
+ <tbody id="reference">
+ <tr><td>&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
View
32 layout/reftests/bugs/711359-1.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <script>
+ var lastLang = "";
+ function LangSelect(aLang) {
+ var tbody = document.getElementById("l10ntbody");
+ var child = tbody.firstChild;
+ while (child) {
+ if (child.nodeType == Node.ELEMENT_NODE) {
+ if (aLang == "*" || aLang == child.getAttribute("language"))
+ child.removeAttribute("style");
+ else
+ child.setAttribute("style", "display: none");
+ }
+ child = child.nextSibling;
+ }
+ }
+</script>
+</head>
+
+<body onload="LangSelect('cs');">
+ <table style="border-collapse: collapse;" border="1">
+ <tbody id="l10ntbody">
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ <tr style="display: none;" language="cs"><td>&nbsp;</td></tr>
+ </tbody>
+ </table>
+</body>
+</html>
View
31 layout/reftests/bugs/712849-1-ref.html
@@ -0,0 +1,31 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>testcase</title>
+<style>
+.tt {
+ border-collapse: collapse;
+}
+.nix {
+ display: none;
+}
+.ref {
+ border: solid 3px darkred;
+}
+
+td {
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+</head>
+<body>
+ <table class="tt">
+ <tr id="1"><td >&nbsp;</td></tr>
+ <tr id="2" class="nix"><td >&nbsp;</td></tr>
+ <tr id="3" class="ref"><td >&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+</body>
+</html>
View
39 layout/reftests/bugs/712849-1.html
@@ -0,0 +1,39 @@
+<!DOCTYPE html>
+<html><head>
+<meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>testcase</title>
+<style>
+.tt {
+ border-collapse: collapse;
+}
+.nix {
+ display: none;
+}
+.ref {
+ border: solid 3px darkred;
+}
+
+td {
+ width: 20px;
+ height: 20px;
+}
+
+</style>
+<script>
+
+function test ()
+{
+ document.getElementById ("2").className = "nix";
+ document.getElementById ("3").className = "ref";
+}
+</script>
+</head>
+<body onload="test()">
+ <table class="tt">
+ <tr id="1"><td >&nbsp;</td></tr>
+ <tr id="2"><td >&nbsp;</td></tr>
+ <tr id="3"><td >&nbsp;</td></tr>
+ <tr><td>&nbsp;</td></tr>
+ </table>
+</body>
+</html>
View
3  layout/reftests/bugs/reftest.list
@@ -1445,6 +1445,7 @@ random-if(d2d) == 523468-1.html 523468-1-ref.html
== 528096-1.html 528096-1-ref.html
== 530686-1.html 530686-1-ref.html
== 531098-1.html 531098-1-ref.html
+== 531200-1.html 531200-1-ref.html
== 531371-1.html 531371-1-ref.html
== 534526-1a.html 534526-1-ref.html
== 534526-1b.html 534526-1-ref.html
@@ -1677,3 +1678,5 @@ fails-if(layersGPUAccelerated&&cocoaWidget) == 654950-1.html 654950-1-ref.html #
needs-focus == 703186-1.html 703186-1-ref.html
needs-focus == 703186-2.html 703186-2-ref.html
needs-focus != 703186-1.html 703186-2.html
+== 711359-1.html 711359-1-ref.html
+== 712849-1.html 712849-1-ref.html
View
52 layout/reftests/svg/sizing/dynamic--inline-resize-cb-height.xhtml
@@ -1,52 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
- <head>
-
- <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
-
- <title>Test: resize of container block height</title>
-
- <!--
- This testcase checks that SVG embedded inline with a percentage height is
- updated correctly when its containing block is resized.
- -->
-
- <style type="text/css">
-
-html, body, div {
- padding: 0;
- border: 0;
- margin: 0;
- width: 100%;
- height: 100%; /* inline style override on the div below */
- background: white;
- overflow: hidden;
-}
-
- </style>
- <script type="text/javascript">
-
-function resize_div()
-{
- var XHTML_NS = 'http://www.w3.org/1999/xhtml';
- document.getElementsByTagNameNS(XHTML_NS, 'div').item(0).style.height = '100%';
- document.documentElement.removeAttribute('class');
-}
-
-document.addEventListener("MozReftestInvalidate", resize_div, false);
-
- </script>
- </head>
- <body>
-
- <div style="height:50%;">
- <svg xmlns="http://www.w3.org/2000/svg" width="5000" height="100%">
- <rect width="100%" height="100%" fill="blue"/>
- </svg>
- </div>
-
- </body>
-</html>
View
52 layout/reftests/svg/sizing/dynamic--inline-resize-cb-width.xhtml
@@ -1,52 +0,0 @@
-<!--
- Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/
--->
-<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait">
- <head>
-
- <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 -->
-
- <title>Test: resize of container block width</title>
-
- <!--
- This testcase checks that SVG embedded inline with a percentage width is
- updated correctly when its containing block is resized.
- -->
-
- <style type="text/css">
-
-html, body, div {
- padding: 0;
- border: 0;
- margin: 0;
- width: 100%; /* inline style override on the div below */
- height: 100%;
- background: white;
- overflow: hidden;
-}
-
- </style>
- <script type="text/javascript">
-
-function resize_div()
-{
- var XHTML_NS = 'http://www.w3.org/1999/xhtml';
- document.getElementsByTagNameNS(XHTML_NS, 'div').item(0).style.width = '100%';
- document.documentElement.removeAttribute('class');
-}
-
-document.addEventListener("MozReftestInvalidate", resize_div, false);
-
- </script>
- </head>
- <body>
-
- <div style="width:50%;">
- <svg xmlns="http://www.w3.org/2000/svg" width="100%" height="5000">
- <rect width="100%" height="100%" fill="blue"/>
- </svg>
- </div>
-
- </body>
-</html>
View
4 layout/reftests/svg/sizing/reftest.list
@@ -303,10 +303,6 @@ random-if(Android) == object--auto-auto--px-px.html object--auto-auto--px
== dynamic--inline-css-height.xhtml pass.svg
== dynamic--inline-css-width.xhtml pass.svg
-# These two don't have a whole lot of point anymore now that the meaning
-# of percentages has changed.
-== dynamic--inline-resize-cb-height.xhtml standalone-sanity-height-150px.svg
-== dynamic--inline-resize-cb-width.xhtml standalone-sanity-width-300px.svg
skip == dynamic--inline-resize-window-height.xhtml pass.svg # XXX breaks the reftest run as the window height somehow is not restored
skip == dynamic--inline-resize-window-width.xhtml pass.svg # Fails way too much
fails random-if(Android) == dynamic--object-svg-unloaded.xhtml pass.svg
View
17 layout/style/viewsource.css
@@ -21,6 +21,7 @@
*
* Contributor(s):
* Blake Ross <BlakeR1234@aol.com>
+ * Geoff Lankow <geoff@darktrojan.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
@@ -47,6 +48,7 @@
font-family: -moz-fixed;
font-weight: normal;
white-space: pre;
+ counter-reset: line;
}
#viewsource.wrap {
white-space: pre-wrap;
@@ -56,7 +58,20 @@ pre {
font: inherit;
color: inherit;
white-space: inherit;
- margin: 0;
+ margin: 0 0 0 5ch;
+}
+pre[id]:before,
+span[id]:before {
+ content: counter(line) " ";
+ counter-increment: line;
+ -moz-user-select: none;
+ display: inline-block;
+ width: 5ch;
+ margin: 0 0 0 -5ch;
+ text-align: right;
+ color: #ccc;
+ font-weight: normal;
+ font-style: normal;
}
.start-tag {
color: purple;
View
2  layout/svg/crashtests/crashtests.list
@@ -59,7 +59,7 @@ load 385552-2.svg
load 385840-1.svg
load 385852-1.svg
load 386475-1.xhtml
-load 386566-1.svg
+asserts(1) load 386566-1.svg # Bug 713626
load 386690-1.svg
load 387290-1.svg
load 402408-1.svg
View
14 layout/tables/nsCellMap.cpp
@@ -1860,8 +1860,11 @@ nsCellMap::ExpandWithRows(nsTableCellMap& aMap,
}
newRowIndex++;
}
- SetDamageArea(0, aRgFirstRowIndex + startRowIndex, aMap.GetColCount(),
- 1 + endRowIndex - startRowIndex, aDamageArea);
+ // mark all following rows damaged, they might contain a previously set
+ // damage area which we can not shift.
+ PRInt32 firstDamagedRow = aRgFirstRowIndex + startRowIndex;
+ SetDamageArea(0, firstDamagedRow, aMap.GetColCount(),
+ aMap.GetRowCount() - firstDamagedRow, aDamageArea);
}
void nsCellMap::ExpandWithCells(nsTableCellMap& aMap,
@@ -2028,8 +2031,11 @@ void nsCellMap::ShrinkWithoutRows(nsTableCellMap& aMap,
mContentRowCount--;
}
aMap.RemoveColsAtEnd();
- SetDamageArea(0, aRgFirstRowIndex + aStartRowIndex, aMap.GetColCount(), 0,
- aDamageArea);
+ // mark all following rows damaged, they might contain a previously set
+ // damage area which we can not shift.
+ PRInt32 firstDamagedRow = aRgFirstRowIndex + aStartRowIndex;
+ SetDamageArea(0, firstDamagedRow, aMap.GetColCount(),
+ aMap.GetRowCount() - firstDamagedRow, aDamageArea);
}
PRInt32 nsCellMap::GetColSpanForNewCell(nsTableCellFrame& aCellFrameToAdd,
View
30 layout/tables/nsTableRowFrame.cpp
@@ -206,20 +206,14 @@ nsTableRowFrame::AppendFrames(ChildListID aListID,
{
NS_ASSERTION(aListID == kPrincipalList, "unexpected child list");
- // Append the frames
- // XXXbz why do we append here first, then append to table, while
- // for InsertFrames we do it in the other order? Bug 507419 covers this.
const nsFrameList::Slice& newCells = mFrames.AppendFrames(nsnull, aFrameList);
// Add the new cell frames to the table
nsTableFrame *tableFrame = nsTableFrame::GetTableFrame(this);
for (nsFrameList::Enumerator e(newCells) ; !e.AtEnd(); e.Next()) {
- nsTableCellFrame *cellFrame = do_QueryFrame(e.get());
- NS_ASSERTION(cellFrame, "Unexpected frame");
- if (cellFrame) {
- // Add the cell to the cell map
- tableFrame->AppendCell(*cellFrame, GetRowIndex());
- }
+ nsIFrame *childFrame = e.get();
+ NS_ASSERTION(IS_TABLE_CELL(childFrame->GetType()),"Not a table cell frame/pseudo frame construction failure");
+ tableFrame->AppendCell(static_cast<nsTableCellFrame&>(*childFrame), GetRowIndex());
}
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
@@ -238,22 +232,19 @@ nsTableRowFrame::InsertFrames(ChildListID aListID,
NS_ASSERTION(aListID == kPrincipalList, "unexpected child list");
NS_ASSERTION(!aPrevFrame || aPrevFrame->GetParent() == this,
"inserting after sibling frame with different parent");
+ //Insert Frames in the frame list
+ const nsFrameList::Slice& newCells = mFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);
// Get the table frame
nsTableFrame* tableFrame = nsTableFrame::GetTableFrame(this);
- // gather the new frames (only those which are cells) into an array
- // XXXbz there shouldn't be any other ones here... can we just put
- // them all in the array and not do all this QI nonsense?
nsIAtom* cellFrameType = (tableFrame->IsBorderCollapse()) ? nsGkAtoms::bcTableCellFrame : nsGkAtoms::tableCellFrame;
nsTableCellFrame* prevCellFrame = (nsTableCellFrame *)nsTableFrame::GetFrameAtOrBefore(this, aPrevFrame, cellFrameType);
nsTArray<nsTableCellFrame*> cellChildren;
- for (nsFrameList::Enumerator e(aFrameList); !e.AtEnd(); e.Next()) {
- nsTableCellFrame *cellFrame = do_QueryFrame(e.get());
- NS_ASSERTION(cellFrame, "Unexpected frame");
- if (cellFrame) {
- cellChildren.AppendElement(cellFrame);
- }
+ for (nsFrameList::Enumerator e(newCells); !e.AtEnd(); e.Next()) {
+ nsIFrame *childFrame = e.get();
+ NS_ASSERTION(IS_TABLE_CELL(childFrame->GetType()),"Not a table cell frame/pseudo frame construction failure");
+ cellChildren.AppendElement(static_cast<nsTableCellFrame*>(childFrame));
}
// insert the cells into the cell map
PRInt32 colIndex = -1;
@@ -261,9 +252,6 @@ nsTableRowFrame::InsertFrames(ChildListID aListID,
prevCellFrame->GetColIndex(colIndex);
}
tableFrame->InsertCells(cellChildren, GetRowIndex(), colIndex);
-
- // Insert the frames in the frame list
- mFrames.InsertFrames(nsnull, aPrevFrame, aFrameList);
PresContext()->PresShell()->FrameNeedsReflow(this, nsIPresShell::eTreeChange,
NS_FRAME_HAS_DIRTY_CHILDREN);
View
5 layout/tables/nsTableRowGroupFrame.cpp
@@ -955,6 +955,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
static_cast<nsTableFrame*>(aTable.GetFirstInFlow())->IsBorderCollapse();
PRInt32 lastRowIndex = aLastRow.GetRowIndex();
bool wasLast = false;
+ bool haveRowSpan = false;
// Iterate the rows between aFirstRow and aLastRow
for (nsTableRowFrame* row = &aFirstRow; !wasLast; row = row->GetNextRow()) {
wasLast = (row == &aLastRow);
@@ -966,6 +967,7 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
// Only reflow rowspan > 1 cells which span aLastRow. Those which don't span aLastRow
// were reflowed correctly during the unconstrained height reflow.
if ((rowSpan > 1) && (rowIndex + rowSpan > lastRowIndex)) {
+ haveRowSpan = true;
nsReflowStatus status;
// Ask the row to reflow the cell to the height of all the rows it spans up through aLastRow
// aAvailHeight is the space between the row group start and the end of the page
@@ -1021,6 +1023,9 @@ nsTableRowGroupFrame::SplitSpanningCells(nsPresContext& aPresContext,
}
}
}
+ if (!haveRowSpan) {
+ aDesiredHeight = aLastRow.GetRect().YMost();
+ }
}
// Remove the next-in-flow of the row, its cells and their cell blocks. This
View
2  memory/mozutils/mozutils.def.in
@@ -1,4 +1,4 @@
-; ***** BEGIN LICENSE BLOCK *****
+; ***** 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
View
64 mobile/android/base/AwesomeBar.java
@@ -68,10 +68,13 @@
import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.Button;
import android.widget.EditText;
+import android.widget.ExpandableListView;
import android.widget.ImageButton;
import android.widget.RelativeLayout;
import android.widget.ListView;
+import java.util.Map;
+
import org.mozilla.gecko.db.BrowserDB.URLColumns;
import org.mozilla.gecko.db.BrowserDB;
@@ -386,48 +389,75 @@ public void onDestroy() {
GeckoAppShell.unregisterGeckoEventListener("SearchEngines:Data", this);
}
- private Cursor mContextMenuCursor = null;
+ private Object mContextMenuSubject = null;
@Override
public void onCreateContextMenu(ContextMenu menu, View view, ContextMenuInfo menuInfo) {
super.onCreateContextMenu(menu, view, menuInfo);
-
- AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
ListView list = (ListView) view;
- Object selecteditem = list.getItemAtPosition(info.position);
+ Object selectedItem = null;
+ String title = "";
+
+ if (view == (ListView)findViewById(R.id.history_list)) {
+ ExpandableListView.ExpandableListContextMenuInfo info = (ExpandableListView.ExpandableListContextMenuInfo) menuInfo;
+ ExpandableListView exList = (ExpandableListView)list;
+ int childPosition = exList.getPackedPositionChild(info.packedPosition);
+ int groupPosition = exList.getPackedPositionGroup(info.packedPosition);
+ selectedItem = exList.getExpandableListAdapter().getChild(groupPosition, childPosition);
+
+ Map<String, Object> map = (Map<String, Object>)selectedItem;
+ title = (String)map.get(URLColumns.TITLE);
+ } else {
+ AdapterView.AdapterContextMenuInfo info = (AdapterView.AdapterContextMenuInfo) menuInfo;
+ selectedItem = list.getItemAtPosition(info.position);
+
+ Cursor cursor = (Cursor)selectedItem;
+ title = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE));
+ }
- if (!(selecteditem instanceof Cursor)) {
- mContextMenuCursor = null;
+ if (selectedItem == null || !((selectedItem instanceof Cursor) || (selectedItem instanceof Map))) {
+ mContextMenuSubject = null;
return;
}
- mContextMenuCursor = (Cursor) selecteditem;
+ mContextMenuSubject = selectedItem;
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.awesomebar_contextmenu, menu);
- String title = mContextMenuCursor.getString(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.TITLE));
menu.setHeaderTitle(title);
}
@Override
public boolean onContextItemSelected(MenuItem item) {
- if (mContextMenuCursor == null)
+ if (mContextMenuSubject == null)
return false;
- AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
+ String url = "";
+ byte[] b = null;
+ String title = "";
+ if (mContextMenuSubject instanceof Cursor) {
+ Cursor cursor = (Cursor)mContextMenuSubject;
+ url = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.URL));
+ b = (byte[]) cursor.getBlob(cursor.getColumnIndexOrThrow(URLColumns.FAVICON));
+ title = cursor.getString(cursor.getColumnIndexOrThrow(URLColumns.TITLE));
+ } else if (mContextMenuSubject instanceof Map) {
+ Map<String, Object> map = (Map<String, Object>)mContextMenuSubject;
+ url = (String)map.get(URLColumns.URL);
+ b = (byte[]) map.get(URLColumns.FAVICON);
+ title = (String)map.get(URLColumns.TITLE);
+ } else {
+ return false;
+ }
+
+ mContextMenuSubject = null;
switch (item.getItemId()) {
case R.id.open_new_tab: {
- String url = mContextMenuCursor.getString(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.URL));
GeckoApp.mAppContext.loadUrl(url, AwesomeBar.Type.ADD);
break;
}
case R.id.add_to_launcher: {
- String url = mContextMenuCursor.getString(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.URL));
- byte[] b = (byte[]) mContextMenuCursor.getBlob(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.FAVICON));
- String title = mContextMenuCursor.getString(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.TITLE));
-
Bitmap bitmap = null;
if (b != null)
bitmap = BitmapFactory.decodeByteArray(b, 0, b.length);
@@ -436,18 +466,14 @@ public boolean onContextItemSelected(MenuItem item) {
break;
}
case R.id.share: {
- String url = mContextMenuCursor.getString(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.URL));
- String title = mContextMenuCursor.getString(mContextMenuCursor.getColumnIndexOrThrow(URLColumns.TITLE));
GeckoAppShell.openUriExternal(url, "text/plain", "", "",
Intent.ACTION_SEND, title);
break;
}
default: {
- mContextMenuCursor = null;
return super.onContextItemSelected(item);
}
}
- mContextMenuCursor = null;
return true;
}
View
2  mobile/android/base/GeckoPreferences.java
@@ -142,7 +142,7 @@ public boolean onOptionsItemSelected(MenuItem item) {
@Override
public boolean onPreferenceChange(Preference preference, Object newValue) {
String prefName = preference.getKey();
- if (prefName.equals("privacy.masterpassword.enabled")) {
+ if (prefName != null && prefName.equals("privacy.masterpassword.enabled")) {
showDialog((Boolean)newValue ? DIALOG_CREATE_MASTER_PASSWORD : DIALOG_REMOVE_MASTER_PASSWORD);
return false;
}
View
2  mobile/android/base/Tabs.java
@@ -141,7 +141,7 @@ public void closeTab(Tab tab) {
/** Close tab and then select nextTab */
public void closeTab(Tab tab, Tab nextTab) {
- if (tab == null)
+ if (tab == null || nextTab == null)
return;
GeckoAppShell.sendEventToGecko(new GeckoEvent("Tab:Select", String.valueOf(nextTab.getId())));
View
2  mobile/android/base/ui/PanZoomController.java
@@ -959,6 +959,7 @@ public boolean onScaleBegin(ScaleGestureDetector detector) {
mState = PanZoomState.PINCHING;
mLastZoomFocus = new PointF(detector.getFocusX(), detector.getFocusY());
GeckoApp.mAppContext.hidePluginViews();
+ GeckoApp.mAppContext.mAutoCompletePopup.hide();
cancelTouch();
return true;
@@ -1075,6 +1076,7 @@ public boolean onDoubleTap(MotionEvent motionEvent) {
private boolean animatedZoomTo(RectF zoomToRect) {
GeckoApp.mAppContext.hidePluginViews();
+ GeckoApp.mAppContext.mAutoCompletePopup.hide();
mState = PanZoomState.ANIMATED_ZOOM;
final float startZoom = mController.getZoomFactor();
View
3  mobile/android/chrome/content/about.xhtml
@@ -84,11 +84,12 @@
<li><a href="about:rights">&aboutPage.rights.label;</a></li>
<li><a id="releaseNotesURL">&aboutPage.relNotes.label;</a></li>
<li><a id="creditsURL">&aboutPage.credits.label;</a></li>
+ <li><a href="about:license">&aboutPage.license.label;</a></li>
<div class="bottom-border"></div>
</ul>
<div id="aboutDetails">
- <p id="license"><b><a href="about:license">&aboutPage.licenseLink;</a>&aboutPage.licenseLinkSuffix;</b> &logoTrademark;</p>
+ <p>&logoTrademark;</p>
</div>
<script type="application/javascript;version=1.8"><![CDATA[
View
16 mobile/android/chrome/content/browser.js
@@ -3341,7 +3341,7 @@ var PluginHelper = {
var PermissionsHelper = {
- _permissonTypes: ["password", "geo", "popup", "indexedDB",
+ _permissonTypes: ["password", "geolocation", "popup", "indexedDB",
"offline-app", "desktop-notification"],
_permissionStrings: {
"password": {
@@ -3349,10 +3349,10 @@ var PermissionsHelper = {
allowed: "password.remember",
denied: "password.never"
},
- "geo": {
+ "geolocation": {
label: "geolocation.shareLocation",
- allowed: "geolocation.alwaysShare",
- denied: "geolocation.neverShare"
+ allowed: "geolocation.alwaysAllow",
+ denied: "geolocation.neverAllow"
},
"popup": {
label: "blockPopups.label",
@@ -3444,7 +3444,7 @@ var PermissionsHelper = {
*
* @param aType
* The permission type string stored in permission manager.
- * e.g. "cookie", "geo", "indexedDB", "popup", "image"
+ * e.g. "geolocation", "indexedDB", "popup"
*
* @return A permission value defined in nsIPermissionManager.
*/
@@ -3465,7 +3465,7 @@ var PermissionsHelper = {
}
// Geolocation consumers use testExactPermission
- if (aType == "geo")
+ if (aType == "geolocation")
return Services.perms.testExactPermission(aURI, aType);
return Services.perms.testPermission(aURI, aType);
@@ -3476,7 +3476,7 @@ var PermissionsHelper = {
*
* @param aType
* The permission type string stored in permission manager.
- * e.g. "cookie", "geo", "indexedDB", "popup", "image"
+ * e.g. "geolocation", "indexedDB", "popup"
*/
clearPermission: function clearPermission(aURI, aType) {
// Password saving isn't a nsIPermissionManager permission type, so handle
@@ -3497,6 +3497,8 @@ var PermissionsHelper = {
var MasterPassword = {
pref: "privacy.masterpassword.enabled",
+ _tokenName: "",
+
get _secModuleDB() {
delete this._secModuleDB;
return this._secModuleDB = Cc["@mozilla.org/security/pkcs11moduledb;1"].getService(Ci.nsIPKCS11ModuleDB);
View
16 mobile/android/locales/en-US/chrome/about.dtd
@@ -1,18 +1,12 @@
<!ENTITY aboutPage.title "About &brandShortName;">
+<!ENTITY aboutPage.checkForUpdates.link "Check for Updates »">
+<!ENTITY aboutPage.checkForUpdates.checking "Looking for updates…">
+<!ENTITY aboutPage.checkForUpdates.none "No updates available">
+<!ENTITY aboutPage.checkForUpdates.found "Update available">
<!ENTITY aboutPage.faq.label "FAQ">
<!ENTITY aboutPage.support.label "Support">
<!ENTITY aboutPage.privacyPolicy.label "Privacy Policy">
<!ENTITY aboutPage.rights.label "Know Your Rights">
<!ENTITY aboutPage.relNotes.label "Release Notes">
<!ENTITY aboutPage.credits.label "Credits">
-<!ENTITY aboutPage.checkForUpdates.link "Check for Updates »">
-<!ENTITY aboutPage.checkForUpdates.checking "Looking for updates…">
-<!ENTITY aboutPage.checkForUpdates.none "No updates available">
-<!ENTITY aboutPage.checkForUpdates.found "Update available">
-
-
-<!-- LOCALIZATION NOTE:
- These strings are concatenated in order. Unneeded strings may be left blank.
--->
-<!ENTITY aboutPage.licenseLink "Licensing information">
-<!ENTITY aboutPage.licenseLinkSuffix ".">
+<!ENTITY aboutPage.license.label "Licensing Information">
View
2  mobile/android/themes/core/aboutPage.css
@@ -103,7 +103,7 @@ body {
}
#aboutLinks > li {
- line-height: 3;
+ line-height: 2.6;
border-top: 1px solid white;
border-bottom: 1px solid #C1C7CC;
}
View
51 parser/htmlparser/tests/reftest/bug482921-1-ref.html
@@ -1,24 +1,27 @@
-<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="doctype">&lt;!DOCTYPE html&gt;</span>
-<span>&lt;<span class="start-tag">html</span>&gt;</span>
-<span>&lt;<span class="start-tag">head</span>&gt;</span>
-<span>&lt;<span class="start-tag">title</span>&gt;</span><span>Title</span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
-<span>&lt;<span class="start-tag">script</span>&gt;</span>
-var lt = "&lt;";
-&lt;!--
-var s = "&lt;script&gt;foo&lt;/script&gt;";
---&gt;
-<span class="end-tag">&lt;/script&gt;</span><span></span><span class="comment">&lt;!-- Not quite optimal highlight there. --&gt;</span>
-<span>&lt;<span class="start-tag">style</span>&gt;</span>
-/* &lt;/foo&gt; */
-<span>&lt;/<span class="end-tag">style</span>&gt;</span>
-<span>&lt;/<span class="end-tag">head</span>&gt;</span>
-<span>&lt;<span class="start-tag">body</span>&gt;</span>
-<span>&lt;<span class="start-tag">p</span>&gt;</span><span>Entity: <span class="entity"><span>&amp;</span>amp; </span></span><span>&lt;/<span class="end-tag">p</span>&gt;</span>
-<span>&lt;<span class="start-tag">iframe</span>&gt;</span>&lt;img&gt;<span>&lt;/<span class="end-tag">iframe</span>&gt;</span>
-<span>&lt;<span class="start-tag">noscript</span>&gt;</span>&lt;p&gt;Not para&lt;/p&gt;<span>&lt;/<span class="end-tag">noscript</span>&gt;</span>
-<span>&lt;<span class="start-tag">svg</span>&gt;</span>
-<span>&lt;<span class="start-tag">title</span>&gt;</span><span></span><span class="cdata">&lt;![CDATA[bar]]&gt;</span><span></span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
-<span>&lt;<span class="start-tag">script</span>&gt;</span><span></span><span class="comment">&lt;!-- this is a comment --&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span>
-<span>&lt;/<span class="end-tag">svg</span>&gt;</span>
-<span>&lt;/<span class="end-tag">body</span>&gt;</span>
-<span>&lt;/<span class="end-tag">html</span>&gt;</span>
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><pre id><span class="doctype">&lt;!DOCTYPE html&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">html</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">head</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">title</span>&gt;</span><span>Title</span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">script</span>&gt;</span>
+<span id></span>var lt = "&lt;";
+<span id></span>&lt;!--
+<span id></span>var s = "&lt;script&gt;foo&lt;/script&gt;";
+<span id></span>--&gt;
+<span id></span><span class="end-tag">&lt;/script&gt;</span><span></span><span class="comment">&lt;!-- Not quite optimal highlight there. --&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">style</span>&gt;</span>
+<span id></span>/* &lt;/foo&gt; */
+<span id></span><span>&lt;/<span class="end-tag">style</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">head</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">body</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">p</span>&gt;</span><span>Entity: <span class="entity"><span>&amp;</span>amp; </span></span><span>&lt;/<span class="end-tag">p</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">iframe</span>&gt;</span>&lt;img&gt;<span>&lt;/<span class="end-tag">iframe</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">noscript</span>&gt;</span>&lt;p&gt;Not para&lt;/p&gt;<span>&lt;/<span class="end-tag">noscript</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">svg</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">title</span>&gt;</span><span></span><span class="cdata">&lt;![CDATA[bar]]&gt;</span><span></span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">script</span>&gt;</span><span></span><span class="comment">&lt;!-- this is a comment --&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">svg</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">body</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">html</span>&gt;</span>
+<span id></span>
+</pre>
+<!-- View source CSS matches the <pre id> and <span id> elements and produces line numbers. -->
View
53 parser/htmlparser/tests/reftest/bug482921-2-ref.html
@@ -1,25 +1,28 @@
-<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="pi">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
-<span class="pi">&lt;?foo bar?&gt;</span>
-<span>&lt;<span class="start-tag">html</span>&gt;</span>
-<span>&lt;<span class="start-tag">head</span>&gt;</span>
-<span>&lt;<span class="start-tag">title</span>&gt;</span><span>Title</span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
-<span>&lt;<span class="start-tag">script</span>&gt;</span>
-var s = "<span>&lt;<span class="start-tag">script</span>&gt;</span><span>foo</span><span>&lt;/<span class="end-tag">script</span>&gt;</span>";
-<span class="comment">&lt;!--
-var s = "&lt;script&gt;foo&lt;/script&gt;";
---&gt;</span>
-<span>&lt;/<span class="end-tag">script</span>&gt;</span><span></span>
-<span>&lt;<span class="start-tag">style</span>&gt;</span>
-/* <span>&lt;<span class="start-tag">foo</span><span>/</span>&gt;</span> */
-<span>&lt;/<span class="end-tag">style</span>&gt;</span>
-<span>&lt;/<span class="end-tag">head</span>&gt;</span>
-<span>&lt;<span class="start-tag">body</span>&gt;</span>
-<span>&lt;<span class="start-tag">p</span>&gt;</span><span>Entity: <span class="entity"><span>&amp;</span>amp; </span></span><span>&lt;/<span class="end-tag">p</span>&gt;</span>
-<span>&lt;<span class="start-tag">iframe</span>&gt;</span><span></span><span>&lt;<span class="start-tag">img</span>&gt;</span><span>&lt;/<span class="end-tag">iframe</span>&gt;</span>
-<span>&lt;<span class="start-tag">noscript</span>&gt;</span><span>&lt;<span class="start-tag">p</span>&gt;</span><span>Not para</span><span>&lt;/<span class="end-tag">p</span>&gt;</span><span>&lt;/<span class="end-tag">noscript</span>&gt;</span>
-<span>&lt;<span class="start-tag">svg</span>&gt;</span>
-<span>&lt;<span class="start-tag">title</span>&gt;</span><span></span><span class="cdata">&lt;![CDATA[bar]]&gt;</span><span></span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
-<span>&lt;<span class="start-tag">script</span>&gt;</span><span></span><span class="comment">&lt;!-- this is a comment --&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span>
-<span>&lt;/<span class="end-tag">svg</span>&gt;</span>
-<span>&lt;/<span class="end-tag">body</span>&gt;</span>
-<span>&lt;/<span class="end-tag">html</span>&gt;</span>
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><pre id><span class="pi">&lt;?xml version="1.0" encoding="utf-8"?&gt;</span>
+<span id></span><span class="pi">&lt;?foo bar?&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">html</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">head</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">title</span>&gt;</span><span>Title</span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">script</span>&gt;</span>
+<span id></span>var s = "<span>&lt;<span class="start-tag">script</span>&gt;</span><span>foo</span><span>&lt;/<span class="end-tag">script</span>&gt;</span>";
+<span id></span><span class="comment">&lt;!--
+<span id></span>var s = "&lt;script&gt;foo&lt;/script&gt;";
+<span id></span>--&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">script</span>&gt;</span><span></span>
+<span id></span><span>&lt;<span class="start-tag">style</span>&gt;</span>
+<span id></span>/* <span>&lt;<span class="start-tag">foo</span><span>/</span>&gt;</span> */
+<span id></span><span>&lt;/<span class="end-tag">style</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">head</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">body</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">p</span>&gt;</span><span>Entity: <span class="entity"><span>&amp;</span>amp; </span></span><span>&lt;/<span class="end-tag">p</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">iframe</span>&gt;</span><span></span><span>&lt;<span class="start-tag">img</span>&gt;</span><span>&lt;/<span class="end-tag">iframe</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">noscript</span>&gt;</span><span>&lt;<span class="start-tag">p</span>&gt;</span><span>Not para</span><span>&lt;/<span class="end-tag">p</span>&gt;</span><span>&lt;/<span class="end-tag">noscript</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">svg</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">title</span>&gt;</span><span></span><span class="cdata">&lt;![CDATA[bar]]&gt;</span><span></span><span>&lt;/<span class="end-tag">title</span>&gt;</span>
+<span id></span><span>&lt;<span class="start-tag">script</span>&gt;</span><span></span><span class="comment">&lt;!-- this is a comment --&gt;</span><span></span><span>&lt;/<span class="end-tag">script</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">svg</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">body</span>&gt;</span>
+<span id></span><span>&lt;/<span class="end-tag">html</span>&gt;</span>
+<span id></span>
+</pre>
+<!-- View source CSS matches the <pre id> and <span id> elements and produces line numbers. -->
View
30 parser/htmlparser/tests/reftest/bug535530-2-ref.html
@@ -1,13 +1,17 @@
-<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="doctype">&lt;!DOCTYPE html&gt;</span>
-XX<span class="error">&amp;</span>XX
-XX<span class="error">&amp;</span>nXX
-XX<span class="error">&amp;</span>noXX
-XX<span class="error entity">&amp;not</span>XX
-XX<span class="error entity">&amp;noti</span>XX
-XX<span class="error entity">&amp;notin</span>XX
-XX<span class="error">&amp;</span>;XX
-XX<span class="error">&amp;</span>n;XX
-XX<span class="error">&amp;</span>no;XX
-XX<span class="entity">&amp;not;</span>XX
-XX<span class="error entity">&amp;noti</span>;XX
-XX<span class="entity">&amp;notin;</span>XX
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><pre id><span class="doctype">&lt;!DOCTYPE html&gt;</span>
+<span id></span>XX<span class="error">&amp;</span>XX
+<span id></span>XX<span class="error">&amp;</span>nXX
+<span id></span>XX<span class="error">&amp;</span>noXX
+<span id></span>XX<span class="error entity">&amp;not</span>XX
+<span id></span>XX<span class="error entity">&amp;noti</span>XX
+<span id></span>XX<span class="error entity">&amp;notin</span>XX
+<span id></span>XX<span class="error">&amp;</span>;XX
+<span id></span>XX<span class="error">&amp;</span>n;XX
+<span id></span>XX<span class="error">&amp;</span>no;XX
+<span id></span>XX<span class="entity">&amp;not;</span>XX
+<span id></span>XX<span class="error entity">&amp;noti</span>;XX
+<span id></span>XX<span class="entity">&amp;notin;</span>XX
+<span id></span>
+<span id></span>
+</pre>
+<!-- View source CSS matches the <pre id> and <span id> elements and produces line numbers. -->
View
5 parser/htmlparser/tests/reftest/bug704667-1-ref.html
@@ -1 +1,4 @@
-<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><span class="error comment">&lt;!--&gt;</span> <span class="error comment">&lt;!X&gt;</span>
+<!DOCTYPE html><html><head><title></title><link rel="stylesheet" type="text/css" href="resource://gre-resources/viewsource.css"></head><body id="viewsource" class="wrap"><pre id><span class="error comment">&lt;!--&gt;</span> <span class="error comment">&lt;!X&gt;</span>
+<span id></span>
+</pre>
+<!-- View source CSS matches the <pre id> and <span id> elements and produces line numbers. -->
View
49 testing/mochitest/MockFilePicker.jsm
@@ -1,5 +1,5 @@
/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1
+ * 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
@@ -11,7 +11,7 @@
* for the specific language governing rights and limitations under the
* License.
*
- * The Original Code is Mochitest Reusable Mock File Picker.
+ * The Original Code is Reusable Mock File Picker.
*
* The Initial Developer of the Original Code is
* Geoff Lankow <geoff@darktrojan.net>.
@@ -20,6 +20,18 @@
*
* Contributor(s):
*
+ * 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 ***** */
var EXPORTED_SYMBOLS = ["MockFilePicker"];
@@ -30,15 +42,15 @@ const Cm = Components.manager;
const Cu = Components.utils;
const CONTRACT_ID = "@mozilla.org/filepicker;1";
-const CLASS_ID = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID();
Cu.import("resource://gre/modules/FileUtils.jsm");
Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
var registrar = Cm.QueryInterface(Ci.nsIComponentRegistrar);
-
-var MockFilePickerFactory = {
+var oldClassID, oldFactory;
+var newClassID = Cc["@mozilla.org/uuid-generator;1"].getService(Ci.nsIUUIDGenerator).generateUUID();
+var newFactory = {
createInstance: function(aOuter, aIID) {
if (aOuter)
throw Components.results.NS_ERROR_NO_AGGREGATION;
@@ -66,6 +78,16 @@ var MockFilePicker = {
filterAudio: Ci.nsIFilePicker.filterAudio,
filterVideo: Ci.nsIFilePicker.filterVideo,
+ init: function() {
+ this.reset();
+ if (!registrar.isCIDRegistered(newClassID)) {
+ oldClassID = registrar.contractIDToCID(CONTRACT_ID);
+ oldFactory = Cm.getClassObject(Cc[CONTRACT_ID], Ci.nsIFactory);
+ registrar.unregisterFactory(oldClassID, oldFactory);
+ registrar.registerFactory(newClassID, "", CONTRACT_ID, newFactory);
+ }
+ },
+
reset: function() {
this.appendFilterCallback = null;
this.appendFiltersCallback = null;
@@ -76,8 +98,14 @@ var MockFilePicker = {
this.returnValue = null;
this.showCallback = null;
this.shown = false;
- if (!registrar.isCIDRegistered(CLASS_ID))
- registrar.registerFactory(CLASS_ID, "", CONTRACT_ID, MockFilePickerFactory);
+ },
+
+ cleanup: function() {
+ this.reset();
+ if (oldFactory) {
+ registrar.unregisterFactory(newClassID, newFactory);
+ registrar.registerFactory(oldClassID, "", CONTRACT_ID, oldFactory);
+ }
},
useAnyFile: function() {
@@ -131,8 +159,11 @@ MockFilePickerInstance.prototype = {
show: function() {
MockFilePicker.displayDirectory = this.displayDirectory;
MockFilePicker.shown = true;
- if (typeof MockFilePicker.showCallback == "function")
- MockFilePicker.showCallback(this);
+ if (typeof MockFilePicker.showCallback == "function") {
+ var returnValue = MockFilePicker.showCallback(this);
+ if (typeof returnValue != "undefined")
+ return returnValue;
+ }
return MockFilePicker.returnValue;
}
};
View
11 testing/mozbase/README
@@ -1,7 +1,10 @@
-This is the git repo for the mozbase suite of python utilities.
+This is the git repo for the Mozilla mozbase suite of python utilities.
-Learn more about mozbase here: https://wiki.mozilla.org/Auto-tools/Projects/MozBase
+Learn more about mozbase here:
+https://wiki.mozilla.org/Auto-tools/Projects/MozBase
-Bugs live at https://bugzilla.mozilla.org/buglist.cgi?resolution=---&component=Mozbase&product=Testing and https://bugzilla.mozilla.org/buglist.cgi?resolution=---&status_whiteboard_type=allwordssubstr&query_format=advanced&status_whiteboard=mozbase
+Bugs live at
+https://bugzilla.mozilla.org/buglist.cgi?resolution=---&component=Mozbase&product=Testing and https://bugzilla.mozilla.org/buglist.cgi?resolution=---&status_whiteboard_type=allwordssubstr&query_format=advanced&status_whiteboard=mozbase
-To file a bug, go to https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Mozbase
+To file a bug, go to
+https://bugzilla.mozilla.org/enter_bug.cgi?product=Testing&component=Mozbase
View
9 testing/mozbase/docs.manifest
@@ -0,0 +1,9 @@
+#!/usr/bin/env document-it
+# documentation manifest for the Mozbase repo
+# To generate HTML from this markdown, use document_it:
+# http://pypi.python.org/pypi/document_it
+
+mozinfo/README.md en/Mozinfo
+mozprocess/README.md en/Mozprocess
+mozprofile/README.md en/Mozprofile
+mozrunner/README.md en/Mozrunner
View
10 testing/mozbase/manifestdestiny/README.md
@@ -10,11 +10,11 @@ What ManifestDestiny gives you:
are just dicts with some keys. For example, a test with no
user-specified metadata looks like this:
- [{'path':
- '/home/jhammel/mozmill/src/ManifestDestiny/manifestdestiny/tests/testToolbar/testBackForwardButtons.js',
- 'name': 'testToolbar/testBackForwardButtons.js', 'here':
- '/home/jhammel/mozmill/src/ManifestDestiny/manifestdestiny/tests',
- 'manifest': '/home/jhammel/mozmill/src/ManifestDestiny/manifestdestiny/tests',}]
+ [{'path':
+ '/home/jhammel/mozmill/src/ManifestDestiny/manifestdestiny/tests/testToolbar/testBackForwardButtons.js',
+ 'name': 'testToolbar/testBackForwardButtons.js', 'here':
+ '/home/jhammel/mozmill/src/ManifestDestiny/manifestdestiny/tests',
+ 'manifest': '/home/jhammel/mozmill/src/ManifestDestiny/manifestdestiny/tests',}]
The keys displayed here (path, name, here, and manifest) are reserved
keys for ManifestDestiny and any consuming APIs. You can add
View
10 testing/mozbase/mozinstall/mozinstall/mozinstall.py
@@ -170,12 +170,18 @@ def _install_dmg(src, dest):
if appFile.endswith(".app"):
appName = appFile
break
- subprocess.call("cp -r " + os.path.join(appDir, appName) + " " + dest,
+
+ dest = os.path.join(dest, appName)
+ assert not os.path.isfile(dest)
+ if not os.path.isdir(dest):
+ os.makedirs(dest)
+ subprocess.call("cp -r " +
+ os.path.join(appDir,appName, "*") + " " + dest,
shell=True)
finally:
subprocess.call("hdiutil detach " + appDir + " -quiet",
shell=True)
- return os.path.join(dest, appName)
+ return dest
def _install_exe(src, dest):
# possibly gets around UAC in vista (still need to run as administrator)
View
24 testing/mozbase/mozprocess/mozprocess/processhandler.py
@@ -46,6 +46,7 @@
import sys
import threading
import time
+import traceback
from Queue import Queue
from datetime import datetime, timedelta
@@ -111,7 +112,10 @@ def setpgidfn():
def __del__(self, _maxint=sys.maxint):
if mozinfo.isWin:
if self._handle:
- self._internal_poll(_deadstate=_maxint)
+ if hasattr(self, '_internal_poll'):
+ self._internal_poll(_deadstate=_maxint)
+ else:
+ self.poll(_deadstate=sys.maxint)
if self._handle or self._job or self._io_port:
self._cleanup()
else:
@@ -257,13 +261,15 @@ def _execute_child(self, args, executable, preexec_fn, close_fds,
except:
print >> sys.stderr, """Exception trying to use job objects;
falling back to not using job objects for managing child processes"""
+ tb = traceback.format_exc()
+ print >> sys.stderr, tb
# Ensure no dangling handles left behind
self._cleanup_job_io_port()
else:
self._job = None
winprocess.ResumeThread(int(ht))
- if self._procmgrthread:
+ if getattr(self, '_procmgrthread', None):
self._procmgrthread.start()
ht.Close()
@@ -373,7 +379,13 @@ def _wait(self):
# Dude, the process is like totally dead!
return self.returncode
- if self._job and self._procmgrthread.is_alive():
+ # Python 2.5 uses isAlive versus is_alive use the proper one
+ threadalive = False
+ if hasattr(self._procmgrthread, 'is_alive'):
+ threadalive = self._procmgrthread.is_alive()
+ else:
+ threadalive = self._procmgrthread.isAlive()
+ if self._job and threadalive:
# Then we are managing with IO Completion Ports
# wait on a signal so we know when we have seen the last
# process come through.
@@ -429,7 +441,7 @@ def _cleanup_job_io_port(self):
cases where we want to clean these without killing _handle
(i.e. if we fail to create the job object in the first place)
"""
- if self._job and self._job != winprocess.INVALID_HANDLE_VALUE:
+ if getattr(self, '_job') and self._job != winprocess.INVALID_HANDLE_VALUE:
self._job.Close()
self._job = None
else:
@@ -437,13 +449,13 @@ def _cleanup_job_io_port(self):
# (saw this intermittently while testing)
self._job = None
- if self._io_port and self._io_port != winprocess.INVALID_HANDLE_VALUE:
+ if getattr(self, '_io_port', None) and self._io_port != winprocess.INVALID_HANDLE_VALUE:
self._io_port.Close()
self._io_port = None
else:
self._io_port = None
- if self._procmgrthread:
+ if getattr(self, '_procmgrthread', None):
self._procmgrthread = None
def _cleanup(self):
View
2  testing/mozbase/mozprocess/mozprocess/winprocess.py
@@ -255,7 +255,7 @@ def ErrCheckCreateProcess(result, func, args):
DWORD # Number of Threads
)
CreateIoCompletionPortFlags = ((1, "FileHandle", INVALID_HANDLE_VALUE),
- (1, "ExistingCompletionPort", None),
+ (1, "ExistingCompletionPort", 0),
(1, "CompletionKey", c_ulong(0)),
(1, "NumberOfConcurrentThreads", 0))
CreateIoCompletionPort = CreateIoCompletionPortProto(("CreateIoCompletionPort",
View
4 testing/mozbase/mozprocess/setup.py
@@ -56,8 +56,8 @@
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
keywords='',
author='Mozilla Automation and Testing Team',
- author_email='mozmill-dev@googlegroups.com',
- url='http://github.com/mozautomation/mozmill',
+ author_email='tools@lists.mozilla.com',
+ url='https://github.com/mozilla/mozbase/tree/master/mozprocess',
license='MPL',
packages=find_packages(exclude=['ez_setup', 'examples', 'tests']),
include_package_data=True,
View
57 testing/mozbase/mozprocess/tests/Makefile
@@ -0,0 +1,57 @@
+#
+# proclaunch tests Makefile
+#
+UNAME := $(shell uname -s)
+ifeq ($(UNAME), MINGW32_NT-6.1)
+WIN32 = 1
+endif
+ifeq ($(UNAME), MINGW32_NT-5.1)
+WIN32 = 1
+endif
+
+ifeq ($(WIN32), 1)
+CC = cl
+LINK = link
+CFLAGS = //Od //I "iniparser" //D "WIN32" //D "_WIN32" //D "_DEBUG" //D "_CONSOLE" //D "_UNICODE" //D "UNICODE" //Gm //EHsc //RTC1 //MDd //W3 //nologo //c //ZI //TC
+LFLAGS = //OUT:"proclaunch.exe" //INCREMENTAL //LIBPATH:"iniparser\\" //NOLOGO //DEBUG //SUBSYSTEM:CONSOLE //DYNAMICBASE //NXCOMPAT //MACHINE:X86 //ERRORREPORT:PROMPT iniparser.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
+RM = rm -f
+
+default: all
+all: iniparser proclaunch
+
+iniparser:
+ $(MAKE) -C iniparser
+
+proclaunch.obj: proclaunch.c
+ $(CC) $(CFLAGS) proclaunch.c
+
+proclaunch: proclaunch.obj
+ $(LINK) $(LFLAGS) proclaunch.obj
+
+else
+CC = gcc
+ifeq ($(UNAME), Linux)
+CFLAGS = -g -v -Iiniparser
+else
+CFLAGS = -g -v -arch i386 -Iiniparser
+endif
+
+LFLAGS = -L.. -liniparser
+AR = ar
+ARFLAGS = rcv
+RM = rm -f
+
+
+default: all
+
+all: libiniparser.a proclaunch
+
+libiniparser.a:
+ $(MAKE) -C iniparser
+
+proclaunch: proclaunch.c
+ $(CC) $(CFLAGS) -o proclaunch proclaunch.c -Iiniparser -Liniparser -liniparser
+
+clean veryclean:
+ $(RM) proclaunch
+endif
View
6 testing/mozbase/mozprocess/tests/iniparser/AUTHORS
@@ -0,0 +1,6 @@
+Author: Nicolas Devillard <ndevilla@free.fr>
+
+This tiny library has received countless contributions and I have
+not kept track of all the people who contributed. Let them be thanked
+for their ideas, code, suggestions, corrections, enhancements!
+
View
15 testing/mozbase/mozprocess/tests/iniparser/INSTALL
@@ -0,0 +1,15 @@
+
+iniParser installation instructions
+-----------------------------------
+
+- Modify the Makefile to suit your environment.
+- Type 'make' to make the library.
+- Type 'make check' to make the test program.
+- Type 'test/iniexample' to launch the test program.
+- Type 'test/parse' to launch torture tests.
+
+
+
+Enjoy!
+N. Devillard
+Wed Mar 2 21:14:17 CET 2011
View
21 testing/mozbase/mozprocess/tests/iniparser/LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2000-2011 by Nicolas Devillard.
+MIT License
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the "Software"),
+to deal in the Software without restriction, including without limitation
+the rights to use, copy, modify, merge, publish, distribute, sublicense,
+and/or sell copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+DEALINGS IN THE SOFTWARE.
+
View
118 testing/mozbase/mozprocess/tests/iniparser/Makefile
@@ -0,0 +1,118 @@
+#
+# iniparser Makefile
+#
+UNAME := $(shell uname -s)
+ifeq ($(UNAME), MINGW32_NT-6.1)
+WIN32 = 1
+endif
+ifeq ($(UNAME), MINGW32_NT-5.1)
+WIN32 = 1
+endif
+
+ifeq ($(UNAME), Linux)
+ # Compiler settings
+ CC = gcc
+ # Ar settings to build the library
+ AR = ar
+ ARFLAGS = rcv
+ SHLD = ${CC} ${CFLAGS}
+ CFLAGS = -O2 -fPIC -Wall -ansi -pedantic
+ LDSHFLAGS = -shared -Wl,-Bsymbolic -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+ LDFLAGS = -Wl,-rpath -Wl,/usr/lib -Wl,-rpath,/usr/lib
+endif
+
+ifeq ($(UNAME), Darwin)
+ # Compiler settings
+ CC = gcc
+ # Ar settings to build the library
+ AR = ar
+ ARFLAGS = rcv
+ #SHLD = ${CC} ${CFLAGS}
+ SHLD = libtool
+ CFLAGS = -v -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -fPIC -Wall -ansi -pedantic
+ LDFLAGS = -arch_only i386
+endif
+
+ifeq ($(WIN32), 1)
+ CC = cl
+ CFLAGS = //Od //D "_WIN32" //D "WIN32" //D "_CONSOLE" //D "_CRT_SECURE_NO_WARNINGS" //D "_UNICODE" //D "UNICODE" //Gm //EHsc //RTC1 //MDd //W3 //nologo //c //ZI //TC
+ LDFLAGS = //OUT:"iniparser.lib" //NOLOGO
+ LINK = lib
+endif
+
+ifeq ($(WIN32), 1)
+SUFFIXES = .obj .c .h .lib
+
+COMPILE.c=$(CC) $(CFLAGS) -c
+
+#.c.obj:
+# @(echo "compiling $< ...")
+# @($(COMPILE.c) $@ $<)
+
+all: iniparser.obj dictionary.obj iniparser.lib
+
+SRCS = iniparser.c \
+ dictionary.c
+OBJS = $(SRCS:.c=.obj)
+
+iniparser.obj: dictionary.obj
+ @($(CC) $(CFLAGS) iniparser.c)
+
+dictionary.obj:
+ @($(CC) $(CFLAGS) dictionary.c)
+
+iniparser.lib: dictionary.obj iniparser.obj
+ @(echo "linking $(OBJS)")
+ @($(LINK) $(LDFLAGS) $(OBJS))
+