[Webkit-unassigned] [Bug 39589] Add LayoutTestController methods to test DeviceOrientation

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 16 09:44:44 PDT 2010


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





--- Comment #9 from hans at chromium.org  2010-07-16 09:44:44 PST ---
(In reply to comment #7)
> Not a review, just a drive-by comment:
> 
> > This former approach isn't scalable. The latter is, and by removing the DeviceOrientationClient argument from the Page constructor, avoids the scalability problem there too. Note that this approach was taken for the SpeechInputClient in Bug 41518.
> > 
> > I think it's probably best to make the change to add Page.setDeviceOrientationClient. What do you think?
> 
> Yes this was the reason I chose a setter for the client pointer in the speech input patch. The Page constructor is quite overloaded with 9 parameters now and many of them are used in only few of the ports. A setter would clean it up, while allowing the webkit layer to switch to the mock when necessary.

I agree with Satish's comment. It makes some sense to have these members initialized to null, and allow them to be set by embedders that implement them. This would be a nice bonus on top of being able to easily inject a mock implementation.

One downside would be that doing lazy initialization (which we mentioned in Bug 42265) of these members becomes more complicated. But, as was also pointed out in that discussion, these objects are very light-weight, so I don't think it's an important thing to do.

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