| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007 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 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectTextControl || LayoutBlockFlow::isOfType(type); } | 75 bool isOfType(LayoutObjectType type) const override { return type == LayoutO
bjectTextControl || LayoutBlockFlow::isOfType(type); } |
| 76 | 76 |
| 77 private: | 77 private: |
| 78 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit&
maxLogicalWidth) const final; | 78 void computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit&
maxLogicalWidth) const final; |
| 79 void computePreferredLogicalWidths() final; | 79 void computePreferredLogicalWidths() final; |
| 80 void removeLeftoverAnonymousBlock(LayoutBlock*) final { } | 80 void removeLeftoverAnonymousBlock(LayoutBlock*) final { } |
| 81 bool avoidsFloats() const final { return true; } | 81 bool avoidsFloats() const final { return true; } |
| 82 | 82 |
| 83 void addChild(LayoutObject* newChild, LayoutObject* beforeChild = nullptr) f
inal; | 83 void addChild(LayoutObject* newChild, LayoutObject* beforeChild = nullptr) f
inal; |
| 84 | 84 |
| 85 void addFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& additionalOff
set) const final; | 85 void addOutlineRects(Vector<LayoutRect>&, const LayoutPoint& additionalOffse
t) const final; |
| 86 | 86 |
| 87 bool canBeProgramaticallyScrolled() const final { return true; } | 87 bool canBeProgramaticallyScrolled() const final { return true; } |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTextControl, isTextControl()); | 90 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutTextControl, isTextControl()); |
| 91 | 91 |
| 92 // LayoutObject for our inner container, for <search> and others. | 92 // LayoutObject for our inner container, for <search> and others. |
| 93 // We can't use LayoutFlexibleBox directly, because flexboxes have a different | 93 // We can't use LayoutFlexibleBox directly, because flexboxes have a different |
| 94 // baseline definition, and then inputs of different types wouldn't line up | 94 // baseline definition, and then inputs of different types wouldn't line up |
| 95 // anymore. | 95 // anymore. |
| 96 class LayoutTextControlInnerContainer final : public LayoutFlexibleBox { | 96 class LayoutTextControlInnerContainer final : public LayoutFlexibleBox { |
| 97 public: | 97 public: |
| 98 explicit LayoutTextControlInnerContainer(Element* element) | 98 explicit LayoutTextControlInnerContainer(Element* element) |
| 99 : LayoutFlexibleBox(element) | 99 : LayoutFlexibleBox(element) |
| 100 { } | 100 { } |
| 101 ~LayoutTextControlInnerContainer() override { } | 101 ~LayoutTextControlInnerContainer() override { } |
| 102 | 102 |
| 103 int baselinePosition(FontBaseline baseline, bool firstLine, LineDirectionMod
e direction, LinePositionMode position) const override | 103 int baselinePosition(FontBaseline baseline, bool firstLine, LineDirectionMod
e direction, LinePositionMode position) const override |
| 104 { | 104 { |
| 105 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos
ition); | 105 return LayoutBlock::baselinePosition(baseline, firstLine, direction, pos
ition); |
| 106 } | 106 } |
| 107 int firstLineBoxBaseline() const override { return LayoutBlock::firstLineBox
Baseline(); } | 107 int firstLineBoxBaseline() const override { return LayoutBlock::firstLineBox
Baseline(); } |
| 108 int inlineBlockBaseline(LineDirectionMode direction) const override { return
lastLineBoxBaseline(direction); } | 108 int inlineBlockBaseline(LineDirectionMode direction) const override { return
lastLineBoxBaseline(direction); } |
| 109 }; | 109 }; |
| 110 | 110 |
| 111 | 111 |
| 112 } // namespace blink | 112 } // namespace blink |
| 113 | 113 |
| 114 #endif // LayoutTextControl_h | 114 #endif // LayoutTextControl_h |
| OLD | NEW |