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

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

Issue 2847303002: Remove unnecessary zoom argument from GetImage() as its value is always available through the Layou… (Closed)
Patch Set: (rebased) Created 3 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/css/CSSPaintValue.h" 5 #include "core/css/CSSPaintValue.h"
6 6
7 #include "core/css/CSSCustomIdentValue.h" 7 #include "core/css/CSSCustomIdentValue.h"
8 #include "core/css/CSSSyntaxDescriptor.h" 8 #include "core/css/CSSSyntaxDescriptor.h"
9 #include "core/css/cssom/StyleValueFactory.h" 9 #include "core/css/cssom/StyleValueFactory.h"
10 #include "core/layout/LayoutObject.h" 10 #include "core/layout/LayoutObject.h"
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 result.Append(')'); 37 result.Append(')');
38 return result.ToString(); 38 return result.ToString();
39 } 39 }
40 40
41 String CSSPaintValue::GetName() const { 41 String CSSPaintValue::GetName() const {
42 return name_->Value(); 42 return name_->Value();
43 } 43 }
44 44
45 PassRefPtr<Image> CSSPaintValue::GetImage(const LayoutObject& layout_object, 45 PassRefPtr<Image> CSSPaintValue::GetImage(const LayoutObject& layout_object,
46 const IntSize& size, 46 const IntSize& size) {
47 float zoom) {
48 if (!generator_) 47 if (!generator_)
49 generator_ = 48 generator_ =
50 CSSPaintImageGenerator::Create(GetName(), layout_object.GetDocument(), 49 CSSPaintImageGenerator::Create(GetName(), layout_object.GetDocument(),
51 paint_image_generator_observer_); 50 paint_image_generator_observer_);
52 51
53 if (!ParseInputArguments()) 52 if (!ParseInputArguments())
54 return nullptr; 53 return nullptr;
55 54
56 return generator_->Paint(layout_object, size, zoom, parsed_input_arguments_); 55 return generator_->Paint(layout_object, size, parsed_input_arguments_);
57 } 56 }
58 57
59 bool CSSPaintValue::ParseInputArguments() { 58 bool CSSPaintValue::ParseInputArguments() {
60 if (input_arguments_invalid_) 59 if (input_arguments_invalid_)
61 return false; 60 return false;
62 61
63 if (parsed_input_arguments_ || 62 if (parsed_input_arguments_ ||
64 !RuntimeEnabledFeatures::cssPaintAPIArgumentsEnabled()) 63 !RuntimeEnabledFeatures::cssPaintAPIArgumentsEnabled())
65 return true; 64 return true;
66 65
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 111
113 DEFINE_TRACE_AFTER_DISPATCH(CSSPaintValue) { 112 DEFINE_TRACE_AFTER_DISPATCH(CSSPaintValue) {
114 visitor->Trace(name_); 113 visitor->Trace(name_);
115 visitor->Trace(generator_); 114 visitor->Trace(generator_);
116 visitor->Trace(paint_image_generator_observer_); 115 visitor->Trace(paint_image_generator_observer_);
117 visitor->Trace(parsed_input_arguments_); 116 visitor->Trace(parsed_input_arguments_);
118 CSSImageGeneratorValue::TraceAfterDispatch(visitor); 117 CSSImageGeneratorValue::TraceAfterDispatch(visitor);
119 } 118 }
120 119
121 } // namespace blink 120 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSPaintValue.h ('k') | third_party/WebKit/Source/core/layout/LayoutImageResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698