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. (http://www.torchmo
bile.com/) | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google Inc. All rights reserved. |
5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 5 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 hitInnerEditorElement(result, pointInParent, accumulatedOffset); | 167 hitInnerEditorElement(result, pointInParent, accumulatedOffset); |
168 } | 168 } |
169 return true; | 169 return true; |
170 } | 170 } |
171 | 171 |
172 void LayoutTextControlSingleLine::styleDidChange(StyleDifference diff, const Com
putedStyle* oldStyle) | 172 void LayoutTextControlSingleLine::styleDidChange(StyleDifference diff, const Com
putedStyle* oldStyle) |
173 { | 173 { |
174 LayoutTextControl::styleDidChange(diff, oldStyle); | 174 LayoutTextControl::styleDidChange(diff, oldStyle); |
175 if (HTMLElement* placeholder = inputElement()->placeholderElement()) | 175 if (HTMLElement* placeholder = inputElement()->placeholderElement()) |
176 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB
eTruncated() ? CSSValueEllipsis : CSSValueClip); | 176 placeholder->setInlineStyleProperty(CSSPropertyTextOverflow, textShouldB
eTruncated() ? CSSValueEllipsis : CSSValueClip); |
177 setHasOverflowClip(false); | |
178 } | 177 } |
179 | 178 |
180 void LayoutTextControlSingleLine::capsLockStateMayHaveChanged() | 179 void LayoutTextControlSingleLine::capsLockStateMayHaveChanged() |
181 { | 180 { |
182 if (!node()) | 181 if (!node()) |
183 return; | 182 return; |
184 | 183 |
185 // Only draw the caps lock indicator if these things are true: | 184 // Only draw the caps lock indicator if these things are true: |
186 // 1) The field is a password field | 185 // 1) The field is a password field |
187 // 2) The frame is active | 186 // 2) The frame is active |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 // inner-editor element overflows the INPUT box intentionally, however it | 362 // inner-editor element overflows the INPUT box intentionally, however it |
364 // shouldn't affect outside of the INPUT box. So we ignore child overflow. | 363 // shouldn't affect outside of the INPUT box. So we ignore child overflow. |
365 } | 364 } |
366 | 365 |
367 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const | 366 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const |
368 { | 367 { |
369 return toHTMLInputElement(node()); | 368 return toHTMLInputElement(node()); |
370 } | 369 } |
371 | 370 |
372 } // namespace blink | 371 } // namespace blink |
OLD | NEW |