OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2009 Apple Inc. All rights reserved. |
3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 3 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 4 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void setScrollLeft(LayoutUnit) final; | 64 void setScrollLeft(LayoutUnit) final; |
65 void setScrollTop(LayoutUnit) final; | 65 void setScrollTop(LayoutUnit) final; |
66 | 66 |
67 int textBlockWidth() const; | 67 int textBlockWidth() const; |
68 float getAvgCharWidth(const AtomicString& family) const final; | 68 float getAvgCharWidth(const AtomicString& family) const final; |
69 LayoutUnit preferredContentLogicalWidth(float charWidth) const final; | 69 LayoutUnit preferredContentLogicalWidth(float charWidth) const final; |
70 LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit non
ContentHeight) const override; | 70 LayoutUnit computeControlLogicalHeight(LayoutUnit lineHeight, LayoutUnit non
ContentHeight) const override; |
71 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) final; | 71 void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) final; |
72 void addOverflowFromChildren() final; | 72 void addOverflowFromChildren() final; |
73 | 73 |
| 74 bool allowsOverflowClip() const override { return false; } |
| 75 |
74 bool textShouldBeTruncated() const; | 76 bool textShouldBeTruncated() const; |
75 HTMLElement* innerSpinButtonElement() const; | 77 HTMLElement* innerSpinButtonElement() const; |
76 | 78 |
77 bool m_shouldDrawCapsLockIndicator; | 79 bool m_shouldDrawCapsLockIndicator; |
78 }; | 80 }; |
79 | 81 |
80 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTextControlSingleLine, isTextField()); | 82 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTextControlSingleLine, isTextField()); |
81 | 83 |
82 // ---------------------------- | 84 // ---------------------------- |
83 | 85 |
84 class LayoutTextControlInnerBlock : public LayoutBlockFlow { | 86 class LayoutTextControlInnerBlock : public LayoutBlockFlow { |
85 public: | 87 public: |
86 LayoutTextControlInnerBlock(Element* element) : LayoutBlockFlow(element) { } | 88 LayoutTextControlInnerBlock(Element* element) : LayoutBlockFlow(element) { } |
87 bool shouldIgnoreOverflowPropertyForInlineBlockBaseline() const override { r
eturn true; } | 89 bool shouldIgnoreOverflowPropertyForInlineBlockBaseline() const override { r
eturn true; } |
88 | 90 |
89 private: | 91 private: |
90 bool isIntrinsicallyScrollable(ScrollbarOrientation orientation) const overr
ide | 92 bool isIntrinsicallyScrollable(ScrollbarOrientation orientation) const overr
ide |
91 { | 93 { |
92 return orientation == HorizontalScrollbar; | 94 return orientation == HorizontalScrollbar; |
93 } | 95 } |
94 bool scrollsOverflowX() const override { return hasOverflowClip(); } | 96 bool scrollsOverflowX() const override { return hasOverflowClip(); } |
95 bool scrollsOverflowY() const override { return false; } | 97 bool scrollsOverflowY() const override { return false; } |
96 bool hasLineIfEmpty() const override { return true; } | 98 bool hasLineIfEmpty() const override { return true; } |
97 }; | 99 }; |
98 | 100 |
99 } // namespace blink | 101 } // namespace blink |
100 | 102 |
101 #endif | 103 #endif |
OLD | NEW |