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

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

Issue 2566403003: Migrate WTF::Vector::append() to ::push_back() [part 3 of N] (Closed)
Patch Set: Created 4 years 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 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 if (!stop.isHint() && resolveStopColor(*stop.m_color, object).hasAlpha()) 629 if (!stop.isHint() && resolveStopColor(*stop.m_color, object).hasAlpha())
630 return false; 630 return false;
631 } 631 }
632 return true; 632 return true;
633 } 633 }
634 634
635 void CSSGradientValue::getStopColors(Vector<Color>& stopColors, 635 void CSSGradientValue::getStopColors(Vector<Color>& stopColors,
636 const LayoutObject& object) const { 636 const LayoutObject& object) const {
637 for (auto& stop : m_stops) { 637 for (auto& stop : m_stops) {
638 if (!stop.isHint()) 638 if (!stop.isHint())
639 stopColors.append(resolveStopColor(*stop.m_color, object)); 639 stopColors.push_back(resolveStopColor(*stop.m_color, object));
640 } 640 }
641 } 641 }
642 642
643 DEFINE_TRACE_AFTER_DISPATCH(CSSGradientValue) { 643 DEFINE_TRACE_AFTER_DISPATCH(CSSGradientValue) {
644 visitor->trace(m_firstX); 644 visitor->trace(m_firstX);
645 visitor->trace(m_firstY); 645 visitor->trace(m_firstY);
646 visitor->trace(m_secondX); 646 visitor->trace(m_secondX);
647 visitor->trace(m_secondY); 647 visitor->trace(m_secondY);
648 visitor->trace(m_stops); 648 visitor->trace(m_stops);
649 CSSImageGeneratorValue::traceAfterDispatch(visitor); 649 CSSImageGeneratorValue::traceAfterDispatch(visitor);
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after
1317 visitor->trace(m_firstRadius); 1317 visitor->trace(m_firstRadius);
1318 visitor->trace(m_secondRadius); 1318 visitor->trace(m_secondRadius);
1319 visitor->trace(m_shape); 1319 visitor->trace(m_shape);
1320 visitor->trace(m_sizingBehavior); 1320 visitor->trace(m_sizingBehavior);
1321 visitor->trace(m_endHorizontalSize); 1321 visitor->trace(m_endHorizontalSize);
1322 visitor->trace(m_endVerticalSize); 1322 visitor->trace(m_endVerticalSize);
1323 CSSGradientValue::traceAfterDispatch(visitor); 1323 CSSGradientValue::traceAfterDispatch(visitor);
1324 } 1324 }
1325 1325
1326 } // namespace blink 1326 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.h ('k') | third_party/WebKit/Source/core/css/CSSImageSetValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698