зеркало из https://github.com/mozilla/gecko-dev.git
Merging cedar with mozilla-central.
This commit is contained in:
Коммит
ad53e58fdb
|
@ -359,7 +359,6 @@ appUpdater.prototype =
|
|||
// notified with the normal app update user interface so this is safe.
|
||||
gAppUpdater.isChecking = false;
|
||||
gAppUpdater.selectPanel("noUpdatesFound");
|
||||
return;
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -613,6 +612,8 @@ var gChannelSelector = {
|
|||
// Change app update channel.
|
||||
Services.prefs.setCharPref("app.update.desiredChannel", this.channelValue);
|
||||
|
||||
// Stop any downloads in progress
|
||||
gAppUpdater.aus.pauseDownload();
|
||||
// App updater will look at app.update.desiredChannel for new channel value
|
||||
// and will clear it when the update is complete.
|
||||
gAppUpdater.isChecking = true;
|
||||
|
|
|
@ -1540,8 +1540,10 @@
|
|||
}
|
||||
|
||||
this._removingTabs.push(aTab);
|
||||
|
||||
this.tabContainer.updateVisibility();
|
||||
if (newTab)
|
||||
this.addTab("about:blank", {skipAnimation: true});
|
||||
else
|
||||
this.tabContainer.updateVisibility();
|
||||
|
||||
// We're committed to closing the tab now.
|
||||
// Dispatch a notification.
|
||||
|
@ -1597,8 +1599,6 @@
|
|||
|
||||
// update the UI early for responsiveness
|
||||
aTab.collapsed = true;
|
||||
if (aNewTab)
|
||||
this.addTab("about:blank", {skipAnimation: true});
|
||||
this.tabContainer._fillTrailingGap();
|
||||
this._blurTab(aTab);
|
||||
|
||||
|
|
11
configure.in
11
configure.in
|
@ -6140,8 +6140,15 @@ if test -n "$MOZ_ANGLE"; then
|
|||
fi
|
||||
|
||||
# Get the SDK path from the registry.
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK' | head -n 1`
|
||||
MOZ_DIRECTX_SDK_PATH=`reg query "$MOZ_DIRECTX_SDK_REG_KEY" //v InstallPath | grep REG_SZ | sed 's, *, ,g' | cut -d' ' -f4-`
|
||||
# First try to get the June 2010 SDK
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK (June 2010)' | head -n 1`
|
||||
if test -z "$MOZ_DIRECTX_SDK_REG_KEY" ; then
|
||||
# Otherwise just take whatever comes first
|
||||
MOZ_DIRECTX_SDK_REG_KEY=`reg query 'HKLM\Software\Microsoft\DirectX' //s | grep 'Microsoft DirectX SDK' | head -n 1`
|
||||
fi
|
||||
echo "MOZ_DIRECTX_SDK_REG_KEY=$MOZ_DIRECTX_SDK_REG_KEY"
|
||||
MOZ_DIRECTX_SDK_PATH=`reg query "$MOZ_DIRECTX_SDK_REG_KEY" //v InstallPath | grep REG_SZ | sed 's/.*\([[a-zA-Z]]\)\\:\\\\/\\1\\:\\\\/'`
|
||||
echo "MOZ_DIRECTX_SDK_PATH=$MOZ_DIRECTX_SDK_PATH"
|
||||
|
||||
MOZ_ANGLE=
|
||||
|
||||
|
|
|
@ -3379,6 +3379,7 @@ nsCanvasRenderingContext2D::DrawImage(nsIDOMElement *imgElt, float a1,
|
|||
|
||||
pattern = new gfxPattern(imgsurf);
|
||||
pattern->SetMatrix(matrix);
|
||||
pattern->SetExtend(gfxPattern::EXTEND_PAD);
|
||||
|
||||
if (CurrentState().imageSmoothingEnabled)
|
||||
pattern->SetFilter(gfxPattern::FILTER_GOOD);
|
||||
|
|
|
@ -391,6 +391,7 @@ public:
|
|||
static PRInt32 AccelerateWheelDelta(PRInt32 aScrollLines,
|
||||
PRBool aIsHorizontal, PRBool aAllowScrollSpeedOverride,
|
||||
nsIScrollableFrame::ScrollUnit *aScrollQuantity);
|
||||
static PRBool IsAccelerationEnabled();
|
||||
|
||||
enum {
|
||||
kScrollSeriesTimeout = 80
|
||||
|
@ -651,6 +652,12 @@ nsMouseWheelTransaction::GetIgnoreMoveDelayTime()
|
|||
nsContentUtils::GetIntPref("mousewheel.transaction.ignoremovedelay", 100);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsMouseWheelTransaction::IsAccelerationEnabled()
|
||||
{
|
||||
return GetAccelerationStart() >= 0 && GetAccelerationFactor() > 0;
|
||||
}
|
||||
|
||||
PRInt32
|
||||
nsMouseWheelTransaction::AccelerateWheelDelta(PRInt32 aScrollLines,
|
||||
PRBool aIsHorizontal,
|
||||
|
@ -2651,6 +2658,12 @@ nsEventStateManager::DoScrollText(nsIFrame* aTargetFrame,
|
|||
|
||||
if (!passToParent && frameToScroll) {
|
||||
if (aQueryEvent) {
|
||||
// If acceleration is enabled, pixel scroll shouldn't be used for
|
||||
// high resolution scrolling.
|
||||
if (nsMouseWheelTransaction::IsAccelerationEnabled()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nscoord appUnitsPerDevPixel =
|
||||
aTargetFrame->PresContext()->AppUnitsPerDevPixel();
|
||||
aQueryEvent->mReply.mLineHeight =
|
||||
|
|
|
@ -47,10 +47,13 @@ using namespace mozilla::dom;
|
|||
#include <math.h>
|
||||
#include "prlog.h"
|
||||
#include "prmem.h"
|
||||
#include "prdtoa.h"
|
||||
#include "nsAutoPtr.h"
|
||||
#include "nsAudioStream.h"
|
||||
#include "nsAlgorithm.h"
|
||||
#include "VideoUtils.h"
|
||||
#include "nsContentUtils.h"
|
||||
#include "mozilla/Mutex.h"
|
||||
extern "C" {
|
||||
#include "sydneyaudio/sydney_audio.h"
|
||||
}
|
||||
|
@ -313,16 +316,47 @@ class AudioShutdownEvent : public nsRunnable
|
|||
nsRefPtr<AudioChild> mAudioChild;
|
||||
};
|
||||
|
||||
static mozilla::Mutex* gVolumeScaleLock = nsnull;
|
||||
|
||||
static double gVolumeScale = 1.0;
|
||||
|
||||
static int VolumeScaleChanged(const char* aPref, void *aClosure) {
|
||||
nsAdoptingString value =
|
||||
nsContentUtils::GetStringPref("media.volume_scale");
|
||||
mozilla::MutexAutoLock lock(*gVolumeScaleLock);
|
||||
if (value.IsEmpty()) {
|
||||
gVolumeScale = 1.0;
|
||||
} else {
|
||||
NS_ConvertUTF16toUTF8 utf8(value);
|
||||
gVolumeScale = PR_MAX(0, PR_strtod(utf8.get(), nsnull));
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static double GetVolumeScale() {
|
||||
mozilla::MutexAutoLock lock(*gVolumeScaleLock);
|
||||
return gVolumeScale;
|
||||
}
|
||||
|
||||
void nsAudioStream::InitLibrary()
|
||||
{
|
||||
#ifdef PR_LOGGING
|
||||
gAudioStreamLog = PR_NewLogModule("nsAudioStream");
|
||||
#endif
|
||||
gVolumeScaleLock = new mozilla::Mutex("nsAudioStream::gVolumeScaleLock");
|
||||
VolumeScaleChanged(nsnull, nsnull);
|
||||
nsContentUtils::RegisterPrefCallback("media.volume_scale",
|
||||
VolumeScaleChanged,
|
||||
nsnull);
|
||||
}
|
||||
|
||||
void nsAudioStream::ShutdownLibrary()
|
||||
{
|
||||
nsContentUtils::UnregisterPrefCallback("media.volume_scale",
|
||||
VolumeScaleChanged,
|
||||
nsnull);
|
||||
delete gVolumeScaleLock;
|
||||
gVolumeScaleLock = nsnull;
|
||||
}
|
||||
|
||||
nsIThread *
|
||||
|
@ -439,10 +473,11 @@ nsresult nsAudioStreamLocal::Write(const void* aBuf, PRUint32 aCount, PRBool aBl
|
|||
}
|
||||
mBufferOverflow.Clear();
|
||||
|
||||
double scaled_volume = GetVolumeScale() * mVolume;
|
||||
switch (mFormat) {
|
||||
case FORMAT_U8: {
|
||||
const PRUint8* buf = static_cast<const PRUint8*>(aBuf);
|
||||
PRInt32 volume = PRInt32((1 << 16) * mVolume);
|
||||
PRInt32 volume = PRInt32((1 << 16) * scaled_volume);
|
||||
for (PRUint32 i = 0; i < aCount; ++i) {
|
||||
s_data[i + offset] = short(((PRInt32(buf[i]) - 128) * volume) >> 8);
|
||||
}
|
||||
|
@ -450,7 +485,7 @@ nsresult nsAudioStreamLocal::Write(const void* aBuf, PRUint32 aCount, PRBool aBl
|
|||
}
|
||||
case FORMAT_S16_LE: {
|
||||
const short* buf = static_cast<const short*>(aBuf);
|
||||
PRInt32 volume = PRInt32((1 << 16) * mVolume);
|
||||
PRInt32 volume = PRInt32((1 << 16) * scaled_volume);
|
||||
for (PRUint32 i = 0; i < aCount; ++i) {
|
||||
short s = buf[i];
|
||||
#if defined(IS_BIG_ENDIAN)
|
||||
|
@ -463,7 +498,7 @@ nsresult nsAudioStreamLocal::Write(const void* aBuf, PRUint32 aCount, PRBool aBl
|
|||
case FORMAT_FLOAT32: {
|
||||
const float* buf = static_cast<const float*>(aBuf);
|
||||
for (PRUint32 i = 0; i < aCount; ++i) {
|
||||
float scaled_value = floorf(0.5 + 32768 * buf[i] * mVolume);
|
||||
float scaled_value = floorf(0.5 + 32768 * buf[i] * scaled_volume);
|
||||
if (buf[i] < 0.0) {
|
||||
s_data[i + offset] = (scaled_value < -32768.0) ?
|
||||
-32768 :
|
||||
|
|
|
@ -88,6 +88,13 @@ DIRS += \
|
|||
|
||||
ifdef ENABLE_TESTS
|
||||
DIRS += tests
|
||||
|
||||
# These subdirs rely on GTK libraries and header files, it is not
|
||||
# buildable on other non-GTK unix builds
|
||||
|
||||
ifneq (,$(filter gtk2 cocoa windows android qt os2,$(MOZ_WIDGET_TOOLKIT)))
|
||||
DIRS += plugins/test
|
||||
endif
|
||||
endif
|
||||
|
||||
include $(topsrcdir)/config/rules.mk
|
||||
|
|
|
@ -165,3 +165,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),qt)
|
|||
EXTRA_DSO_LDOPTS += $(XEXT_LIBS) $(XCOMPOSITE_LIBS)
|
||||
endif
|
||||
|
||||
$(DIST)/bin/plugins:
|
||||
$(NSINSTALL) -D $@
|
||||
|
||||
export:: $(DIST)/bin/plugins
|
||||
|
|
|
@ -68,6 +68,10 @@ both:
|
|||
async PPluginIdentifier(nsCString aString,
|
||||
int32_t aInt);
|
||||
|
||||
// Window-specific message which instructs the RPC mechanism to enter
|
||||
// a nested event loop for the current RPC call.
|
||||
async ProcessNativeEventsInRPCCall();
|
||||
|
||||
child:
|
||||
// Forces the child process to update its plugin function table.
|
||||
rpc NP_GetEntryPoints()
|
||||
|
@ -123,10 +127,6 @@ parent:
|
|||
// native events, then "livelock" and some other glitches can occur.
|
||||
rpc ProcessSomeEvents();
|
||||
|
||||
// Window-specific message which instructs the RPC mechanism to enter
|
||||
// a nested event loop for the current RPC call.
|
||||
async ProcessNativeEventsInRPCCall();
|
||||
|
||||
sync AppendNotesToCrashReport(nsCString aNotes);
|
||||
|
||||
// OS X Specific calls to manage the plugin's window
|
||||
|
|
|
@ -1553,54 +1553,12 @@ PluginInstanceChild::DestroyWinlessPopupSurrogate()
|
|||
mWinlessPopupSurrogateHWND = NULL;
|
||||
}
|
||||
|
||||
/* windowless handle event helpers */
|
||||
|
||||
static bool
|
||||
NeedsNestedEventCoverage(UINT msg)
|
||||
{
|
||||
// Events we assume some sort of modal ui *might* be generated.
|
||||
switch (msg) {
|
||||
case WM_LBUTTONUP:
|
||||
case WM_RBUTTONUP:
|
||||
case WM_MBUTTONUP:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_CONTEXTMENU:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool
|
||||
IsMouseInputEvent(UINT msg)
|
||||
{
|
||||
switch (msg) {
|
||||
case WM_MOUSEMOVE:
|
||||
case WM_LBUTTONUP:
|
||||
case WM_RBUTTONUP:
|
||||
case WM_MBUTTONUP:
|
||||
case WM_LBUTTONDOWN:
|
||||
case WM_RBUTTONDOWN:
|
||||
case WM_MBUTTONDOWN:
|
||||
case WM_LBUTTONDBLCLK:
|
||||
case WM_MBUTTONDBLCLK:
|
||||
case WM_RBUTTONDBLCLK:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
int16_t
|
||||
PluginInstanceChild::WinlessHandleEvent(NPEvent& event)
|
||||
{
|
||||
if (!mPluginIface->event)
|
||||
return false;
|
||||
|
||||
if (!NeedsNestedEventCoverage(event.event)) {
|
||||
return mPluginIface->event(&mData, reinterpret_cast<void*>(&event));
|
||||
}
|
||||
|
||||
// Events that might generate nested event dispatch loops need
|
||||
// special handling during delivery.
|
||||
int16_t handled;
|
||||
|
|
|
@ -68,10 +68,6 @@ extern const PRUnichar* kOOPPPluginFocusEventId;
|
|||
UINT gOOPPPluginFocusEvent =
|
||||
RegisterWindowMessage(kOOPPPluginFocusEventId);
|
||||
extern const PRUnichar* kFlashFullscreenClass;
|
||||
UINT gOOPPSpinNativeLoopEvent =
|
||||
RegisterWindowMessage(L"SyncChannel Spin Inner Loop Message");
|
||||
UINT gOOPPStopNativeLoopEvent =
|
||||
RegisterWindowMessage(L"SyncChannel Stop Inner Loop Message");
|
||||
#elif defined(MOZ_WIDGET_GTK2)
|
||||
#include <gdk/gdk.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
|
@ -100,6 +96,7 @@ PluginInstanceParent::PluginInstanceParent(PluginModuleParent* parent,
|
|||
, mPluginHWND(NULL)
|
||||
, mPluginWndProc(NULL)
|
||||
, mNestedEventState(false)
|
||||
, mInAnswerFocusChange(false)
|
||||
#endif // defined(XP_WIN)
|
||||
, mQuirks(0)
|
||||
#if defined(XP_MACOSX)
|
||||
|
@ -1563,7 +1560,8 @@ PluginInstanceParent::PluginWindowHookProc(HWND hWnd,
|
|||
switch (message) {
|
||||
case WM_SETFOCUS:
|
||||
// Let the child plugin window know it should take focus.
|
||||
self->CallSetPluginFocus();
|
||||
if (!self->mInAnswerFocusChange)
|
||||
self->CallSetPluginFocus();
|
||||
break;
|
||||
|
||||
case WM_CLOSE:
|
||||
|
@ -1743,6 +1741,8 @@ PluginInstanceParent::AnswerPluginFocusChange(const bool& gotFocus)
|
|||
// focus. We forward the event down to widget so the dom/focus manager can
|
||||
// be updated.
|
||||
#if defined(OS_WIN)
|
||||
AutoRestore<bool> ar(mInAnswerFocusChange);
|
||||
mInAnswerFocusChange = true;
|
||||
::SendMessage(mPluginHWND, gOOPPPluginFocusEvent, gotFocus ? 1 : 0, 0);
|
||||
return true;
|
||||
#else
|
||||
|
|
|
@ -349,6 +349,7 @@ private:
|
|||
HWND mPluginHWND;
|
||||
WNDPROC mPluginWndProc;
|
||||
bool mNestedEventState;
|
||||
bool mInAnswerFocusChange;
|
||||
#endif // defined(XP_WIN)
|
||||
#if defined(OS_MACOSX)
|
||||
private:
|
||||
|
|
|
@ -2295,6 +2295,20 @@ PluginModuleChild::ResetEventHooks()
|
|||
}
|
||||
#endif
|
||||
|
||||
bool
|
||||
PluginModuleChild::RecvProcessNativeEventsInRPCCall()
|
||||
{
|
||||
PLUGIN_LOG_DEBUG(("%s", FULLFUNCTION));
|
||||
#if defined(OS_WIN)
|
||||
ProcessNativeEventsInRPCCall();
|
||||
return true;
|
||||
#else
|
||||
NS_RUNTIMEABORT(
|
||||
"PluginModuleChild::RecvProcessNativeEventsInRPCCall not implemented!");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef OS_MACOSX
|
||||
void
|
||||
PluginModuleChild::ProcessNativeEvents() {
|
||||
|
|
|
@ -157,6 +157,9 @@ protected:
|
|||
|
||||
NS_NORETURN void QuickExit();
|
||||
|
||||
NS_OVERRIDE virtual bool
|
||||
RecvProcessNativeEventsInRPCCall();
|
||||
|
||||
public:
|
||||
PluginModuleChild();
|
||||
virtual ~PluginModuleChild();
|
||||
|
|
|
@ -1000,11 +1000,22 @@ PluginModuleParent::RecvProcessNativeEventsInRPCCall()
|
|||
return true;
|
||||
#else
|
||||
NS_NOTREACHED(
|
||||
"PluginInstanceParent::RecvProcessNativeEventsInRPCCall not implemented!");
|
||||
"PluginModuleParent::RecvProcessNativeEventsInRPCCall not implemented!");
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
PluginModuleParent::ProcessRemoteNativeEventsInRPCCall()
|
||||
{
|
||||
#if defined(OS_WIN)
|
||||
SendProcessNativeEventsInRPCCall();
|
||||
return;
|
||||
#endif
|
||||
NS_NOTREACHED(
|
||||
"PluginModuleParent::ProcessRemoteNativeEventsInRPCCall not implemented!");
|
||||
}
|
||||
|
||||
bool
|
||||
PluginModuleParent::RecvPluginShowWindow(const uint32_t& aWindowId, const bool& aModal,
|
||||
const int32_t& aX, const int32_t& aY,
|
||||
|
|
|
@ -139,6 +139,8 @@ public:
|
|||
PPluginIdentifierParent*
|
||||
GetIdentifierForNPIdentifier(NPIdentifier aIdentifier);
|
||||
|
||||
void ProcessRemoteNativeEventsInRPCCall();
|
||||
|
||||
#ifdef OS_MACOSX
|
||||
void AddToRefreshTimer(PluginInstanceParent *aInstance);
|
||||
void RemoveFromRefreshTimer(PluginInstanceParent *aInstance);
|
||||
|
|
|
@ -40,7 +40,7 @@ DEPTH = ../../..
|
|||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = modules/plugin/test
|
||||
relativesrcdir = dom/plugins/test
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
function handleRequest(request, response)
|
||||
{
|
||||
response.setStatusLine(request.httpVersion, 307, "Moved temporarily");
|
||||
response.setHeader("Location", "http://example.org/tests/modules/plugin/test/loremipsum.txt");
|
||||
response.setHeader("Location", "http://example.org/tests/dom/plugins/test/loremipsum.txt");
|
||||
response.setHeader("Content-Type", "text/html");
|
||||
}
|
|
@ -39,7 +39,7 @@ DEPTH = ../../../..
|
|||
topsrcdir = @top_srcdir@
|
||||
srcdir = @srcdir@
|
||||
VPATH = @srcdir@
|
||||
relativesrcdir = modules/plugin/test
|
||||
relativesrcdir = dom/plugins/test
|
||||
|
||||
include $(DEPTH)/config/autoconf.mk
|
||||
include $(topsrcdir)/config/rules.mk
|
До Ширина: | Высота: | Размер: 96 KiB После Ширина: | Высота: | Размер: 96 KiB |
|
@ -13,7 +13,7 @@
|
|||
var p = document.getElementById("plugin1");
|
||||
|
||||
var redirectingURL = "307-xo-redirect.sjs";
|
||||
var redirectTargetURL = "http://example.org/tests/modules/plugin/test/loremipsum.txt";
|
||||
var redirectTargetURL = "http://example.org/tests/dom/plugins/test/loremipsum.txt";
|
||||
|
||||
var expectedWriteURL = "";
|
||||
var expectedNotifyStatus = -1;
|
Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше
Загрузка…
Ссылка в новой задаче