| 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 319 // line-height. It's not the precise condition because logicalHeight | 319 // line-height. It's not the precise condition because logicalHeight |
| 320 // includes border and padding if box-sizing:border-box, and there are cases | 320 // includes border and padding if box-sizing:border-box, and there are cases |
| 321 // in which we don't want to remove line-height with percent or calculated | 321 // in which we don't want to remove line-height with percent or calculated |
| 322 // length. | 322 // length. |
| 323 // TODO(tkent): This should be done during layout. | 323 // TODO(tkent): This should be done during layout. |
| 324 if (logicalHeight.isPercentOrCalc() || | 324 if (logicalHeight.isPercentOrCalc() || |
| 325 (logicalHeight.isFixed() && | 325 (logicalHeight.isFixed() && |
| 326 logicalHeight.getFloatValue() > computedLineHeight)) | 326 logicalHeight.getFloatValue() > computedLineHeight)) |
| 327 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); | 327 textBlockStyle->setLineHeight(ComputedStyle::initialLineHeight()); |
| 328 | 328 |
| 329 textBlockStyle->setDisplay(EDisplay::Block); | 329 textBlockStyle->setDisplay(EDisplay::kBlock); |
| 330 textBlockStyle->setUnique(); | 330 textBlockStyle->setUnique(); |
| 331 | 331 |
| 332 if (inputElement()->shouldRevealPassword()) | 332 if (inputElement()->shouldRevealPassword()) |
| 333 textBlockStyle->setTextSecurity(TSNONE); | 333 textBlockStyle->setTextSecurity(TSNONE); |
| 334 | 334 |
| 335 textBlockStyle->setOverflowX(EOverflow::kScroll); | 335 textBlockStyle->setOverflowX(EOverflow::kScroll); |
| 336 // overflow-y:visible doesn't work because overflow-x:scroll makes a layer. | 336 // overflow-y:visible doesn't work because overflow-x:scroll makes a layer. |
| 337 textBlockStyle->setOverflowY(EOverflow::kScroll); | 337 textBlockStyle->setOverflowY(EOverflow::kScroll); |
| 338 RefPtr<ComputedStyle> noScrollbarStyle = ComputedStyle::create(); | 338 RefPtr<ComputedStyle> noScrollbarStyle = ComputedStyle::create(); |
| 339 noScrollbarStyle->setStyleType(PseudoIdScrollbar); | 339 noScrollbarStyle->setStyleType(PseudoIdScrollbar); |
| 340 noScrollbarStyle->setDisplay(EDisplay::None); | 340 noScrollbarStyle->setDisplay(EDisplay::kNone); |
| 341 textBlockStyle->addCachedPseudoStyle(noScrollbarStyle); | 341 textBlockStyle->addCachedPseudoStyle(noScrollbarStyle); |
| 342 textBlockStyle->setHasPseudoStyle(PseudoIdScrollbar); | 342 textBlockStyle->setHasPseudoStyle(PseudoIdScrollbar); |
| 343 | 343 |
| 344 return textBlockStyle.release(); | 344 return textBlockStyle.release(); |
| 345 } | 345 } |
| 346 | 346 |
| 347 bool LayoutTextControlSingleLine::textShouldBeTruncated() const { | 347 bool LayoutTextControlSingleLine::textShouldBeTruncated() const { |
| 348 return document().focusedElement() != node() && | 348 return document().focusedElement() != node() && |
| 349 styleRef().getTextOverflow() == TextOverflowEllipsis; | 349 styleRef().getTextOverflow() == TextOverflowEllipsis; |
| 350 } | 350 } |
| (...skipping 54 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 |