Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextControlMultiLine.cpp

Issue 2957513002: Removed calls to RefPtr::Release in return statements with auto move. (Closed)
Patch Set: rebased Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698