diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-13 15:05:36 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-14 10:33:47 +0000 |
commit | e684a3455bcc29a6e3e66a004e352dea4e1141e7 (patch) | |
tree | d55b4003bde34d7d05f558f02cfd82b2a66a7aac /chromium/third_party/blink/renderer/core/style/shape_value.h | |
parent | 2b94bfe47ccb6c08047959d1c26e392919550e86 (diff) | |
download | qtwebengine-chromium-e684a3455bcc29a6e3e66a004e352dea4e1141e7.tar.gz |
BASELINE: Update Chromium to 72.0.3626.110 and Ninja to 1.9.0
Change-Id: Ic57220b00ecc929a893c91f5cc552f5d3e99e922
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/third_party/blink/renderer/core/style/shape_value.h')
-rw-r--r-- | chromium/third_party/blink/renderer/core/style/shape_value.h | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/chromium/third_party/blink/renderer/core/style/shape_value.h b/chromium/third_party/blink/renderer/core/style/shape_value.h index c89b50f5cf0..8a7253e3205 100644 --- a/chromium/third_party/blink/renderer/core/style/shape_value.h +++ b/chromium/third_party/blink/renderer/core/style/shape_value.h @@ -49,22 +49,29 @@ class ShapeValue final : public GarbageCollectedFinalized<ShapeValue> { static ShapeValue* CreateShapeValue(scoped_refptr<BasicShape> shape, CSSBoxType css_box) { - return new ShapeValue(std::move(shape), css_box); + return MakeGarbageCollected<ShapeValue>(std::move(shape), css_box); } static ShapeValue* CreateBoxShapeValue(CSSBoxType css_box) { - return new ShapeValue(css_box); + return MakeGarbageCollected<ShapeValue>(css_box); } static ShapeValue* CreateImageValue(StyleImage* image) { - return new ShapeValue(image); + return MakeGarbageCollected<ShapeValue>(image); } + ShapeValue(scoped_refptr<BasicShape> shape, CSSBoxType css_box) + : type_(kShape), shape_(std::move(shape)), css_box_(css_box) {} + ShapeValue(ShapeValueType type) + : type_(type), css_box_(CSSBoxType::kMissing) {} + ShapeValue(StyleImage* image) + : type_(kImage), image_(image), css_box_(CSSBoxType::kContent) {} + ShapeValue(CSSBoxType css_box) : type_(kBox), css_box_(css_box) {} + ShapeValueType GetType() const { return type_; } BasicShape* Shape() const { return shape_.get(); } StyleImage* GetImage() const { return image_.Get(); } - bool IsImageValid() const; void SetImage(StyleImage* image) { DCHECK_EQ(GetType(), kImage); if (image_ != image) @@ -77,14 +84,6 @@ class ShapeValue final : public GarbageCollectedFinalized<ShapeValue> { virtual void Trace(blink::Visitor* visitor) { visitor->Trace(image_); } private: - ShapeValue(scoped_refptr<BasicShape> shape, CSSBoxType css_box) - : type_(kShape), shape_(std::move(shape)), css_box_(css_box) {} - ShapeValue(ShapeValueType type) - : type_(type), css_box_(CSSBoxType::kMissing) {} - ShapeValue(StyleImage* image) - : type_(kImage), image_(image), css_box_(CSSBoxType::kContent) {} - ShapeValue(CSSBoxType css_box) : type_(kBox), css_box_(css_box) {} - ShapeValueType type_; scoped_refptr<BasicShape> shape_; Member<StyleImage> image_; |