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

Side by Side Diff: Source/core/platform/animation/TimingFunction.h

Issue 47623002: Fix more warnings on linux (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests. Created 7 years, 1 month 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 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 6 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 { 267 {
268 double max = m_segments.isEmpty() ? 0 : m_segments.last().max(); 268 double max = m_segments.isEmpty() ? 0 : m_segments.last().max();
269 ASSERT(upperBound > max); 269 ASSERT(upperBound > max);
270 m_segments.append(Segment(max, upperBound, timingFunction)); 270 m_segments.append(Segment(max, upperBound, timingFunction));
271 } 271 }
272 virtual double evaluate(double fraction, double accuracy) const 272 virtual double evaluate(double fraction, double accuracy) const
273 { 273 {
274 RELEASE_ASSERT_WITH_MESSAGE(fraction >= 0 && fraction <= 1, "Web Animati ons not yet implemented: Timing function behavior outside the range [0, 1] is no t yet specified"); 274 RELEASE_ASSERT_WITH_MESSAGE(fraction >= 0 && fraction <= 1, "Web Animati ons not yet implemented: Timing function behavior outside the range [0, 1] is no t yet specified");
275 ASSERT(!m_segments.isEmpty()); 275 ASSERT(!m_segments.isEmpty());
276 ASSERT(m_segments.last().max() == 1); 276 ASSERT(m_segments.last().max() == 1);
277 const Segment* segment; 277 const Segment* segment = 0;
Inactive 2013/10/29 13:56:20 Maybe we could rewrite this so that it looks less
278 for (size_t i = 0; i < m_segments.size(); ++i) { 278 for (size_t i = 0; i < m_segments.size(); ++i) {
279 segment = &m_segments[i]; 279 segment = &m_segments[i];
280 if (fraction < segment->max()) 280 if (fraction < segment->max())
281 break; 281 break;
282 } 282 }
283 return segment->evaluate(fraction, accuracy); 283 return segment->evaluate(fraction, accuracy);
284 } 284 }
285 285
286 virtual bool operator==(const TimingFunction& other) const 286 virtual bool operator==(const TimingFunction& other) const
287 { 287 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 { 319 {
320 ASSERT(RuntimeEnabledFeatures::webAnimationsEnabled()); 320 ASSERT(RuntimeEnabledFeatures::webAnimationsEnabled());
321 } 321 }
322 322
323 Vector<Segment> m_segments; 323 Vector<Segment> m_segments;
324 }; 324 };
325 325
326 } // namespace WebCore 326 } // namespace WebCore
327 327
328 #endif // TimingFunction_h 328 #endif // TimingFunction_h
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/platform/graphics/chromium/ImageDecodingStore.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698