Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextControlSingleLine.cpp

Issue 2876973003: Rename *Focus*-methods of FrameSelection to clarify its public API (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutTheme.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698