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

Side by Side Diff: third_party/WebKit/Source/web/LinkHighlightImpl.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 std::unique_ptr<CompositorFloatAnimationCurve> curve = 307 std::unique_ptr<CompositorFloatAnimationCurve> curve =
308 CompositorFloatAnimationCurve::create(); 308 CompositorFloatAnimationCurve::create();
309 309
310 const auto& timingFunction = *CubicBezierTimingFunction::preset( 310 const auto& timingFunction = *CubicBezierTimingFunction::preset(
311 CubicBezierTimingFunction::EaseType::EASE); 311 CubicBezierTimingFunction::EaseType::EASE);
312 312
313 curve->addKeyframe(CompositorFloatKeyframe(0, startOpacity, timingFunction)); 313 curve->addKeyframe(CompositorFloatKeyframe(0, startOpacity, timingFunction));
314 // Make sure we have displayed for at least minPreFadeDuration before starting 314 // Make sure we have displayed for at least minPreFadeDuration before starting
315 // to fade out. 315 // to fade out.
316 float extraDurationRequired = std::max( 316 float extraDurationRequired = std::max(
317 0.f, minPreFadeDuration - 317 0.f,
318 static_cast<float>(monotonicallyIncreasingTime() - m_startTime)); 318 minPreFadeDuration -
319 static_cast<float>(monotonicallyIncreasingTime() - m_startTime));
319 if (extraDurationRequired) 320 if (extraDurationRequired)
320 curve->addKeyframe(CompositorFloatKeyframe(extraDurationRequired, 321 curve->addKeyframe(CompositorFloatKeyframe(extraDurationRequired,
321 startOpacity, timingFunction)); 322 startOpacity, timingFunction));
322 // For layout tests we don't fade out. 323 // For layout tests we don't fade out.
323 curve->addKeyframe(CompositorFloatKeyframe( 324 curve->addKeyframe(CompositorFloatKeyframe(
324 fadeDuration + extraDurationRequired, layoutTestMode() ? startOpacity : 0, 325 fadeDuration + extraDurationRequired, layoutTestMode() ? startOpacity : 0,
325 timingFunction)); 326 timingFunction));
326 327
327 std::unique_ptr<CompositorAnimation> animation = CompositorAnimation::create( 328 std::unique_ptr<CompositorAnimation> animation = CompositorAnimation::create(
328 *curve, CompositorTargetProperty::OPACITY, 0, 0); 329 *curve, CompositorTargetProperty::OPACITY, 0, 0);
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 402
402 WebLayer* LinkHighlightImpl::layer() { 403 WebLayer* LinkHighlightImpl::layer() {
403 return clipLayer(); 404 return clipLayer();
404 } 405 }
405 406
406 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const { 407 CompositorAnimationPlayer* LinkHighlightImpl::compositorPlayer() const {
407 return m_compositorPlayer.get(); 408 return m_compositorPlayer.get();
408 } 409 }
409 410
410 } // namespace blink 411 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/InspectorOverlay.cpp ('k') | third_party/WebKit/Source/web/SpeechRecognitionClientProxy.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698