| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 RenderStyle* RenderTextControlSingleLine::textBaseStyle() const | 59 RenderStyle* RenderTextControlSingleLine::textBaseStyle() const |
| 60 { | 60 { |
| 61 HTMLElement* innerBlock = innerBlockElement(); | 61 HTMLElement* innerBlock = innerBlockElement(); |
| 62 return innerBlock ? innerBlock->renderer()->style() : style(); | 62 return innerBlock ? innerBlock->renderer()->style() : style(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void RenderTextControlSingleLine::paint(PaintInfo& paintInfo, const LayoutPoint&
paintOffset) | 65 void RenderTextControlSingleLine::paint(PaintInfo& paintInfo, const LayoutPoint&
paintOffset) |
| 66 { | 66 { |
| 67 RenderTextControl::paint(paintInfo, paintOffset); | 67 RenderTextControl::paint(paintInfo, paintOffset); |
| 68 | 68 |
| 69 if (paintInfo.phase == PaintPhaseBlockBackground && m_shouldDrawCapsLockIndi
cator) { | 69 if (paintInfo.getPhase() == PaintPhaseBlockBackground && m_shouldDrawCapsLoc
kIndicator) { |
| 70 LayoutRect contentsRect = contentBoxRect(); | 70 LayoutRect contentsRect = contentBoxRect(); |
| 71 | 71 |
| 72 // Center in the block progression direction. | 72 // Center in the block progression direction. |
| 73 if (isHorizontalWritingMode()) | 73 if (isHorizontalWritingMode()) |
| 74 contentsRect.setY((height() - contentsRect.height()) / 2); | 74 contentsRect.setY((height() - contentsRect.height()) / 2); |
| 75 else | 75 else |
| 76 contentsRect.setX((width() - contentsRect.width()) / 2); | 76 contentsRect.setX((width() - contentsRect.width()) / 2); |
| 77 | 77 |
| 78 // Convert the rect into the coords used for painting the content | 78 // Convert the rect into the coords used for painting the content |
| 79 contentsRect.moveBy(paintOffset + location()); | 79 contentsRect.moveBy(paintOffset + location()); |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 459 return true; | 459 return true; |
| 460 return RenderBlock::logicalScroll(direction, granularity, multiplier, stopNo
de); | 460 return RenderBlock::logicalScroll(direction, granularity, multiplier, stopNo
de); |
| 461 } | 461 } |
| 462 | 462 |
| 463 HTMLInputElement* RenderTextControlSingleLine::inputElement() const | 463 HTMLInputElement* RenderTextControlSingleLine::inputElement() const |
| 464 { | 464 { |
| 465 return toHTMLInputElement(node()); | 465 return toHTMLInputElement(node()); |
| 466 } | 466 } |
| 467 | 467 |
| 468 } | 468 } |
| OLD | NEW |