| 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 inline HTMLElement* LayoutTextControlSingleLine::innerSpinButtonElement() const | 66 inline HTMLElement* LayoutTextControlSingleLine::innerSpinButtonElement() const |
| 67 { | 67 { |
| 68 return toHTMLElement(inputElement()->userAgentShadowRoot()->getElementById(S
hadowElementNames::spinButton())); | 68 return toHTMLElement(inputElement()->userAgentShadowRoot()->getElementById(S
hadowElementNames::spinButton())); |
| 69 } | 69 } |
| 70 | 70 |
| 71 void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout
Point& paintOffset) const | 71 void LayoutTextControlSingleLine::paint(const PaintInfo& paintInfo, const Layout
Point& paintOffset) const |
| 72 { | 72 { |
| 73 LayoutTextControl::paint(paintInfo, paintOffset); | 73 LayoutTextControl::paint(paintInfo, paintOffset); |
| 74 | 74 |
| 75 if (shouldPaintSelfBlockBackground(paintInfo.phase) && m_shouldDrawCapsLockI
ndicator) { | 75 if (shouldPaintSelfBlockBackground(paintInfo.phase) && m_shouldDrawCapsLockI
ndicator) { |
| 76 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.co
ntext, *this, paintInfo.phase, paintOffset)) | 76 if (LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintInfo.co
ntext, *this, paintInfo.phase)) |
| 77 return; | 77 return; |
| 78 | 78 |
| 79 LayoutRect contentsRect = contentBoxRect(); | 79 LayoutRect contentsRect = contentBoxRect(); |
| 80 | 80 |
| 81 // Center in the block progression direction. | 81 // Center in the block progression direction. |
| 82 if (isHorizontalWritingMode()) | 82 if (isHorizontalWritingMode()) |
| 83 contentsRect.setY((size().height() - contentsRect.height()) / 2); | 83 contentsRect.setY((size().height() - contentsRect.height()) / 2); |
| 84 else | 84 else |
| 85 contentsRect.setX((size().width() - contentsRect.width()) / 2); | 85 contentsRect.setX((size().width() - contentsRect.width()) / 2); |
| 86 | 86 |
| 87 // Convert the rect into the coords used for painting the content | 87 // Convert the rect into the coords used for painting the content |
| 88 contentsRect.moveBy(paintOffset + location()); | 88 contentsRect.moveBy(paintOffset + location()); |
| 89 IntRect snappedRect = pixelSnappedIntRect(contentsRect); | 89 IntRect snappedRect = pixelSnappedIntRect(contentsRect); |
| 90 LayoutObjectDrawingRecorder recorder(paintInfo.context, *this, paintInfo
.phase, snappedRect, paintOffset); | 90 LayoutObjectDrawingRecorder recorder(paintInfo.context, *this, paintInfo
.phase, snappedRect); |
| 91 LayoutTheme::theme().painter().paintCapsLockIndicator(*this, paintInfo,
snappedRect); | 91 LayoutTheme::theme().painter().paintCapsLockIndicator(*this, paintInfo,
snappedRect); |
| 92 } | 92 } |
| 93 } | 93 } |
| 94 | 94 |
| 95 void LayoutTextControlSingleLine::layout() | 95 void LayoutTextControlSingleLine::layout() |
| 96 { | 96 { |
| 97 LayoutAnalyzer::Scope analyzer(*this); | 97 LayoutAnalyzer::Scope analyzer(*this); |
| 98 | 98 |
| 99 LayoutBlockFlow::layoutBlock(true); | 99 LayoutBlockFlow::layoutBlock(true); |
| 100 | 100 |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 // inner-editor element overflows the INPUT box intentionally, however it | 363 // inner-editor element overflows the INPUT box intentionally, however it |
| 364 // shouldn't affect outside of the INPUT box. So we ignore child overflow. | 364 // shouldn't affect outside of the INPUT box. So we ignore child overflow. |
| 365 } | 365 } |
| 366 | 366 |
| 367 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const | 367 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const |
| 368 { | 368 { |
| 369 return toHTMLInputElement(node()); | 369 return toHTMLInputElement(node()); |
| 370 } | 370 } |
| 371 | 371 |
| 372 } // namespace blink | 372 } // namespace blink |
| OLD | NEW |