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

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

Issue 2940933003: DO NOT SUBMIT results of new clang-format (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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2015 Google Inc. All rights reserved. 3 * Copyright (C) 2015 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 if (y) 78 if (y)
79 result.Append(' '); 79 result.Append(' ');
80 } 80 }
81 81
82 if (y) 82 if (y)
83 result.Append(y->CssText()); 83 result.Append(y->CssText());
84 84
85 return true; 85 return true;
86 } 86 }
87 87
88 } // anonymous ns 88 } // namespace
89 89
90 bool CSSGradientColorStop::IsCacheable() const { 90 bool CSSGradientColorStop::IsCacheable() const {
91 if (!IsHint() && color_->IsIdentifierValue() && 91 if (!IsHint() && color_->IsIdentifierValue() &&
92 ColorIsDerivedFromElement(ToCSSIdentifierValue(*color_))) { 92 ColorIsDerivedFromElement(ToCSSIdentifierValue(*color_))) {
93 return false; 93 return false;
94 } 94 }
95 95
96 return !offset_ || !offset_->IsFontRelativeLength(); 96 return !offset_ || !offset_->IsFontRelativeLength();
97 } 97 }
98 98
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 for (const auto& stop : stops) { 542 for (const auto& stop : stops) {
543 offset = offset_base + stop.offset - stops.front().offset; 543 offset = offset_base + stop.offset - stops.front().offset;
544 clamper.Add(offset, stop.color); 544 clamper.Add(offset, stop.color);
545 545
546 if (offset >= 1) 546 if (offset >= 1)
547 break; 547 break;
548 } 548 }
549 } while (offset < 1); 549 } while (offset < 1);
550 } 550 }
551 551
552 } // anonymous ns 552 } // namespace
553 553
554 void CSSGradientValue::AddStops( 554 void CSSGradientValue::AddStops(
555 CSSGradientValue::GradientDesc& desc, 555 CSSGradientValue::GradientDesc& desc,
556 const CSSToLengthConversionData& conversion_data, 556 const CSSToLengthConversionData& conversion_data,
557 const LayoutObject& object) { 557 const LayoutObject& object) {
558 if (gradient_type_ == kCSSDeprecatedLinearGradient || 558 if (gradient_type_ == kCSSDeprecatedLinearGradient ||
559 gradient_type_ == kCSSDeprecatedRadialGradient) { 559 gradient_type_ == kCSSDeprecatedRadialGradient) {
560 AddDeprecatedStops(desc, object); 560 AddDeprecatedStops(desc, object);
561 return; 561 return;
562 } 562 }
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 } 1536 }
1537 1537
1538 DEFINE_TRACE_AFTER_DISPATCH(CSSConicGradientValue) { 1538 DEFINE_TRACE_AFTER_DISPATCH(CSSConicGradientValue) {
1539 visitor->Trace(x_); 1539 visitor->Trace(x_);
1540 visitor->Trace(y_); 1540 visitor->Trace(y_);
1541 visitor->Trace(from_angle_); 1541 visitor->Trace(from_angle_);
1542 CSSGradientValue::TraceAfterDispatch(visitor); 1542 CSSGradientValue::TraceAfterDispatch(visitor);
1543 } 1543 }
1544 1544
1545 } // namespace blink 1545 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698