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

Side by Side Diff: third_party/WebKit/Source/core/css/resolver/FontBuilder.cpp

Issue 2282413002: Replaced PassRefPtr copies with moves in Source/core. (Closed)
Patch Set: rebased Created 4 years, 3 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
4 * Copyright (C) 2013 Google Inc. All rights reserved. 4 * Copyright (C) 2013 Google Inc. All rights reserved.
5 * Copyright (C) 2015 Collabora Ltd. All rights reserved. 5 * Copyright (C) 2015 Collabora Ltd. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 { 138 {
139 set(PropertySetFlag::Stretch); 139 set(PropertySetFlag::Stretch);
140 140
141 m_fontDescription.setStretch(fontStretch); 141 m_fontDescription.setStretch(fontStretch);
142 } 142 }
143 143
144 void FontBuilder::setLocale(PassRefPtr<const LayoutLocale> locale) 144 void FontBuilder::setLocale(PassRefPtr<const LayoutLocale> locale)
145 { 145 {
146 set(PropertySetFlag::Locale); 146 set(PropertySetFlag::Locale);
147 147
148 m_fontDescription.setLocale(locale); 148 m_fontDescription.setLocale(std::move(locale));
149 } 149 }
150 150
151 void FontBuilder::setStyle(FontStyle italic) 151 void FontBuilder::setStyle(FontStyle italic)
152 { 152 {
153 set(PropertySetFlag::Style); 153 set(PropertySetFlag::Style);
154 154
155 m_fontDescription.setStyle(italic); 155 m_fontDescription.setStyle(italic);
156 } 156 }
157 157
158 void FontBuilder::setVariantCaps(FontDescription::FontVariantCaps caps) 158 void FontBuilder::setVariantCaps(FontDescription::FontVariantCaps caps)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 { 194 {
195 set(PropertySetFlag::FontSmoothing); 195 set(PropertySetFlag::FontSmoothing);
196 196
197 m_fontDescription.setFontSmoothing(foontSmoothingMode); 197 m_fontDescription.setFontSmoothing(foontSmoothingMode);
198 } 198 }
199 199
200 void FontBuilder::setFeatureSettings(PassRefPtr<FontFeatureSettings> settings) 200 void FontBuilder::setFeatureSettings(PassRefPtr<FontFeatureSettings> settings)
201 { 201 {
202 set(PropertySetFlag::FeatureSettings); 202 set(PropertySetFlag::FeatureSettings);
203 203
204 m_fontDescription.setFeatureSettings(settings); 204 m_fontDescription.setFeatureSettings(std::move(settings));
205 } 205 }
206 206
207 void FontBuilder::setFamilyDescription(FontDescription& fontDescription, const F ontDescription::FamilyDescription& familyDescription) 207 void FontBuilder::setFamilyDescription(FontDescription& fontDescription, const F ontDescription::FamilyDescription& familyDescription)
208 { 208 {
209 set(PropertySetFlag::Family); 209 set(PropertySetFlag::Family);
210 210
211 bool isInitial = familyDescription.genericFamily == FontDescription::Standar dFamily && familyDescription.family.familyIsEmpty(); 211 bool isInitial = familyDescription.genericFamily == FontDescription::Standar dFamily && familyDescription.family.familyIsEmpty();
212 212
213 fontDescription.setGenericFamily(familyDescription.genericFamily); 213 fontDescription.setGenericFamily(familyDescription.genericFamily);
214 fontDescription.setFamily(isInitial ? standardFontFamily() : familyDescripti on.family); 214 fontDescription.setFamily(isInitial ? standardFontFamily() : familyDescripti on.family);
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 setSize(fontDescription, FontDescription::Size(FontSize::initialKeywordSize( ), 0.0f, false)); 405 setSize(fontDescription, FontDescription::Size(FontSize::initialKeywordSize( ), 0.0f, false));
406 updateSpecifiedSize(fontDescription, documentStyle); 406 updateSpecifiedSize(fontDescription, documentStyle);
407 updateComputedSize(fontDescription, documentStyle); 407 updateComputedSize(fontDescription, documentStyle);
408 408
409 updateOrientation(fontDescription, documentStyle); 409 updateOrientation(fontDescription, documentStyle);
410 documentStyle.setFontDescription(fontDescription); 410 documentStyle.setFontDescription(fontDescription);
411 documentStyle.font().update(fontSelector); 411 documentStyle.font().update(fontSelector);
412 } 412 }
413 413
414 } // namespace blink 414 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/invalidation/InvalidationSet.h ('k') | third_party/WebKit/Source/core/dom/DOMArrayBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698