[Webkit-unassigned] [Bug 32785] New: Should class PlatformKeyboardEvent need a platform independent constructor like class PlatformMouseEvent ?

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Dec 20 02:45:26 PST 2009


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

           Summary: Should class PlatformKeyboardEvent need a platform
                    independent constructor like class PlatformMouseEvent
                    ?
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: Other
        OS/Version: Other
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: zhangheng607 at 163.com


All the constructors in class PlatformKeyboardEvent are platform dependent. It
seems inappropriate for naturalization to other platform.
Should class PlatformKeyboardEvent need a platform independent constructor like
class PlatformMouseEvent ?

/////////////////////////////code in
PlatformMouseEvent.h///////////////////////////////////
    class PlatformMouseEvent {
    public:
        PlatformMouseEvent()
            : m_button(NoButton)
            , m_eventType(MouseEventMoved)
            , m_clickCount(0)
            , m_shiftKey(false)
            , m_ctrlKey(false)
            , m_altKey(false)
            , m_metaKey(false)
            , m_timestamp(0)
            , m_modifierFlags(0)
        {
        }

        PlatformMouseEvent(const IntPoint& position, const IntPoint&
globalPosition, MouseButton button, MouseEventType eventType,
                           int clickCount, bool shift, bool ctrl, bool alt,
bool meta, double timestamp)
            : m_position(position)
            , m_globalPosition(globalPosition)
            , m_button(button)
            , m_eventType(eventType)
            , m_clickCount(clickCount)
            , m_shiftKey(shift)
            , m_ctrlKey(ctrl)
            , m_altKey(alt)
            , m_metaKey(meta)
            , m_timestamp(timestamp)
            , m_modifierFlags(0)
        {
        }
    ....
    }


/////////////////////example code for
PlatformKeyboardEvent////////////////////////////

        PlatformKeyboardEvent(Type type, String text, String unmodifiedText,
String keyIdentifier, bool autoRepeat, int windowsVirtualKeyCode, 
                              int nativeVirtualKeyCode, bool isKeypad, bool
shiftKey, bool ctrlKey, bool altKey, bool metaKey)
            : m_type(type) 
            , m_text(text)
            , m_unmodifiedText(unmodifiedText)
            , m_keyIdentifier(keyIdentifier)
            , m_autoRepeat(autoRepeat)
            , m_windowsVirtualKeyCode(windowsVirtualKeyCode)
            , m_nativeVirtualKeyCode(nativeVirtualKeyCode)
            , m_isKeypad(isKeypad)
            , m_shiftKey(shiftKey)
            , m_ctrlKey(ctrlKey)
            , m_altKey(altKey)
            , m_metaKey(metaKey)
        {
        }

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