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

Side by Side Diff: third_party/WebKit/Source/platform/Length.cpp

Issue 2306293002: Replaced PassRefPtr copies with moves in Source/platform. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/PODArena.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller ( mueller@kde.org ) 4 * (C) 2001 Dirk Mueller ( mueller@kde.org )
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net) 6 * Copyright (C) 2006 Andrew Wellington (proton@wiretapped.net)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 { 88 {
89 DEFINE_STATIC_LOCAL(CalculationValueHandleMap, handleMap, ()); 89 DEFINE_STATIC_LOCAL(CalculationValueHandleMap, handleMap, ());
90 return handleMap; 90 return handleMap;
91 } 91 }
92 92
93 Length::Length(PassRefPtr<CalculationValue> calc) 93 Length::Length(PassRefPtr<CalculationValue> calc)
94 : m_quirk(false) 94 : m_quirk(false)
95 , m_type(Calculated) 95 , m_type(Calculated)
96 , m_isFloat(false) 96 , m_isFloat(false)
97 { 97 {
98 m_intValue = calcHandles().insert(calc); 98 m_intValue = calcHandles().insert(std::move(calc));
99 } 99 }
100 100
101 Length Length::blendMixedTypes(const Length& from, double progress, ValueRange r ange) const 101 Length Length::blendMixedTypes(const Length& from, double progress, ValueRange r ange) const
102 { 102 {
103 ASSERT(from.isSpecified()); 103 ASSERT(from.isSpecified());
104 ASSERT(isSpecified()); 104 ASSERT(isSpecified());
105 PixelsAndPercent fromPixelsAndPercent = from.getPixelsAndPercent(); 105 PixelsAndPercent fromPixelsAndPercent = from.getPixelsAndPercent();
106 PixelsAndPercent toPixelsAndPercent = getPixelsAndPercent(); 106 PixelsAndPercent toPixelsAndPercent = getPixelsAndPercent();
107 const float pixels = blink::blend(fromPixelsAndPercent.pixels, toPixelsAndPe rcent.pixels, progress); 107 const float pixels = blink::blend(fromPixelsAndPercent.pixels, toPixelsAndPe rcent.pixels, progress);
108 const float percent = blink::blend(fromPixelsAndPercent.percent, toPixelsAnd Percent.percent, progress); 108 const float percent = blink::blend(fromPixelsAndPercent.percent, toPixelsAnd Percent.percent, progress);
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 return isCalculated() && (&getCalculationValue() == &o.getCalculationValue() || getCalculationValue() == o.getCalculationValue()); 183 return isCalculated() && (&getCalculationValue() == &o.getCalculationValue() || getCalculationValue() == o.getCalculationValue());
184 } 184 }
185 185
186 struct SameSizeAsLength { 186 struct SameSizeAsLength {
187 int32_t value; 187 int32_t value;
188 int32_t metaData; 188 int32_t metaData;
189 }; 189 };
190 static_assert(sizeof(Length) == sizeof(SameSizeAsLength), "length should stay sm all"); 190 static_assert(sizeof(Length) == sizeof(SameSizeAsLength), "length should stay sm all");
191 191
192 } // namespace blink 192 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/PODArena.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698