Comment #12 on issue 2215 by [email protected]: event.metaKey returns true  
when ALT is pressed
http://code.google.com/p/chromium/issues/detail?id=2215

Executive summary:

This is a bug that we inherited from WebKit that was fixed by them more  
than a year ago.

The full story, doing a deeeep dig:

This was introduced two repositories ago. glue/webinputevent.cc was  
introduced by CL
4490537 (for those of you playing along inside Google). The code in  
question is the
same as today.

This was a refactoring from port/platform/KeyEventWin.cpp, which had:

     , m_altKey(lParam & ALT_KEY_DOWN_MASK)
     , m_metaKey(lParam & ALT_KEY_DOWN_MASK) // FIXME: Is this right?

So at that point it was added with a question, but during the refactor by  
Darin, the
FIXME was removed.

So where does this line come from? If you trace it alllll the way back to  
the
original repository, you find CL 2753644 by bryner, with the sole comment:

"Import of WebKit rev 15117"

WebKit? Let's look.
http://trac.webkit.org/browser/trunk/WebCore/platform/win/KeyEventWin.cpp?rev=15117
  
has:

     , m_metaKey(lParam & ALT_KEY_DOWN_MASK) // FIXME: Is this right?

Aha! That's where it came from (and checked in by Darin!). So where did  
that line
come from, and where did it go? It was introduced by 13350
(http://trac.webkit.org/changeset/13350) as part of the original commit of  
the file.

Where did it go? At r23359 (http://trac.webkit.org/changeset/23359), Darin  
changed
the comment to:

     // FIXME: This is not right!

Yet, in r25520 (http://trac.webkit.org/changeset/25520), Hyatt changed it  
to:

    , m_altKey(GetKeyState(VK_MENU) & HIGH_BIT_MASK_SHORT)
    , m_metaKey(m_altKey)

which is the same thing, just without the comment.

Finally, in r29375 (http://trac.webkit.org/changeset/29375), adachan  
changed it to:

    , m_metaKey(false)

His commit comment is terse:

     Meta key is not the same as Alt key on windows.

     Reviewed by Darin.

This seems pretty clear to me. This is a bug, and we should fix it.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to