зеркало из https://github.com/mozilla/pjs.git
Bug 682759: Use fixed size integer in NPRemoteWindow to store window reference. r=m_kato r=cjones
This commit is contained in:
Родитель
8483b15865
Коммит
e1a3d3c8b5
|
@ -985,7 +985,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
|
|||
#ifdef MOZ_WIDGET_GTK2
|
||||
if (gtk_check_version(2,18,7) != NULL) { // older
|
||||
if (aWindow.type == NPWindowTypeWindow) {
|
||||
GdkWindow* socket_window = gdk_window_lookup(aWindow.window);
|
||||
GdkWindow* socket_window = gdk_window_lookup(static_cast<GdkNativeWindow>(aWindow.window));
|
||||
if (socket_window) {
|
||||
// A GdkWindow for the socket already exists. Need to
|
||||
// workaround https://bugzilla.gnome.org/show_bug.cgi?id=607061
|
||||
|
@ -1039,7 +1039,7 @@ PluginInstanceChild::AnswerNPP_SetWindow(const NPRemoteWindow& aWindow)
|
|||
if (!CreatePluginWindow())
|
||||
return false;
|
||||
|
||||
ReparentPluginWindow((HWND)aWindow.window);
|
||||
ReparentPluginWindow(reinterpret_cast<HWND>(aWindow.window));
|
||||
SizePluginWindow(aWindow.width, aWindow.height);
|
||||
|
||||
mWindow.window = (void*)mPluginWindowHWND;
|
||||
|
|
|
@ -604,7 +604,7 @@ PluginInstanceParent::AsyncSetWindow(NPWindow* aWindow)
|
|||
{
|
||||
NPRemoteWindow window;
|
||||
mWindowType = aWindow->type;
|
||||
window.window = reinterpret_cast<uintptr_t>(aWindow->window);
|
||||
window.window = reinterpret_cast<uint64_t>(aWindow->window);
|
||||
window.x = aWindow->x;
|
||||
window.y = aWindow->y;
|
||||
window.width = aWindow->width;
|
||||
|
@ -911,7 +911,7 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow)
|
|||
else {
|
||||
SubclassPluginWindow(reinterpret_cast<HWND>(aWindow->window));
|
||||
|
||||
window.window = reinterpret_cast<uintptr_t>(aWindow->window);
|
||||
window.window = reinterpret_cast<uint64_t>(aWindow->window);
|
||||
window.x = aWindow->x;
|
||||
window.y = aWindow->y;
|
||||
window.width = aWindow->width;
|
||||
|
@ -919,7 +919,7 @@ PluginInstanceParent::NPP_SetWindow(const NPWindow* aWindow)
|
|||
window.type = aWindow->type;
|
||||
}
|
||||
#else
|
||||
window.window = reinterpret_cast<unsigned long>(aWindow->window);
|
||||
window.window = reinterpret_cast<uint64_t>(aWindow->window);
|
||||
window.x = aWindow->x;
|
||||
window.y = aWindow->y;
|
||||
window.width = aWindow->width;
|
||||
|
|
|
@ -110,7 +110,7 @@ typedef nsCString Buffer;
|
|||
|
||||
struct NPRemoteWindow
|
||||
{
|
||||
unsigned long window;
|
||||
uint64_t window;
|
||||
int32_t x;
|
||||
int32_t y;
|
||||
uint32_t width;
|
||||
|
@ -363,7 +363,7 @@ struct ParamTraits<mozilla::plugins::NPRemoteWindow>
|
|||
|
||||
static void Write(Message* aMsg, const paramType& aParam)
|
||||
{
|
||||
aMsg->WriteULong(aParam.window);
|
||||
aMsg->WriteUInt64(aParam.window);
|
||||
WriteParam(aMsg, aParam.x);
|
||||
WriteParam(aMsg, aParam.y);
|
||||
WriteParam(aMsg, aParam.width);
|
||||
|
@ -381,12 +381,12 @@ struct ParamTraits<mozilla::plugins::NPRemoteWindow>
|
|||
|
||||
static bool Read(const Message* aMsg, void** aIter, paramType* aResult)
|
||||
{
|
||||
unsigned long window;
|
||||
uint64_t window;
|
||||
int32_t x, y;
|
||||
uint32_t width, height;
|
||||
NPRect clipRect;
|
||||
NPWindowType type;
|
||||
if (!(aMsg->ReadULong(aIter, &window) &&
|
||||
if (!(aMsg->ReadUInt64(aIter, &window) &&
|
||||
ReadParam(aMsg, aIter, &x) &&
|
||||
ReadParam(aMsg, aIter, &y) &&
|
||||
ReadParam(aMsg, aIter, &width) &&
|
||||
|
|
Загрузка…
Ссылка в новой задаче