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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 338 |
339 text_block_style->SetOverflowX(EOverflow::kScroll); | 339 text_block_style->SetOverflowX(EOverflow::kScroll); |
340 // overflow-y:visible doesn't work because overflow-x:scroll makes a layer. | 340 // overflow-y:visible doesn't work because overflow-x:scroll makes a layer. |
341 text_block_style->SetOverflowY(EOverflow::kScroll); | 341 text_block_style->SetOverflowY(EOverflow::kScroll); |
342 RefPtr<ComputedStyle> no_scrollbar_style = ComputedStyle::Create(); | 342 RefPtr<ComputedStyle> no_scrollbar_style = ComputedStyle::Create(); |
343 no_scrollbar_style->SetStyleType(kPseudoIdScrollbar); | 343 no_scrollbar_style->SetStyleType(kPseudoIdScrollbar); |
344 no_scrollbar_style->SetDisplay(EDisplay::kNone); | 344 no_scrollbar_style->SetDisplay(EDisplay::kNone); |
345 text_block_style->AddCachedPseudoStyle(no_scrollbar_style); | 345 text_block_style->AddCachedPseudoStyle(no_scrollbar_style); |
346 text_block_style->SetHasPseudoStyle(kPseudoIdScrollbar); | 346 text_block_style->SetHasPseudoStyle(kPseudoIdScrollbar); |
347 | 347 |
348 return text_block_style.Release(); | 348 return text_block_style; |
349 } | 349 } |
350 | 350 |
351 bool LayoutTextControlSingleLine::TextShouldBeTruncated() const { | 351 bool LayoutTextControlSingleLine::TextShouldBeTruncated() const { |
352 return GetDocument().FocusedElement() != GetNode() && | 352 return GetDocument().FocusedElement() != GetNode() && |
353 StyleRef().TextOverflow() == ETextOverflow::kEllipsis; | 353 StyleRef().TextOverflow() == ETextOverflow::kEllipsis; |
354 } | 354 } |
355 | 355 |
356 void LayoutTextControlSingleLine::Autoscroll(const IntPoint& position) { | 356 void LayoutTextControlSingleLine::Autoscroll(const IntPoint& position) { |
357 LayoutBox* layout_object = InnerEditorElement()->GetLayoutBox(); | 357 LayoutBox* layout_object = InnerEditorElement()->GetLayoutBox(); |
358 if (!layout_object) | 358 if (!layout_object) |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
409 // If the INPUT content height is smaller than the font height, the | 409 // If the INPUT content height is smaller than the font height, the |
410 // inner-editor element overflows the INPUT box intentionally, however it | 410 // inner-editor element overflows the INPUT box intentionally, however it |
411 // shouldn't affect outside of the INPUT box. So we ignore child overflow. | 411 // shouldn't affect outside of the INPUT box. So we ignore child overflow. |
412 } | 412 } |
413 | 413 |
414 HTMLInputElement* LayoutTextControlSingleLine::InputElement() const { | 414 HTMLInputElement* LayoutTextControlSingleLine::InputElement() const { |
415 return toHTMLInputElement(GetNode()); | 415 return toHTMLInputElement(GetNode()); |
416 } | 416 } |
417 | 417 |
418 } // namespace blink | 418 } // namespace blink |
OLD | NEW |