| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. |
| 3 * (C) 2008 Torch Mobile Inc. All rights reserved. | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. |
| 4 * (http://www.torchmobile.com/) | 4 * (http://www.torchmobile.com/) |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 6 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 // Only draw the caps lock indicator if these things are true: | 211 // Only draw the caps lock indicator if these things are true: |
| 212 // 1) The field is a password field | 212 // 1) The field is a password field |
| 213 // 2) The frame is active | 213 // 2) The frame is active |
| 214 // 3) The element is focused | 214 // 3) The element is focused |
| 215 // 4) The caps lock is on | 215 // 4) The caps lock is on |
| 216 bool should_draw_caps_lock_indicator = false; | 216 bool should_draw_caps_lock_indicator = false; |
| 217 | 217 |
| 218 if (LocalFrame* frame = GetDocument().GetFrame()) | 218 if (LocalFrame* frame = GetDocument().GetFrame()) |
| 219 should_draw_caps_lock_indicator = | 219 should_draw_caps_lock_indicator = |
| 220 InputElement()->type() == InputTypeNames::password && | 220 InputElement()->type() == InputTypeNames::password && |
| 221 frame->Selection().IsFocusedAndActive() && | 221 frame->Selection().FrameIsFocusedAndActive() && |
| 222 GetDocument().FocusedElement() == GetNode() && | 222 GetDocument().FocusedElement() == GetNode() && |
| 223 KeyboardEventManager::CurrentCapsLockState(); | 223 KeyboardEventManager::CurrentCapsLockState(); |
| 224 | 224 |
| 225 if (should_draw_caps_lock_indicator != should_draw_caps_lock_indicator_) { | 225 if (should_draw_caps_lock_indicator != should_draw_caps_lock_indicator_) { |
| 226 should_draw_caps_lock_indicator_ = should_draw_caps_lock_indicator; | 226 should_draw_caps_lock_indicator_ = should_draw_caps_lock_indicator; |
| 227 SetShouldDoFullPaintInvalidation(); | 227 SetShouldDoFullPaintInvalidation(); |
| 228 } | 228 } |
| 229 } | 229 } |
| 230 | 230 |
| 231 bool LayoutTextControlSingleLine::HasControlClip() const { | 231 bool LayoutTextControlSingleLine::HasControlClip() const { |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 // If the INPUT content height is smaller than the font height, the | 408 // If the INPUT content height is smaller than the font height, the |
| 409 // inner-editor element overflows the INPUT box intentionally, however it | 409 // inner-editor element overflows the INPUT box intentionally, however it |
| 410 // shouldn't affect outside of the INPUT box. So we ignore child overflow. | 410 // shouldn't affect outside of the INPUT box. So we ignore child overflow. |
| 411 } | 411 } |
| 412 | 412 |
| 413 HTMLInputElement* LayoutTextControlSingleLine::InputElement() const { | 413 HTMLInputElement* LayoutTextControlSingleLine::InputElement() const { |
| 414 return toHTMLInputElement(GetNode()); | 414 return toHTMLInputElement(GetNode()); |
| 415 } | 415 } |
| 416 | 416 |
| 417 } // namespace blink | 417 } // namespace blink |
| OLD | NEW |