[Webkit-unassigned] [Bug 27713] WINCE port: make plugin work for wince
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Jul 27 08:01:25 PDT 2009
https://bugs.webkit.org/show_bug.cgi?id=27713
--- Comment #3 from Yong Li <yong.li at torchmobile.com> 2009-07-27 08:01:24 PDT ---
(In reply to comment #2)
> (From update of attachment 33545 [details])
>
>
> > HKEY key;
> > +#if PLATFORM(WINCE)
> > + HRESULT result = RegOpenKeyExW(rootKey, L"Software\\MozillaPlugins", 0, 0, &key);
> > +#else
> > HRESULT result = RegOpenKeyExW(rootKey, L"Software\\MozillaPlugins", 0, KEY_ENUMERATE_SUB_KEYS, &key);
> > +#endif
>
> Does it make more sense to #define KEY_ENUMERATE_SUB_KEYS if it's not
> available?
>
KEY_ENUMERATE_SUB_KEYS is defined by OS header where RegOpenKeyExW is defined.
> > - NP_Initialize = (NP_InitializeFuncPtr)GetProcAddress(m_module, "NP_Initialize");
> > - NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)GetProcAddress(m_module, "NP_GetEntryPoints");
> > - m_NPP_Shutdown = (NPP_ShutdownProcPtr)GetProcAddress(m_module, "NP_Shutdown");
> > + NP_Initialize = (NP_InitializeFuncPtr)GetProcAddress(m_module, _T("NP_Initialize"));
> > + NP_GetEntryPoints = (NP_GetEntryPointsFuncPtr)GetProcAddress(m_module, _T("NP_GetEntryPoints"));
> > + m_NPP_Shutdown = (NPP_ShutdownProcPtr)GetProcAddress(m_module, _T("NP_Shutdown"));
>
> Will this not affect the Win32 build?
No, it won't affect win32 build. If GetProcAddress means GetProcAddressW, _T""
means L"". If GetProcAddress means GetProcAddressA, _T"" means "".
>
> > @@ -264,6 +284,10 @@ static bool isWindowsMessageUserGesture(UINT message)
> > LRESULT
> > PluginView::wndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
> > {
> > +#if PLATFORM(WINCE)
> > + if (!m_pluginWndProc)
> > + return 1;
> > +#endif
>
> Can this be unconditional on WINCE?
>
> > +#if PLATFORM(WINCE)
> > + m_windowRect = frameView->contentsToWindow(frameRect());
> > +#else
> > m_windowRect = IntRect(frameView->contentsToWindow(frameRect().location()), frameRect().size());
> > +#endif
>
> The difference here concerns me.
Because we support zoomed view. so frameRect().size() doesn't work for us
>
> > @@ -491,15 +525,24 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect)
> > m_npWindow.type = NPWindowTypeDrawable;
> > m_npWindow.window = hdc;
> >
> > - IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(frameRect().location());
> > -
> > WINDOWPOS windowpos;
> > memset(&windowpos, 0, sizeof(windowpos));
> >
> > +#if PLATFORM(WINCE)
> > + IntRect r = static_cast<FrameView*>(parent())->contentsToWindow(frameRect());
> > +
> > + windowpos.x = r.x();
> > + windowpos.y = r.y();
> > + windowpos.cx = r.width();
> > + windowpos.cy = r.height();
> > +#else
> > + IntPoint p = static_cast<FrameView*>(parent())->contentsToWindow(frameRect().location());
> > +
> > windowpos.x = p.x();
> > windowpos.y = p.y();
> > windowpos.cx = frameRect().width();
> > windowpos.cy = frameRect().height();
> > +#endif
>
> Likewise. Why are the coordinates behaving so differently?
same reason as above.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list