[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 09:29:40 PDT 2010


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





--- Comment #26 from hans at chromium.org  2010-08-09 09:29:40 PST ---
(In reply to comment #24)
> WebKit/chromium/src/WebViewImpl.h:79
>  +  class WebDeviceOrientationClient;
> Is this required, as I don't see it used anywhere?
Thanks Satish, that was a left-over from a previous version. Removed.

(In reply to comment #25)
> (In reply to comment #22)
> > (In reply to comment #21)
> > > (From update of attachment 63884 [details] [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.
Zeroing them out.

> 
> > > 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().
Oh, I didn't realize that. Fixing.

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


Uploading new patch addressing the comments 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