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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 inline HTMLElement* LayoutTextControlSingleLine::innerSpinButtonElement() const | 67 inline HTMLElement* LayoutTextControlSingleLine::innerSpinButtonElement() const |
68 { | 68 { |
69 return toHTMLElement(inputElement()->userAgentShadowRoot()->getElementById(S
hadowElementNames::spinButton())); | 69 return toHTMLElement(inputElement()->userAgentShadowRoot()->getElementById(S
hadowElementNames::spinButton())); |
70 } | 70 } |
71 | 71 |
72 void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout
Point& paintOffset) const | 72 void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout
Point& paintOffset) const |
73 { | 73 { |
74 LayoutTextControl::paint(paintInfo, paintOffset); | 74 LayoutTextControl::paint(paintInfo, paintOffset); |
75 | 75 |
76 if (paintInfo.phase == PaintPhaseSelfBlockBackground && m_shouldDrawCapsLock
Indicator) { | 76 if (shouldPaintSelfBlockBackground(paintInfo.phase) && m_shouldDrawCapsLockI
ndicator) { |
77 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.co
ntext, *this, paintInfo.phase, paintOffset)) | 77 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.co
ntext, *this, paintInfo.phase, paintOffset)) |
78 return; | 78 return; |
79 | 79 |
80 LayoutRect contentsRect = contentBoxRect(); | 80 LayoutRect contentsRect = contentBoxRect(); |
81 | 81 |
82 // Center in the block progression direction. | 82 // Center in the block progression direction. |
83 if (isHorizontalWritingMode()) | 83 if (isHorizontalWritingMode()) |
84 contentsRect.setY((size().height() - contentsRect.height()) / 2); | 84 contentsRect.setY((size().height() - contentsRect.height()) / 2); |
85 else | 85 else |
86 contentsRect.setX((size().width() - contentsRect.width()) / 2); | 86 contentsRect.setX((size().width() - contentsRect.width()) / 2); |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 if (innerEditorElement()) | 448 if (innerEditorElement()) |
449 innerEditorElement()->setScrollTop(newTop); | 449 innerEditorElement()->setScrollTop(newTop); |
450 } | 450 } |
451 | 451 |
452 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const | 452 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const |
453 { | 453 { |
454 return toHTMLInputElement(node()); | 454 return toHTMLInputElement(node()); |
455 } | 455 } |
456 | 456 |
457 } | 457 } |
OLD | NEW |