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

Side by Side Diff: third_party/WebKit/Source/platform/text/BidiResolver.h

Issue 2909613002: Replaced usage of RefPtr::Release with std::move wraps. (Closed)
Patch Set: Created 3 years, 6 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved. 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008 Apple Inc. All right reserved.
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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 direction = WTF::Unicode::kRightToLeft; 160 direction = WTF::Unicode::kRightToLeft;
161 } else { 161 } else {
162 level = NextGreaterEvenLevel(level); 162 level = NextGreaterEvenLevel(level);
163 direction = WTF::Unicode::kLeftToRight; 163 direction = WTF::Unicode::kLeftToRight;
164 } 164 }
165 RefPtr<BidiContext> context = 165 RefPtr<BidiContext> context =
166 BidiContext::Create(level, direction, is_override, kFromStyleOrDOM); 166 BidiContext::Create(level, direction, is_override, kFromStyleOrDOM);
167 167
168 // This copies BidiStatus and may churn the ref on BidiContext. 168 // This copies BidiStatus and may churn the ref on BidiContext.
169 // I doubt it matters. 169 // I doubt it matters.
170 return BidiStatus(direction, direction, direction, context.Release()); 170 return BidiStatus(direction, direction, direction, std::move(context));
171 } 171 }
172 172
173 WTF::Unicode::CharDirection eor; 173 WTF::Unicode::CharDirection eor;
174 WTF::Unicode::CharDirection last_strong; 174 WTF::Unicode::CharDirection last_strong;
175 WTF::Unicode::CharDirection last; 175 WTF::Unicode::CharDirection last;
176 RefPtr<BidiContext> context; 176 RefPtr<BidiContext> context;
177 }; 177 };
178 178
179 class BidiEmbedding final { 179 class BidiEmbedding final {
180 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW(); 180 DISALLOW_NEW_EXCEPT_PLACEMENT_NEW();
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 template <class Iterator, class Run, class IsolatedRun> 1225 template <class Iterator, class Run, class IsolatedRun>
1226 MidpointState<Iterator> 1226 MidpointState<Iterator>
1227 BidiResolver<Iterator, Run, IsolatedRun>::MidpointStateForIsolatedRun( 1227 BidiResolver<Iterator, Run, IsolatedRun>::MidpointStateForIsolatedRun(
1228 Run& run) { 1228 Run& run) {
1229 return midpoint_state_for_isolated_run_.Take(&run); 1229 return midpoint_state_for_isolated_run_.Take(&run);
1230 } 1230 }
1231 1231
1232 } // namespace blink 1232 } // namespace blink
1233 1233
1234 #endif // BidiResolver_h 1234 #endif // BidiResolver_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698