Bug 51230 - Caps-Lock indicator never appears in WebKit2
: Caps-Lock indicator never appears in WebKit2
Status: RESOLVED FIXED
: WebKit
Forms
: 528+ (Nightly build)
: All All
: P2 Normal
Assigned To:
:
: InRadar, PlatformOnly
:
:
  Show dependency treegraph
 
Reported: 2010-12-16 20:11 PST by
Modified: 2011-04-04 13:57 PST (History)


Attachments
proposed fix (13.84 KB, patch)
2011-04-04 13:27 PST, Alexey Proskuryakov
mitz: review+
Review Patch | Details | Formatted Diff | Diff


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2010-12-16 20:11:49 PST
To reproduce:

1. Go to data:text/html,<input type=password>
2. Click in the text field
3. Press Caps-Lock

The Caps-Lock indicator doesn't appear.
------- Comment #1 From 2010-12-16 20:12:32 PST -------
Classic WebKit handles this in WebView::keyDown by calling capsLockStateMayHaveChanged.
------- Comment #2 From 2010-12-16 20:16:33 PST -------
<rdar://problem/8780989>
------- Comment #3 From 2011-04-04 13:27:21 PST -------
Created an attachment (id=88113) [details]
proposed fix

This fixes the problem on Mac, and probably on Windows, too.
------- Comment #4 From 2011-04-04 13:33:09 PST -------
(From update of attachment 88113 [details])
View in context: https://bugs.webkit.org/attachment.cgi?id=88113&action=review

> Source/WebCore/ChangeLog:441
> -        DumpRenderTreeÕs delegate to be dispatched. The delegate doesnÕt expect to be called between
> +        DumpRenderTree's delegate to be dispatched. The delegate doesn't expect to be called between
>          tests, and it references the layout test controller, which is null.
>  
>          * page/Frame.cpp:
> -        (WebCore::Frame::scalePage): Avoid an unnecessary layout if the page scale isnÕt changing. This
> +        (WebCore::Frame::scalePage): Avoid an unnecessary layout if the page scale isn't changing. This

These characters should be re-encoded as UTF-8 rather than changed.

> Source/WebKit2/UIProcess/API/mac/WKView.mm:1173
> +    [[theEvent retain] autorelease];

A more modern pattern is to use a mysteriously-named RetainPtr for this. Or is it not enough to retain the event for the scope of this function?
------- Comment #5 From 2011-04-04 13:51:36 PST -------
> A more modern pattern is to use a mysteriously-named RetainPtr for this. Or is it not enough to retain the event for the scope of this function?

That code might be completely useless in WK2. It was present in keyDown, so I'm copying it elsewhere.
------- Comment #6 From 2011-04-04 13:56:59 PST -------
Committed <http://trac.webkit.org/changeset/82870>. Please do verify that this helps on Windows.