mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
merge fx-team to mozilla-central
This commit is contained in:
commit
7c2476f6f2
@ -27,6 +27,10 @@ this.TabState = Object.freeze({
|
||||
TabStateInternal.setSyncHandler(browser, handler);
|
||||
},
|
||||
|
||||
onSwapDocShells: function (browser, otherBrowser) {
|
||||
TabStateInternal.onSwapDocShells(browser, otherBrowser);
|
||||
},
|
||||
|
||||
collect: function (tab) {
|
||||
return TabStateInternal.collect(tab);
|
||||
},
|
||||
|
@ -54,10 +54,14 @@ support-files =
|
||||
[browser_input.js]
|
||||
[browser_pageshow.js]
|
||||
[browser_sessionStorage.js]
|
||||
[browser_swapDocShells.js]
|
||||
[browser_tabStateCache.js]
|
||||
[browser_upgrade_backup.js]
|
||||
[browser_windowRestore_perwindowpb.js]
|
||||
[browser_248970_b_perwindowpb.js]
|
||||
# Disabled because of leaks.
|
||||
# Re-enabling and rewriting this test is tracked in bug 936919.
|
||||
skip-if = true
|
||||
[browser_339445.js]
|
||||
[browser_345898.js]
|
||||
[browser_346337.js]
|
||||
|
@ -0,0 +1,39 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
* http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
Task.spawn(function task() {
|
||||
let tab = gBrowser.selectedTab = gBrowser.addTab("about:mozilla");
|
||||
yield promiseBrowserLoaded(gBrowser.selectedBrowser);
|
||||
|
||||
let win = gBrowser.replaceTabWithWindow(tab);
|
||||
yield promiseDelayedStartupFinished(win);
|
||||
yield promiseBrowserHasURL(win.gBrowser.browsers[0], "about:mozilla");
|
||||
|
||||
win.duplicateTabIn(win.gBrowser.selectedTab, "tab");
|
||||
let browser = win.gBrowser.browsers[1];
|
||||
yield promiseBrowserLoaded(browser);
|
||||
is(browser.currentURI.spec, "about:mozilla", "tab was duplicated");
|
||||
|
||||
win.close();
|
||||
}).then(finish);
|
||||
}
|
||||
|
||||
function promiseDelayedStartupFinished(win) {
|
||||
let deferred = Promise.defer();
|
||||
whenDelayedStartupFinished(win, deferred.resolve);
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
function promiseBrowserHasURL(browser, url) {
|
||||
let promise = Promise.resolve();
|
||||
|
||||
if (browser.contentDocument.readyState === "complete" &&
|
||||
browser.currentURI.spec === url) {
|
||||
return promise;
|
||||
}
|
||||
|
||||
return promise.then(() => promiseBrowserHasURL(browser, url));
|
||||
}
|
@ -2,8 +2,6 @@
|
||||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
let temp = {};
|
||||
Cu.import("resource://gre/modules/devtools/dbg-server.jsm", temp);
|
||||
|
||||
function test()
|
||||
{
|
||||
@ -33,14 +31,19 @@ function testThrowOutput()
|
||||
});
|
||||
});
|
||||
|
||||
let longString = Array(temp.DebuggerServer.LONG_STRING_LENGTH + 1).join("a"),
|
||||
shortedString = longString.substring(0,
|
||||
temp.DebuggerServer.LONG_STRING_INITIAL_LENGTH
|
||||
) + "\u2026";
|
||||
let server = Cu.import("resource://gre/modules/devtools/dbg-server.jsm", {})
|
||||
.DebuggerServer;
|
||||
|
||||
let longLength = server.LONG_STRING_LENGTH + 1;
|
||||
let longString = new Array(longLength).join("a");
|
||||
let shortedString = longString.substring(0, server.LONG_STRING_INITIAL_LENGTH) +
|
||||
"\u2026";
|
||||
|
||||
tests.push({
|
||||
method: "display",
|
||||
code: "throw '" + longString + "';",
|
||||
result: "throw '" + longString + "';\n/*\nException: " + shortedString + "\n*/",
|
||||
code: "throw (new Array(" + longLength + ").join('a'));",
|
||||
result: "throw (new Array(" + longLength + ").join('a'));\n" +
|
||||
"/*\nException: " + shortedString + "\n*/",
|
||||
label: "Correct exception message for a longString is shown"
|
||||
});
|
||||
|
||||
|
@ -235,12 +235,13 @@ MediaEngineTabVideoSource::Draw() {
|
||||
nsPresContext::CSSPixelsToAppUnits(srcW / scale),
|
||||
nsPresContext::CSSPixelsToAppUnits(srcH / scale));
|
||||
|
||||
uint32_t stride = size.width * 4;
|
||||
gfxImageFormat format = gfxImageFormatRGB24;
|
||||
uint32_t stride = gfxASurface::FormatStrideForWidth(format, size.width);
|
||||
|
||||
nsRefPtr<layers::ImageContainer> container = layers::LayerManager::CreateImageContainer();
|
||||
nsRefPtr<gfxASurface> surf;
|
||||
surf = new gfxImageSurface(static_cast<unsigned char*>(mData), size,
|
||||
stride, gfxImageFormatRGB24);
|
||||
stride, format);
|
||||
if (surf->CairoStatus() != 0) {
|
||||
return;
|
||||
}
|
||||
|
@ -61,6 +61,7 @@
|
||||
'../trunk/webrtc/voice_engine/include',
|
||||
'../trunk/webrtc/modules/interface',
|
||||
'../trunk/webrtc/peerconnection',
|
||||
'../trunk/third_party/libyuv/include/',
|
||||
'../../../netwerk/srtp/src/include',
|
||||
'../../../netwerk/srtp/src/crypto/include',
|
||||
'../../../ipc/chromium/src',
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include "transportlayerdtls.h"
|
||||
#include "transportlayerice.h"
|
||||
#include "runnable_utils.h"
|
||||
#include "gfxImageSurface.h"
|
||||
#include "libyuv/convert.h"
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@ -922,6 +924,48 @@ void MediaPipelineTransmit::PipelineListener::ProcessVideoChunk(
|
||||
MOZ_MTLOG(ML_DEBUG, "Sending a video frame");
|
||||
// Not much for us to do with an error
|
||||
conduit->SendVideoFrame(y, length, width, height, mozilla::kVideoI420, 0);
|
||||
} else if(format == CAIRO_SURFACE) {
|
||||
layers::CairoImage* rgb =
|
||||
const_cast<layers::CairoImage *>(
|
||||
static_cast<const layers::CairoImage *>(img));
|
||||
|
||||
gfxIntSize size = rgb->GetSize();
|
||||
int half_width = (size.width + 1) >> 1;
|
||||
int half_height = (size.height + 1) >> 1;
|
||||
int c_size = half_width * half_height;
|
||||
int buffer_size = size.width * size.height + 2 * c_size;
|
||||
uint8* yuv = (uint8*) malloc(buffer_size);
|
||||
if (!yuv)
|
||||
return;
|
||||
|
||||
int cb_offset = size.width * size.height;
|
||||
int cr_offset = cb_offset + c_size;
|
||||
nsRefPtr<gfxImageSurface> surf = rgb->mSurface->GetAsImageSurface();
|
||||
|
||||
switch (surf->Format()) {
|
||||
case gfxImageFormatARGB32:
|
||||
case gfxImageFormatRGB24:
|
||||
libyuv::ARGBToI420(static_cast<uint8*>(surf->Data()), surf->Stride(),
|
||||
yuv, size.width,
|
||||
yuv + cb_offset, half_width,
|
||||
yuv + cr_offset, half_width,
|
||||
size.width, size.height);
|
||||
break;
|
||||
case gfxImageFormatRGB16_565:
|
||||
libyuv::RGB565ToI420(static_cast<uint8*>(surf->Data()), surf->Stride(),
|
||||
yuv, size.width,
|
||||
yuv + cb_offset, half_width,
|
||||
yuv + cr_offset, half_width,
|
||||
size.width, size.height);
|
||||
break;
|
||||
case gfxImageFormatA1:
|
||||
case gfxImageFormatA8:
|
||||
case gfxImageFormatUnknown:
|
||||
default:
|
||||
MOZ_MTLOG(ML_ERROR, "Unsupported RGB video format");
|
||||
MOZ_ASSERT(PR_FALSE);
|
||||
}
|
||||
conduit->SendVideoFrame(yuv, buffer_size, size.width, size.height, mozilla::kVideoI420, 0);
|
||||
} else {
|
||||
MOZ_MTLOG(ML_ERROR, "Unsupported video format");
|
||||
MOZ_ASSERT(PR_FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user