| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 } | 89 } |
| 90 | 90 |
| 91 PassRefPtr<ComputedStyle> LayoutTextControlMultiLine::CreateInnerEditorStyle( | 91 PassRefPtr<ComputedStyle> LayoutTextControlMultiLine::CreateInnerEditorStyle( |
| 92 const ComputedStyle& start_style) const { | 92 const ComputedStyle& start_style) const { |
| 93 RefPtr<ComputedStyle> text_block_style = ComputedStyle::Create(); | 93 RefPtr<ComputedStyle> text_block_style = ComputedStyle::Create(); |
| 94 text_block_style->InheritFrom(start_style); | 94 text_block_style->InheritFrom(start_style); |
| 95 AdjustInnerEditorStyle(*text_block_style); | 95 AdjustInnerEditorStyle(*text_block_style); |
| 96 text_block_style->SetDisplay(EDisplay::kBlock); | 96 text_block_style->SetDisplay(EDisplay::kBlock); |
| 97 text_block_style->SetUnique(); | 97 text_block_style->SetUnique(); |
| 98 | 98 |
| 99 return text_block_style.Release(); | 99 return text_block_style; |
| 100 } | 100 } |
| 101 | 101 |
| 102 LayoutObject* LayoutTextControlMultiLine::LayoutSpecialExcludedChild( | 102 LayoutObject* LayoutTextControlMultiLine::LayoutSpecialExcludedChild( |
| 103 bool relayout_children, | 103 bool relayout_children, |
| 104 SubtreeLayoutScope& layout_scope) { | 104 SubtreeLayoutScope& layout_scope) { |
| 105 LayoutObject* placeholder_layout_object = | 105 LayoutObject* placeholder_layout_object = |
| 106 LayoutTextControl::LayoutSpecialExcludedChild(relayout_children, | 106 LayoutTextControl::LayoutSpecialExcludedChild(relayout_children, |
| 107 layout_scope); | 107 layout_scope); |
| 108 if (!placeholder_layout_object) | 108 if (!placeholder_layout_object) |
| 109 return nullptr; | 109 return nullptr; |
| 110 if (!placeholder_layout_object->IsBox()) | 110 if (!placeholder_layout_object->IsBox()) |
| 111 return placeholder_layout_object; | 111 return placeholder_layout_object; |
| 112 LayoutBox* placeholder_box = ToLayoutBox(placeholder_layout_object); | 112 LayoutBox* placeholder_box = ToLayoutBox(placeholder_layout_object); |
| 113 placeholder_box->MutableStyleRef().SetLogicalWidth(Length( | 113 placeholder_box->MutableStyleRef().SetLogicalWidth(Length( |
| 114 ContentLogicalWidth() - placeholder_box->BorderAndPaddingLogicalWidth(), | 114 ContentLogicalWidth() - placeholder_box->BorderAndPaddingLogicalWidth(), |
| 115 kFixed)); | 115 kFixed)); |
| 116 placeholder_box->LayoutIfNeeded(); | 116 placeholder_box->LayoutIfNeeded(); |
| 117 placeholder_box->SetX(BorderLeft() + PaddingLeft()); | 117 placeholder_box->SetX(BorderLeft() + PaddingLeft()); |
| 118 placeholder_box->SetY(BorderTop() + PaddingTop()); | 118 placeholder_box->SetY(BorderTop() + PaddingTop()); |
| 119 return placeholder_layout_object; | 119 return placeholder_layout_object; |
| 120 } | 120 } |
| 121 | 121 |
| 122 } // namespace blink | 122 } // namespace blink |
| OLD | NEW |