[Webkit-unassigned] [Bug 96894] Add DeviceController base-class to remove duplication of DeviceXXXControler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 19 22:05:18 PDT 2012


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





--- Comment #4 from Hajime Morrita <morrita at google.com>  2012-09-19 22:05:47 PST ---
(From update of attachment 164340)
View in context: https://bugs.webkit.org/attachment.cgi?id=164340&action=review

I think the root source of (seemingly unnecessary) complexity is the responsibility assignment between client and the controller.
It smells possible wrong design if we see client creating an event object.

Can we eliminate preservedEvent() and hasPreservedEvent() by moving the logic to the controller?
That would simplify the interaction between controller and client. 
Since there is no client implementation available for now, it's hard to see whether this complexity is really necessary.
And I expect it isn't. 

What do you think?

> Source/WebCore/page/DeviceController.cpp:39
> +    int isEmpty = m_listeners.size();

What does this mean?
- Why is "isEmpty" int not bool?
- Why non-empty listener vector implies isEmpty?

> Source/WebCore/page/DeviceController.cpp:41
> +    if (m_listeners.find(window) == m_listeners.end())

You can just add it. That's how set works.

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