diff --git a/b2g/config/emulator-ics/sources.xml b/b2g/config/emulator-ics/sources.xml
index b59270f9f6f6..ce91dfef4d96 100644
--- a/b2g/config/emulator-ics/sources.xml
+++ b/b2g/config/emulator-ics/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/emulator-jb/sources.xml b/b2g/config/emulator-jb/sources.xml
index 32cadc48cc49..7a4a1c2af74e 100644
--- a/b2g/config/emulator-jb/sources.xml
+++ b/b2g/config/emulator-jb/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/emulator-kk/sources.xml b/b2g/config/emulator-kk/sources.xml
index b80c7855c0ca..8bcacc4de2fd 100644
--- a/b2g/config/emulator-kk/sources.xml
+++ b/b2g/config/emulator-kk/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/emulator/sources.xml b/b2g/config/emulator/sources.xml
index b59270f9f6f6..ce91dfef4d96 100644
--- a/b2g/config/emulator/sources.xml
+++ b/b2g/config/emulator/sources.xml
@@ -19,7 +19,7 @@
-
+
diff --git a/b2g/config/flame/sources.xml b/b2g/config/flame/sources.xml
index 308fcfce7062..deb1fd98067d 100644
--- a/b2g/config/flame/sources.xml
+++ b/b2g/config/flame/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/gaia.json b/b2g/config/gaia.json
index c4a2d8fb1f13..c06a6e0e68fd 100644
--- a/b2g/config/gaia.json
+++ b/b2g/config/gaia.json
@@ -4,6 +4,6 @@
"remote": "",
"branch": ""
},
- "revision": "9863517bfb599a39300f5e8c6f94e16189a4c698",
+ "revision": "d7d92199ea7e8f850ca0c6f0514bf596f178a16f",
"repo_path": "/integration/gaia-central"
}
diff --git a/b2g/config/hamachi/sources.xml b/b2g/config/hamachi/sources.xml
index 1c1d5187dd58..417594453899 100644
--- a/b2g/config/hamachi/sources.xml
+++ b/b2g/config/hamachi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/helix/sources.xml b/b2g/config/helix/sources.xml
index dadd9218c814..57d096e1a735 100644
--- a/b2g/config/helix/sources.xml
+++ b/b2g/config/helix/sources.xml
@@ -15,7 +15,7 @@
-
+
diff --git a/b2g/config/nexus-4/sources.xml b/b2g/config/nexus-4/sources.xml
index 508c0ad0a25a..1225f594375d 100644
--- a/b2g/config/nexus-4/sources.xml
+++ b/b2g/config/nexus-4/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/b2g/config/wasabi/sources.xml b/b2g/config/wasabi/sources.xml
index 30b644a27e90..ef0ea35a5d71 100644
--- a/b2g/config/wasabi/sources.xml
+++ b/b2g/config/wasabi/sources.xml
@@ -17,7 +17,7 @@
-
+
diff --git a/configure.in b/configure.in
index dcc60a70d995..469625ca2d9a 100644
--- a/configure.in
+++ b/configure.in
@@ -5646,7 +5646,6 @@ fi
dnl ========================================================
dnl = ANGLE OpenGL->D3D translator for WebGL
dnl = * only applies to win32
-dnl = * enabled by default (shipping build); requires explicit --disable to disable
dnl ========================================================
MOZ_ANGLE_RENDERER=
diff --git a/content/media/omx/MediaCodecReader.cpp b/content/media/omx/MediaCodecReader.cpp
index 50687f87f868..03fc7ee9d28d 100644
--- a/content/media/omx/MediaCodecReader.cpp
+++ b/content/media/omx/MediaCodecReader.cpp
@@ -17,6 +17,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -105,6 +106,20 @@ MediaCodecReader::VideoResourceListener::codecCanceled()
}
}
+bool MediaCodecReader::TrackInputCopier::Copy(MediaBuffer* aSourceBuffer, sp aCodecBuffer)
+{
+ if (aSourceBuffer == nullptr ||
+ aCodecBuffer == nullptr ||
+ aSourceBuffer->range_length() > aCodecBuffer->capacity()) {
+ return false;
+ }
+
+ aCodecBuffer->setRange(0, aSourceBuffer->range_length());
+ memcpy(aCodecBuffer->data(), aSourceBuffer->data() + aSourceBuffer->range_offset(), aSourceBuffer->range_length());
+
+ return true;
+}
+
MediaCodecReader::Track::Track()
: mDurationUs(INT64_C(0))
, mInputIndex(sInvalidInputIndex)
@@ -114,6 +129,29 @@ MediaCodecReader::Track::Track()
{
}
+// Append the value of |kKeyValidSamples| to the end of each vorbis buffer.
+// https://github.com/mozilla-b2g/platform_frameworks_av/blob/master/media/libstagefright/OMXCodec.cpp#L3128
+// https://github.com/mozilla-b2g/platform_frameworks_av/blob/master/media/libstagefright/NuMediaExtractor.cpp#L472
+bool MediaCodecReader::VorbisInputCopier::Copy(MediaBuffer* aSourceBuffer, sp aCodecBuffer)
+{
+ if (aSourceBuffer == nullptr ||
+ aCodecBuffer == nullptr ||
+ aSourceBuffer->range_length() + sizeof(int32_t) > aCodecBuffer->capacity()) {
+ return false;
+ }
+
+ int32_t numPageSamples = 0;
+ if (!aSourceBuffer->meta_data()->findInt32(kKeyValidSamples, &numPageSamples)) {
+ numPageSamples = -1;
+ }
+
+ aCodecBuffer->setRange(0, aSourceBuffer->range_length() + sizeof(int32_t));
+ memcpy(aCodecBuffer->data(), aSourceBuffer->data() + aSourceBuffer->range_offset(), aSourceBuffer->range_length());
+ memcpy(aCodecBuffer->data() + aSourceBuffer->range_length(), &numPageSamples, sizeof(numPageSamples));
+
+ return true;
+}
+
MediaCodecReader::AudioTrack::AudioTrack()
{
}
@@ -678,6 +716,12 @@ MediaCodecReader::CreateMediaCodec(sp &aLooper,
return false;
}
+ if (!strcasecmp(mime, MEDIA_MIMETYPE_AUDIO_VORBIS)) {
+ aTrack.mInputCopier = new VorbisInputCopier;
+ } else {
+ aTrack.mInputCopier = new TrackInputCopier;
+ }
+
if (!aAsync) {
// Pending configure() and start() to codecReserved() if the creation
// should be asynchronous.
@@ -999,12 +1043,9 @@ MediaCodecReader::FillCodecInputData(Track &aTrack)
if (aTrack.mInputIndex.value() < aTrack.mInputBuffers.size()) {
input_buffer = aTrack.mInputBuffers[aTrack.mInputIndex.value()];
}
- if (input_buffer != nullptr && input_buffer->capacity() >= source_buffer->range_length()) {
- input_buffer->setRange(0, source_buffer->range_length());
- memcpy((uint8_t *)input_buffer->data() + input_buffer->offset(),
- (uint8_t *)source_buffer->data() + source_buffer->range_offset(),
- source_buffer->range_length());
-
+ if (input_buffer != nullptr &&
+ aTrack.mInputCopier != nullptr &&
+ aTrack.mInputCopier->Copy(source_buffer, input_buffer)) {
int64_t timestamp = sInvalidTimestampUs;
sp codec_format = source_buffer->meta_data();
if (codec_format != nullptr) {
diff --git a/content/media/omx/MediaCodecReader.h b/content/media/omx/MediaCodecReader.h
index eb526f27825e..2e9494ddb9c8 100644
--- a/content/media/omx/MediaCodecReader.h
+++ b/content/media/omx/MediaCodecReader.h
@@ -22,6 +22,7 @@ struct ALooper;
struct AMessage;
class MOZ_EXPORT MediaExtractor;
+class MOZ_EXPORT MediaBuffer;
struct MOZ_EXPORT MediaSource;
struct MediaCodec;
} // namespace android
@@ -85,6 +86,11 @@ public:
virtual bool IsMediaSeekable() MOZ_OVERRIDE;
protected:
+ struct TrackInputCopier
+ {
+ virtual bool Copy(android::MediaBuffer* aSourceBuffer, android::sp aCodecBuffer);
+ };
+
struct Track
{
Track();
@@ -95,6 +101,9 @@ protected:
android::Vector > mInputBuffers;
android::Vector > mOutputBuffers;
+ // pipeline copier
+ nsAutoPtr mInputCopier;
+
// media parameters
int64_t mDurationUs;
@@ -156,6 +165,11 @@ private:
};
friend class VideoResourceListener;
+ class VorbisInputCopier : public TrackInputCopier
+ {
+ virtual bool Copy(android::MediaBuffer* aSourceBuffer, android::sp aCodecBuffer);
+ };
+
struct AudioTrack : public Track
{
AudioTrack();
diff --git a/dom/ipc/TabChild.cpp b/dom/ipc/TabChild.cpp
index 8a6c2d09c62b..56a7039a3f83 100644
--- a/dom/ipc/TabChild.cpp
+++ b/dom/ipc/TabChild.cpp
@@ -516,6 +516,7 @@ TabChildBase::DispatchSynthesizedMouseEvent(uint32_t aMsg, uint64_t aTime,
event.time = aTime;
event.button = WidgetMouseEvent::eLeftButton;
event.inputSource = nsIDOMMouseEvent::MOZ_SOURCE_TOUCH;
+ event.ignoreRootScrollFrame = true;
if (aMsg != NS_MOUSE_MOVE) {
event.clickCount = 1;
}
@@ -1845,7 +1846,7 @@ TabChild::RecvHandleLongTap(const CSSPoint& aPoint, const ScrollableLayerGuid& a
bool eventHandled =
DispatchMouseEvent(NS_LITERAL_STRING("contextmenu"),
APZCCallbackHelper::ApplyCallbackTransform(aPoint, aGuid),
- 2, 1, 0, false,
+ 2, 1, 0, true,
nsIDOMMouseEvent::MOZ_SOURCE_TOUCH);
// If no one handle context menu, fire MOZLONGTAP event
@@ -2078,7 +2079,7 @@ TabChild::FireContextMenuEvent()
2 /* Right button */,
1 /* Click count */,
0 /* Modifiers */,
- false /* Ignore root scroll frame */,
+ true /* Ignore root scroll frame */,
nsIDOMMouseEvent::MOZ_SOURCE_TOUCH);
// Fire a click event if someone didn't call preventDefault() on the context
diff --git a/dom/media/tests/mochitest/mochitest.ini b/dom/media/tests/mochitest/mochitest.ini
index 5977dc958067..13b07e5d994d 100644
--- a/dom/media/tests/mochitest/mochitest.ini
+++ b/dom/media/tests/mochitest/mochitest.ini
@@ -73,6 +73,9 @@ skip-if = toolkit == 'gonk' # b2g(Bug 960442, video support for WebRTC is disabl
[test_peerConnection_bug835370.html]
[test_peerConnection_bug1013809.html]
skip-if = (toolkit == 'gonk' && debug) # b2g emulator seems to be too slow (Bug 1016498 and 1008080)
+[test_peerConnection_bug1042791.html]
+skip-if = true # disabled until we can resolve plugin installation issues
+#skip-if = toolkit == 'gonk' || toolkit == 'android' # no openh264 on b2g/android
[test_peerConnection_close.html]
[test_peerConnection_errorCallbacks.html]
[test_peerConnection_offerRequiresReceiveAudio.html]
diff --git a/dom/media/tests/mochitest/test_peerConnection_bug1042791.html b/dom/media/tests/mochitest/test_peerConnection_bug1042791.html
new file mode 100644
index 000000000000..546b21da1335
--- /dev/null
+++ b/dom/media/tests/mochitest/test_peerConnection_bug1042791.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/gfx/gl/GLContextProviderEGL.cpp b/gfx/gl/GLContextProviderEGL.cpp
index 7ff88fde52f3..66e16152d974 100644
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -116,10 +116,6 @@ public:
using namespace mozilla::gfx;
-#ifdef MOZ_WIDGET_GONK
-extern nsIntRect gScreenBounds;
-#endif
-
namespace mozilla {
namespace gl {
@@ -205,12 +201,6 @@ CreateSurfaceForWindow(nsIWidget* widget, const EGLConfig& config) {
#else
MOZ_ASSERT(widget != nullptr);
newSurface = sEGLLibrary.fCreateWindowSurface(EGL_DISPLAY(), config, GET_NATIVE_WINDOW(widget), 0);
- #ifdef MOZ_WIDGET_GONK
- gScreenBounds.x = 0;
- gScreenBounds.y = 0;
- sEGLLibrary.fQuerySurface(EGL_DISPLAY(), newSurface, LOCAL_EGL_WIDTH, &gScreenBounds.width);
- sEGLLibrary.fQuerySurface(EGL_DISPLAY(), newSurface, LOCAL_EGL_HEIGHT, &gScreenBounds.height);
- #endif
#endif
return newSurface;
}
diff --git a/layout/base/nsCSSRendering.cpp b/layout/base/nsCSSRendering.cpp
index c1795e32d47b..4c2e5c10d219 100644
--- a/layout/base/nsCSSRendering.cpp
+++ b/layout/base/nsCSSRendering.cpp
@@ -4646,10 +4646,23 @@ nsImageRenderer::Draw(nsPresContext* aPresContext,
return;
}
+ gfxContext* ctx = aRenderingContext.ThebesContext();
+ gfxContext::GraphicsOperator op = ctx->CurrentOperator();
+ if (op != gfxContext::OPERATOR_OVER) {
+ ctx->PushGroup(gfxContentType::COLOR_ALPHA);
+ ctx->SetOperator(gfxContext::OPERATOR_OVER);
+ }
+
nsCOMPtr image(ImageOps::CreateFromDrawable(drawable));
nsLayoutUtils::DrawImage(&aRenderingContext, aPresContext, image,
filter, aDest, aFill, aAnchor, aDirtyRect,
ConvertImageRendererToDrawFlags(mFlags));
+
+ if (op != gfxContext::OPERATOR_OVER) {
+ ctx->PopGroupToSource();
+ ctx->Paint();
+ }
+
return;
}
case eStyleImageType_Null:
diff --git a/layout/reftests/css-blending/background-blending-moz-element-ref.html b/layout/reftests/css-blending/background-blending-moz-element-ref.html
new file mode 100644
index 000000000000..285d30194efd
--- /dev/null
+++ b/layout/reftests/css-blending/background-blending-moz-element-ref.html
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/css-blending/background-blending-moz-element.html b/layout/reftests/css-blending/background-blending-moz-element.html
new file mode 100644
index 000000000000..be0e93726e3b
--- /dev/null
+++ b/layout/reftests/css-blending/background-blending-moz-element.html
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/layout/reftests/css-blending/reftest.list b/layout/reftests/css-blending/reftest.list
index f16292935897..f40835ceded9 100644
--- a/layout/reftests/css-blending/reftest.list
+++ b/layout/reftests/css-blending/reftest.list
@@ -82,3 +82,5 @@ pref(layout.css.background-blend-mode.enabled,true) == background-blending-backg
pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-image.html background-blend-mode-body-image-ref.html
pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-transparent-image.html background-blend-mode-body-transparent-image-ref.html
+
+pref(layout.css.background-blend-mode.enabled,true) == background-blending-moz-element.html background-blending-moz-element-ref.html
diff --git a/xpcom/base/nsMemoryReporterManager.cpp b/xpcom/base/nsMemoryReporterManager.cpp
index 47e35abffab5..e25507ed9fc3 100644
--- a/xpcom/base/nsMemoryReporterManager.cpp
+++ b/xpcom/base/nsMemoryReporterManager.cpp
@@ -100,7 +100,7 @@ GetProcSelfSmapsPrivate(int64_t* aN)
char* ptr = buffer;
end[carryOver] = '\0';
// We are looking for lines like "Private_{Clean,Dirty}: 4 kB".
- while (ptr = strstr(ptr, "Private")) {
+ while ((ptr = strstr(ptr, "Private"))) {
if (ptr >= end) {
break;
}