[webkit-reviews] review granted: [Bug 190056] REGRESSION (r230523): Caps lock indicator not shown in password field : [Attachment 353917] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 5 16:23:46 PST 2018


Ryosuke Niwa <rniwa at webkit.org> has granted Per Arne Vollan
<pvollan at apple.com>'s request for review:
Bug 190056: REGRESSION (r230523): Caps lock indicator not shown in password
field
https://bugs.webkit.org/show_bug.cgi?id=190056

Attachment 353917: Patch

https://bugs.webkit.org/attachment.cgi?id=353917&action=review




--- Comment #39 from Ryosuke Niwa <rniwa at webkit.org> ---
Comment on attachment 353917
  --> https://bugs.webkit.org/attachment.cgi?id=353917
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=353917&action=review

r=me with the following comments addressed

> Source/WebCore/platform/mac/KeyEventMac.mm:264
> +    if (s_currentModifiers) {

It's a bit subtle that this variable is set in WebContent process and it's not
in UI process.
I would have preferred to have two set of functions but I think that would have
too many dependencies to update.
Why don't we add a helper function like
PlatformKeyboardEvent::currentStateOfModifierKeys() which has this logic
as I'm suggesting below with a comment saying that this is set only in
WebContent process.

> Source/WebKit/UIProcess/WebPageProxy.cpp:8113
> +    PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey,
altKey, metaKey);
> +    capsLockKey = PlatformKeyboardEvent::currentCapsLockState();

Can we add a new helper function to PlatformKeyboardEvent which returns
OptionSet<PlatformEvent::Modifier>?
Specifically, we'd call GetCurrentKeyModifiers() twice here so so it would be
nice to avoid that.
e.g. PlatformKeyboardEvent::currentStateOfModifierKeys()?


More information about the webkit-reviews mailing list