| 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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 } | 352 } |
| 353 | 353 |
| 354 PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle(co
nst ComputedStyle& startStyle) const | 354 PassRefPtr<ComputedStyle> LayoutTextControlSingleLine::createInnerEditorStyle(co
nst ComputedStyle& startStyle) const |
| 355 { | 355 { |
| 356 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); | 356 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); |
| 357 textBlockStyle->inheritFrom(startStyle); | 357 textBlockStyle->inheritFrom(startStyle); |
| 358 adjustInnerEditorStyle(*textBlockStyle); | 358 adjustInnerEditorStyle(*textBlockStyle); |
| 359 | 359 |
| 360 textBlockStyle->setWhiteSpace(PRE); | 360 textBlockStyle->setWhiteSpace(PRE); |
| 361 textBlockStyle->setOverflowWrap(NormalOverflowWrap); | 361 textBlockStyle->setOverflowWrap(NormalOverflowWrap); |
| 362 textBlockStyle->setOverflowX(OHIDDEN); | 362 // Note that although overflowX/Y is set to scroll, the scrollbars will be |
| 363 textBlockStyle->setOverflowY(OHIDDEN); | 363 // hidden by the webkit-scrollbar selector in the default style sheet (html.
css). |
| 364 textBlockStyle->setOverflowX(OSCROLL); |
| 365 textBlockStyle->setOverflowY(OSCROLL); |
| 364 textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllips
is : TextOverflowClip); | 366 textBlockStyle->setTextOverflow(textShouldBeTruncated() ? TextOverflowEllips
is : TextOverflowClip); |
| 365 | 367 |
| 366 if (m_desiredInnerEditorLogicalHeight >= 0) | 368 if (m_desiredInnerEditorLogicalHeight >= 0) |
| 367 textBlockStyle->setLogicalHeight(Length(m_desiredInnerEditorLogicalHeigh
t, Fixed)); | 369 textBlockStyle->setLogicalHeight(Length(m_desiredInnerEditorLogicalHeigh
t, Fixed)); |
| 368 // Do not allow line-height to be smaller than our default. | 370 // Do not allow line-height to be smaller than our default. |
| 369 if (textBlockStyle->fontMetrics().lineSpacing() > lineHeight(true, Horizonta
lLine, PositionOfInteriorLineBoxes)) | 371 if (textBlockStyle->fontMetrics().lineSpacing() > lineHeight(true, Horizonta
lLine, PositionOfInteriorLineBoxes)) |
| 370 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); | 372 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); |
| 371 | 373 |
| 372 textBlockStyle->setDisplay(BLOCK); | 374 textBlockStyle->setDisplay(BLOCK); |
| 373 textBlockStyle->setUnique(); | 375 textBlockStyle->setUnique(); |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 if (innerEditorElement()) | 441 if (innerEditorElement()) |
| 440 innerEditorElement()->setScrollTop(newTop); | 442 innerEditorElement()->setScrollTop(newTop); |
| 441 } | 443 } |
| 442 | 444 |
| 443 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const | 445 HTMLInputElement* LayoutTextControlSingleLine::inputElement() const |
| 444 { | 446 { |
| 445 return toHTMLInputElement(node()); | 447 return toHTMLInputElement(node()); |
| 446 } | 448 } |
| 447 | 449 |
| 448 } | 450 } |
| OLD | NEW |