Bug 51230 - Caps-Lock indicator never appears in WebKit2
Summary: Caps-Lock indicator never appears in WebKit2
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar, PlatformOnly
Depends on:
Blocks:
 
Reported: 2010-12-16 20:11 PST by Adam Roben (:aroben)
Modified: 2011-04-04 13:57 PDT (History)
3 users (show)

See Also:


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

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 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 Adam Roben (:aroben) 2010-12-16 20:12:32 PST
Classic WebKit handles this in WebView::keyDown by calling capsLockStateMayHaveChanged.
Comment 2 Adam Roben (:aroben) 2010-12-16 20:16:33 PST
<rdar://problem/8780989>
Comment 3 Alexey Proskuryakov 2011-04-04 13:27:21 PDT
Created attachment 88113 [details]
proposed fix

This fixes the problem on Mac, and probably on Windows, too.
Comment 4 mitz 2011-04-04 13:33:09 PDT
Comment on attachment 88113 [details]
proposed fix

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 Alexey Proskuryakov 2011-04-04 13:51:36 PDT
> 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 Alexey Proskuryakov 2011-04-04 13:56:59 PDT
Committed <http://trac.webkit.org/changeset/82870>. Please do verify that this helps on Windows.