| 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. | 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 LayoutUnit nonContentHeight) const { | 294 LayoutUnit nonContentHeight) const { |
| 295 return lineHeight + nonContentHeight; | 295 return lineHeight + nonContentHeight; |
| 296 } | 296 } |
| 297 | 297 |
| 298 PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle( | 298 PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle( |
| 299 const ComputedStyle& startStyle) const { | 299 const ComputedStyle& startStyle) const { |
| 300 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); | 300 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); |
| 301 textBlockStyle->inheritFrom(startStyle); | 301 textBlockStyle->inheritFrom(startStyle); |
| 302 adjustInnerEditorStyle(*textBlockStyle); | 302 adjustInnerEditorStyle(*textBlockStyle); |
| 303 | 303 |
| 304 textBlockStyle->setWhiteSpace(EWhiteSpace::Pre); | 304 textBlockStyle->setWhiteSpace(EWhiteSpace::kPre); |
| 305 textBlockStyle->setOverflowWrap(NormalOverflowWrap); | 305 textBlockStyle->setOverflowWrap(NormalOverflowWrap); |
| 306 textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllipsis | 306 textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllipsis |
| 307 : TextOverflowClip); | 307 : TextOverflowClip); |
| 308 | 308 |
| 309 int computedLineHeight = | 309 int computedLineHeight = |
| 310 lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes).toInt(); | 310 lineHeight(true, HorizontalLine, PositionOfInteriorLineBoxes).toInt(); |
| 311 // Do not allow line-height to be smaller than our default. | 311 // Do not allow line-height to be smaller than our default. |
| 312 if (textBlockStyle->fontSize() >= computedLineHeight) | 312 if (textBlockStyle->fontSize() >= computedLineHeight) |
| 313 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); | 313 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); |
| 314 | 314 |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 // If the INPUT content height is smaller than the font height, the | 405 // If the INPUT content height is smaller than the font height, the |
| 406 // inner-editor element overflows the INPUT box intentionally, however it | 406 // inner-editor element overflows the INPUT box intentionally, however it |
| 407 // shouldn't affect outside of the INPUT box. So we ignore child overflow. | 407 // shouldn't affect outside of the INPUT box. So we ignore child overflow. |
| 408 } | 408 } |
| 409 | 409 |
| 410 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const { | 410 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const { |
| 411 return toHTMLInputElement(node()); | 411 return toHTMLInputElement(node()); |
| 412 } | 412 } |
| 413 | 413 |
| 414 } // namespace blink | 414 } // namespace blink |
| OLD | NEW |