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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp

Issue 1906363002: CSSGradientValue::getStopColors(): unnecessary use of HeapVector<>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index f3ae1e1bebb7a8e0e5f1384b9881684b69ae08ab..317ebcc6364dedd83c438fbd57147953a5a9c031 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -144,9 +144,9 @@ HeapVector<Member<Element>> elementsFromRect(LayoutRect rect, Document& document
}
// Blends the colors from the given gradient with the existing colors.
-void blendWithColorsFromGradient(CSSGradientValue* gradient, HeapVector<Color>& colors, bool& foundNonTransparentColor, bool& foundOpaqueColor, const LayoutObject& layoutObject)
+void blendWithColorsFromGradient(CSSGradientValue* gradient, Vector<Color>& colors, bool& foundNonTransparentColor, bool& foundOpaqueColor, const LayoutObject& layoutObject)
{
- HeapVector<Color> stopColors;
+ Vector<Color> stopColors;
gradient->getStopColors(stopColors, layoutObject);
if (colors.isEmpty()) {
@@ -169,7 +169,7 @@ void blendWithColorsFromGradient(CSSGradientValue* gradient, HeapVector<Color>&
}
// Gets the colors from an image style, if one exists and it is a gradient.
-void addColorsFromImageStyle(const ComputedStyle& style, HeapVector<Color>& colors, bool& foundOpaqueColor, bool& foundNonTransparentColor, const LayoutObject& layoutObject)
+void addColorsFromImageStyle(const ComputedStyle& style, Vector<Color>& colors, bool& foundOpaqueColor, bool& foundNonTransparentColor, const LayoutObject& layoutObject)
{
const FillLayer& backgroundLayers = style.backgroundLayers();
if (!backgroundLayers.hasImage())
@@ -200,7 +200,7 @@ void addColorsFromImageStyle(const ComputedStyle& style, HeapVector<Color>& colo
// walking up all the elements returned by a hit test (but not going beyond
// |topElement|) covering the area of the rect, and blending their background
// colors.
-bool getColorsFromRect(LayoutRect rect, Document& document, Element* topElement, HeapVector<Color>& colors)
+bool getColorsFromRect(LayoutRect rect, Document& document, Element* topElement, Vector<Color>& colors)
{
HeapVector<Member<Element>> elementsUnderRect = elementsFromRect(rect, document);
@@ -2030,7 +2030,7 @@ void InspectorCSSAgent::getBackgroundColors(ErrorString* errorString, int nodeId
if (textBounds.size().isEmpty())
return;
- HeapVector<Color> colors;
+ Vector<Color> colors;
FrameView* view = element->document().view();
if (!view) {
*errorString = "No view.";
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSGradientValue.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698