Wed Jun 11 00:41:36 2014 UTC ()
Add patches
(ryoon)
diff -r0 -r1.1 pkgsrc/www/firefox/patches/patch-content_base_src_moz.build
diff -r0 -r1.1 pkgsrc/www/firefox/patches/patch-layout_base_nsCSSRendering.cpp
diff -r0 -r1.1 pkgsrc/www/firefox/patches/patch-layout_style_crashtests_border-image-visited-link.html
diff -r0 -r1.1 pkgsrc/www/firefox/patches/patch-layout_style_crashtests_crashtests.list
diff -r0 -r1.1 pkgsrc/www/firefox/patches/patch-xpcom_base_nsDebugImpl.cpp
diff -r0 -r1.1 pkgsrc/www/firefox/patches/patch-xpcom_build_nsXPComInit.cpp
diff -r0 -r1.3 pkgsrc/www/firefox/patches/patch-toolkit_components_osfile_modules_osfile__unix__front.jsm
diff -r0 -r1.3 pkgsrc/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.cpp
diff -r0 -r1.3 pkgsrc/www/firefox/patches/patch-xpcom_base_nsUUIDGenerator.h
$NetBSD: patch-content_base_src_moz.build,v 1.1 2014/06/11 00:41:36 ryoon Exp $
--- content/base/src/moz.build.orig 2014-05-29 23:30:31.000000000 +0000
+++ content/base/src/moz.build
@@ -176,6 +176,9 @@ SOURCES += [
'nsObjectLoadingContent.cpp',
]
+if CONFIG['MOZ_NATIVE_HARFBUZZ']:
+ SOURCES['nsContentUtils.cpp'].flags += [CONFIG['MOZ_HARFBUZZ_CFLAGS']]
+
EXTRA_COMPONENTS += [
'contentAreaDropListener.js',
'contentAreaDropListener.manifest',
$NetBSD: patch-layout_base_nsCSSRendering.cpp,v 1.1 2014/06/11 00:41:36 ryoon Exp $
--- layout/base/nsCSSRendering.cpp.orig 2014-05-29 23:31:05.000000000 +0000
+++ layout/base/nsCSSRendering.cpp
@@ -419,6 +419,10 @@ nsCSSRendering::PaintBorder(nsPresContex
}
nsStyleBorder newStyleBorder(*styleBorder);
+ // We could do something fancy to avoid the TrackImage/UntrackImage
+ // work, but it doesn't seem worth it. (We need to call TrackImage
+ // since we're not going through nsRuleNode::ComputeBorderData.)
+ newStyleBorder.TrackImage(aPresContext);
NS_FOR_CSS_SIDES(side) {
newStyleBorder.SetBorderColor(side,
@@ -428,6 +432,11 @@ nsCSSRendering::PaintBorder(nsPresContex
PaintBorderWithStyleBorder(aPresContext, aRenderingContext, aForFrame,
aDirtyRect, aBorderArea, newStyleBorder,
aStyleContext, aSkipSides);
+
+ // We could do something fancy to avoid the TrackImage/UntrackImage
+ // work, but it doesn't seem worth it. (We need to call UntrackImage
+ // since we're not going through nsStyleBorder::Destroy.)
+ newStyleBorder.UntrackImage(aPresContext);
}
void
$NetBSD: patch-layout_style_crashtests_border-image-visited-link.html,v 1.1 2014/06/11 00:41:36 ryoon Exp $
--- layout/style/crashtests/border-image-visited-link.html.orig 2014-06-09 02:26:27.000000000 +0000
+++ layout/style/crashtests/border-image-visited-link.html
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML>
+<title>border-image on link with visited styles</title>
+<style>
+
+:link { color: blue }
+:visited { color: purple }
+:link, :visited { border: medium solid; border-image: url(blue-32x32.png) 4 4 4 4; }
+
+</style>
+<a href="http://example.com/">test</a>
$NetBSD: patch-layout_style_crashtests_crashtests.list,v 1.1 2014/06/11 00:41:36 ryoon Exp $
--- layout/style/crashtests/crashtests.list.orig 2014-05-29 23:31:17.000000000 +0000
+++ layout/style/crashtests/crashtests.list
@@ -104,3 +104,4 @@ load 945048-1.html
load 972199-1.html
load 989965-1.html
load large_border_image_width.html
+load border-image-visited-link.html
$NetBSD: patch-xpcom_base_nsDebugImpl.cpp,v 1.1 2014/06/11 00:41:36 ryoon Exp $
--- xpcom/base/nsDebugImpl.cpp.orig 2014-05-29 23:31:50.000000000 +0000
+++ xpcom/base/nsDebugImpl.cpp
@@ -44,12 +44,43 @@
#endif
#endif
-#if defined(XP_MACOSX)
+#if defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
+ || defined(__NetBSD__) || defined(__OpenBSD__)
#include <stdbool.h>
#include <unistd.h>
+#include <sys/param.h>
#include <sys/sysctl.h>
#endif
+#if defined(__OpenBSD__)
+#include <sys/proc.h>
+#endif
+
+#if defined(__DragonFly__) || defined(__FreeBSD__)
+#include <sys/user.h>
+#endif
+
+#if defined(__NetBSD__)
+#undef KERN_PROC
+#define KERN_PROC KERN_PROC2
+#define KINFO_PROC struct kinfo_proc2
+#else
+#define KINFO_PROC struct kinfo_proc
+#endif
+
+#if defined(XP_MACOSX)
+#define KP_FLAGS kp_proc.p_flag
+#elif defined(__DragonFly__)
+#define KP_FLAGS kp_flags
+#elif defined(__FreeBSD__)
+#define KP_FLAGS ki_flag
+#elif defined(__OpenBSD__) && !defined(_P_TRACED)
+#define KP_FLAGS p_psflags
+#define P_TRACED PS_TRACED
+#else
+#define KP_FLAGS p_flag
+#endif
+
#include "mozilla/mozalloc_abort.h"
static void
@@ -143,16 +174,22 @@ nsDebugImpl::GetIsDebuggerAttached(bool*
#if defined(XP_WIN)
*aResult = ::IsDebuggerPresent();
-#elif defined(XP_MACOSX)
+#elif defined(XP_MACOSX) || defined(__DragonFly__) || defined(__FreeBSD__) \
+ || defined(__NetBSD__) || defined(__OpenBSD__)
// Specify the info we're looking for
- int mib[4];
- mib[0] = CTL_KERN;
- mib[1] = KERN_PROC;
- mib[2] = KERN_PROC_PID;
- mib[3] = getpid();
+ int mib[] = {
+ CTL_KERN,
+ KERN_PROC,
+ KERN_PROC_PID,
+ getpid(),
+#if defined(__NetBSD__) || defined(__OpenBSD__)
+ sizeof(KINFO_PROC),
+ 1,
+#endif
+ };
size_t mibSize = sizeof(mib) / sizeof(int);
- struct kinfo_proc info;
+ KINFO_PROC info;
size_t infoSize = sizeof(info);
memset(&info, 0, infoSize);
@@ -162,7 +199,7 @@ nsDebugImpl::GetIsDebuggerAttached(bool*
return NS_OK;
}
- if (info.kp_proc.p_flag & P_TRACED) {
+ if (info.KP_FLAGS & P_TRACED) {
*aResult = true;
}
#endif
$NetBSD: patch-xpcom_build_nsXPComInit.cpp,v 1.1 2014/06/11 00:41:36 ryoon Exp $
--- xpcom/build/nsXPComInit.cpp.orig 2014-05-29 23:31:50.000000000 +0000
+++ xpcom/build/nsXPComInit.cpp
@@ -128,7 +128,9 @@ extern nsresult nsStringInputStreamConst
#include "mozilla/VisualEventTracer.h"
#endif
+#ifndef MOZ_OGG_NO_MEM_REPORTING
#include "ogg/ogg.h"
+#endif
#if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
#include "vpx_mem/vpx_mem.h"
#endif
@@ -564,11 +566,13 @@ NS_InitXPCOM2(nsIServiceManager* *result
// this oddness.
mozilla::SetICUMemoryFunctions();
+#ifndef MOZ_OGG_NO_MEM_REPORTING
// Do the same for libogg.
ogg_set_mem_functions(OggReporter::CountingMalloc,
OggReporter::CountingCalloc,
OggReporter::CountingRealloc,
OggReporter::CountingFree);
+#endif
#if defined(MOZ_VPX) && !defined(MOZ_VPX_NO_MEM_REPORTING)
// And for VPX.
$NetBSD: patch-toolkit_components_osfile_modules_osfile__unix__front.jsm,v 1.3 2014/06/11 00:41:36 ryoon Exp $
--- toolkit/components/osfile/modules/osfile_unix_front.jsm.orig 2014-05-29 23:31:41.000000000 +0000
+++ toolkit/components/osfile/modules/osfile_unix_front.jsm
@@ -373,7 +373,7 @@
throw_on_negative("statvfs", UnixFile.statvfs(sourcePath, fileSystemInfoPtr));
let bytes = new Type.uint64_t.implementation(
- fileSystemInfo.f_bsize * fileSystemInfo.f_bavail);
+ fileSystemInfo.f_frsize * fileSystemInfo.f_bavail);
return bytes.value;
};
$NetBSD: patch-xpcom_base_nsUUIDGenerator.cpp,v 1.3 2014/06/11 00:41:36 ryoon Exp $
--- xpcom/base/nsUUIDGenerator.cpp.orig 2014-05-29 23:31:50.000000000 +0000
+++ xpcom/base/nsUUIDGenerator.cpp
@@ -15,6 +15,10 @@
#include "nsUUIDGenerator.h"
+#ifdef ANDROID
+extern "C" NS_EXPORT void arc4random_buf(void *, size_t);
+#endif
+
using namespace mozilla;
NS_IMPL_ISUPPORTS1(nsUUIDGenerator, nsIUUIDGenerator)
@@ -34,7 +38,7 @@ nsUUIDGenerator::Init()
// We're a service, so we're guaranteed that Init() is not going
// to be reentered while we're inside Init().
-#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
+#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM)
/* initialize random number generator using NSPR random noise */
unsigned int seed;
@@ -67,7 +71,7 @@ nsUUIDGenerator::Init()
return NS_ERROR_FAILURE;
#endif
-#endif /* non XP_WIN and non XP_MACOSX */
+#endif /* non XP_WIN and non XP_MACOSX and non ARC4RANDOM */
return NS_OK;
}
@@ -114,13 +118,16 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsI
* back to it; instead, we use the value returned when we called
* initstate, since older glibc's have broken setstate() return values
*/
-#ifndef ANDROID
+#ifndef HAVE_ARC4RANDOM
setstate(mState);
#endif
+#ifdef HAVE_ARC4RANDOM_BUF
+ arc4random_buf(id, sizeof(nsID));
+#else /* HAVE_ARC4RANDOM_BUF */
size_t bytesLeft = sizeof(nsID);
while (bytesLeft > 0) {
-#ifdef ANDROID
+#ifdef HAVE_ARC4RANDOM
long rval = arc4random();
const size_t mRBytes = 4;
#else
@@ -141,6 +148,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsI
bytesLeft -= toWrite;
}
+#endif /* HAVE_ARC4RANDOM_BUF */
/* Put in the version */
id->m2 &= 0x0fff;
@@ -150,7 +158,7 @@ nsUUIDGenerator::GenerateUUIDInPlace(nsI
id->m3[0] &= 0x3f;
id->m3[0] |= 0x80;
-#ifndef ANDROID
+#ifndef HAVE_ARC4RANDOM
/* Restore the previous RNG state */
setstate(mSavedState);
#endif
$NetBSD: patch-xpcom_base_nsUUIDGenerator.h,v 1.3 2014/06/11 00:41:36 ryoon Exp $
--- xpcom/base/nsUUIDGenerator.h.orig 2014-05-29 23:31:50.000000000 +0000
+++ xpcom/base/nsUUIDGenerator.h
@@ -27,7 +27,7 @@ private:
protected:
mozilla::Mutex mLock;
-#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(ANDROID)
+#if !defined(XP_WIN) && !defined(XP_MACOSX) && !defined(HAVE_ARC4RANDOM)
char mState[128];
char *mSavedState;
uint8_t mRBytes;