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. | 3 * (C) 2008 Torch Mobile Inc. All rights reserved. |
4 * (http://www.torchmobile.com/) | 4 * (http://www.torchmobile.com/) |
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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 return LayoutBox::baselinePosition(baselineType, firstLine, direction, | 86 return LayoutBox::baselinePosition(baselineType, firstLine, direction, |
87 linePositionMode); | 87 linePositionMode); |
88 } | 88 } |
89 | 89 |
90 PassRefPtr<ComputedStyle> LayoutTextControlMultiLine::createInnerEditorStyle( | 90 PassRefPtr<ComputedStyle> LayoutTextControlMultiLine::createInnerEditorStyle( |
91 const ComputedStyle& startStyle) const { | 91 const ComputedStyle& startStyle) const { |
92 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); | 92 RefPtr<ComputedStyle> textBlockStyle = ComputedStyle::create(); |
93 textBlockStyle->inheritFrom(startStyle); | 93 textBlockStyle->inheritFrom(startStyle); |
94 adjustInnerEditorStyle(*textBlockStyle); | 94 adjustInnerEditorStyle(*textBlockStyle); |
95 textBlockStyle->setDisplay(EDisplay::Block); | 95 textBlockStyle->setDisplay(EDisplay::Block); |
96 textBlockStyle->setUnique(); | 96 textBlockStyle->setUnique(true); |
97 | 97 |
98 return textBlockStyle.release(); | 98 return textBlockStyle.release(); |
99 } | 99 } |
100 | 100 |
101 LayoutObject* LayoutTextControlMultiLine::layoutSpecialExcludedChild( | 101 LayoutObject* LayoutTextControlMultiLine::layoutSpecialExcludedChild( |
102 bool relayoutChildren, | 102 bool relayoutChildren, |
103 SubtreeLayoutScope& layoutScope) { | 103 SubtreeLayoutScope& layoutScope) { |
104 LayoutObject* placeholderLayoutObject = | 104 LayoutObject* placeholderLayoutObject = |
105 LayoutTextControl::layoutSpecialExcludedChild(relayoutChildren, | 105 LayoutTextControl::layoutSpecialExcludedChild(relayoutChildren, |
106 layoutScope); | 106 layoutScope); |
107 if (!placeholderLayoutObject) | 107 if (!placeholderLayoutObject) |
108 return nullptr; | 108 return nullptr; |
109 if (!placeholderLayoutObject->isBox()) | 109 if (!placeholderLayoutObject->isBox()) |
110 return placeholderLayoutObject; | 110 return placeholderLayoutObject; |
111 LayoutBox* placeholderBox = toLayoutBox(placeholderLayoutObject); | 111 LayoutBox* placeholderBox = toLayoutBox(placeholderLayoutObject); |
112 placeholderBox->mutableStyleRef().setLogicalWidth(Length( | 112 placeholderBox->mutableStyleRef().setLogicalWidth(Length( |
113 contentLogicalWidth() - placeholderBox->borderAndPaddingLogicalWidth(), | 113 contentLogicalWidth() - placeholderBox->borderAndPaddingLogicalWidth(), |
114 Fixed)); | 114 Fixed)); |
115 placeholderBox->layoutIfNeeded(); | 115 placeholderBox->layoutIfNeeded(); |
116 placeholderBox->setX(borderLeft() + paddingLeft()); | 116 placeholderBox->setX(borderLeft() + paddingLeft()); |
117 placeholderBox->setY(borderTop() + paddingTop()); | 117 placeholderBox->setY(borderTop() + paddingTop()); |
118 return placeholderLayoutObject; | 118 return placeholderLayoutObject; |
119 } | 119 } |
120 | 120 |
121 } // namespace blink | 121 } // namespace blink |
OLD | NEW |