[Webkit-unassigned] [Bug 43258] Implement chromium WebDeviceOrientationClient wrapper and have WebViewImpl get it from WebViewClient.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 9 08:54:08 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=43258





--- Comment #25 from Jeremy Orlow <jorlow at chromium.org>  2010-08-09 08:54:07 PST ---
(In reply to comment #22)
> (In reply to comment #21)
> > (From update of attachment 63884 [details] [details])
> > WebKit/chromium/public/WebDeviceOrientation.h:49
> >  +      static WebDeviceOrientation nullOrientation() { return WebDeviceOrientation(); }
> > Since you're using (), C++ guarantees us that everything is 0'ed out?
> No, WebDeviceOrientation() is the private constructor that sets m_isNull=true and leaves the rest uninitialized. I figured the values of the other members doesn't matter when m_isNull is true.

Lets zero them out.  Or else at least add asserts that we're not null for every other accessor.

> > WebKit/chromium/public/WebDeviceOrientationClientMock.h:41
> >  +      void setController(WebDeviceOrientationController*);
> > Either virtual of WEBKIT_API
> It is virtual since it's inherited from WebDeviceOrientationClient.

That makes ((WebDeviceOrientationClient *)new WebDeviceOrientationClientMock)->setController() work across the DLL barrier, but I believe not new WebDeviceOrientationClientMock->setController().

> > WebKit/chromium/public/WebDeviceOrientationClientMock.h:49
> >  +      void initialize();
> > WEBKIT_API
> Done. (Also for reset()).
> 
> > WebKit/chromium/public/WebDeviceOrientationClientMock.h:52
> >  +      WebCore::DeviceOrientationClientMock* m_clientMock;
> > I can't remember if this is allowed or not.  We might prefer a void* and casting...see if you can find other examples (like in PrivatePtr).
> I can't find any classes in WebKit/chromium/public that have a void* member, and WebPrivatePtr<T> uses a T* member so I hope it's ok.

k

-- 
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