Changeset 76351 in webkit
- Timestamp:
- Jan 21, 2011 9:21:51 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r76348 r76351 1 2011-01-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Show caps lock indicator in password fields 6 https://bugs.webkit.org/show_bug.cgi?id=52878 7 8 Test: manual-tests/password-caps-lock.html 9 10 * platform/gtk/KeyEventGtk.cpp: 11 (WebCore::PlatformKeyboardEvent::currentCapsLockState): Implement 12 currentCapsLockState() using GDK API. 13 * platform/gtk/RenderThemeGtk.cpp: 14 (WebCore::RenderThemeGtk::paintCapsLockIndicator): Paint an icon 15 in the password field when the caps lock modifier is locked. 16 * platform/gtk/RenderThemeGtk.h: 17 1 18 2011-01-21 Pavel Podivilov <podivilov@chromium.org> 2 19 -
trunk/Source/WebCore/platform/gtk/KeyEventGtk.cpp
r67206 r76351 584 584 bool PlatformKeyboardEvent::currentCapsLockState() 585 585 { 586 notImplemented(); 587 return false; 586 return gdk_keymap_get_caps_lock_state(gdk_keymap_get_default()); 588 587 } 589 588 -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.cpp
r76192 r76351 310 310 } 311 311 312 bool RenderThemeGtk::paintCapsLockIndicator(RenderObject* renderObject, const PaintInfo& paintInfo, const IntRect& rect) 313 { 314 // The other paint methods don't need to check whether painting is disabled because RenderTheme already checks it 315 // before calling them, but paintCapsLockIndicator() is called by RenderTextControlSingleLine which doesn't check it. 316 if (paintInfo.context->paintingDisabled()) 317 return true; 318 319 GRefPtr<GdkPixbuf> icon = getStockIcon(GTK_TYPE_ENTRY, GTK_STOCK_CAPS_LOCK_WARNING, 320 gtkTextDirection(renderObject->style()->direction()), 321 gtkIconState(this, renderObject), GTK_ICON_SIZE_MENU); 322 323 // GTK+ locates the icon right aligned in the entry. The given rectangle is already 324 // centered vertically by RenderTextControlSingleLine. 325 IntPoint iconPosition(rect.x() + rect.width() - gdk_pixbuf_get_width(icon.get()), rect.y()); 326 paintGdkPixbuf(paintInfo.context, icon.get(), iconPosition); 327 return true; 328 } 329 312 330 void RenderThemeGtk::adjustSliderTrackStyle(CSSStyleSelector*, RenderStyle* style, Element*) const 313 331 { -
trunk/Source/WebCore/platform/gtk/RenderThemeGtk.h
r76192 r76351 170 170 #endif 171 171 172 virtual bool paintCapsLockIndicator(RenderObject*, const PaintInfo&, const IntRect&); 173 172 174 private: 173 175 void platformInit(); -
trunk/Source/WebKit/gtk/ChangeLog
r76130 r76351 1 2011-01-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Reviewed by Martin Robinson. 4 5 [GTK] Show caps lock indicator in password fields 6 https://bugs.webkit.org/show_bug.cgi?id=52878 7 8 Test: manual-tests/password-caps-lock.html 9 10 * webkit/webkitwebview.cpp: 11 (webkit_web_view_key_release_event): Call 12 capsLockStateMayHaveChanged() when caps lock key is pressed. 13 1 14 2011-01-19 Joone Hur <joone.hur@collabora.co.uk> 2 15 -
trunk/Source/WebKit/gtk/webkit/webkitwebview.cpp
r75782 r76351 790 790 if (!frame->view()) 791 791 return FALSE; 792 793 if (event->keyval == GDK_Caps_Lock) 794 frame->eventHandler()->capsLockStateMayHaveChanged(); 792 795 793 796 PlatformKeyboardEvent keyboardEvent(event);
Note: See TracChangeset
for help on using the changeset viewer.