| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 3 * Copyright (C) 2009 Google, Inc. | 3 * Copyright (C) 2009 Google, Inc. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 class SVGGradientElement; | 28 class SVGGradientElement; |
| 29 class SVGStopElement; | 29 class SVGStopElement; |
| 30 | 30 |
| 31 // This class exists mostly so we can hear about gradient stop style changes | 31 // This class exists mostly so we can hear about gradient stop style changes |
| 32 class RenderSVGGradientStop final : public RenderObject { | 32 class RenderSVGGradientStop final : public RenderObject { |
| 33 public: | 33 public: |
| 34 explicit RenderSVGGradientStop(SVGStopElement*); | 34 explicit RenderSVGGradientStop(SVGStopElement*); |
| 35 virtual ~RenderSVGGradientStop(); | 35 virtual ~RenderSVGGradientStop(); |
| 36 | 36 |
| 37 virtual const char* renderName() const override { return "RenderSVGGradientS
top"; } | 37 virtual const char* renderName() const override { return "RenderSVGGradientS
top"; } |
| 38 virtual bool isSVGGradientStop() const override { return true; } | 38 virtual bool isOfType(RenderObjectType type) const override { return type ==
RenderObjectSVG || type == RenderObjectSVGGradientStop || RenderObject::isOfTyp
e(type); } |
| 39 virtual bool isSVG() const override { return true; } | |
| 40 | 39 |
| 41 virtual void layout() override; | 40 virtual void layout() override; |
| 42 | 41 |
| 43 // This overrides are needed to prevent ASSERTs on <svg><stop /></svg> | 42 // This overrides are needed to prevent ASSERTs on <svg><stop /></svg> |
| 44 // RenderObject's default implementations ASSERT_NOT_REACHED() | 43 // RenderObject's default implementations ASSERT_NOT_REACHED() |
| 45 // https://bugs.webkit.org/show_bug.cgi?id=20400 | 44 // https://bugs.webkit.org/show_bug.cgi?id=20400 |
| 46 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject*, const PaintInvalidationState* = 0) const override { return LayoutR
ect(); } | 45 virtual LayoutRect clippedOverflowRectForPaintInvalidation(const RenderLayer
ModelObject*, const PaintInvalidationState* = 0) const override { return LayoutR
ect(); } |
| 47 virtual FloatRect objectBoundingBox() const override { return FloatRect(); } | 46 virtual FloatRect objectBoundingBox() const override { return FloatRect(); } |
| 48 virtual FloatRect strokeBoundingBox() const override { return FloatRect(); } | 47 virtual FloatRect strokeBoundingBox() const override { return FloatRect(); } |
| 49 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override {
return FloatRect(); } | 48 virtual FloatRect paintInvalidationRectInLocalCoordinates() const override {
return FloatRect(); } |
| 50 | 49 |
| 51 protected: | 50 protected: |
| 52 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; | 51 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle) ov
erride; |
| 53 | 52 |
| 54 private: | 53 private: |
| 55 SVGGradientElement* gradientElement() const; | 54 SVGGradientElement* gradientElement() const; |
| 56 }; | 55 }; |
| 57 | 56 |
| 58 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGGradientStop, isSVGGradientStop()); | 57 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderSVGGradientStop, isSVGGradientStop()); |
| 59 | 58 |
| 60 } | 59 } |
| 61 | 60 |
| 62 #endif // RenderSVGGradientStop_h | 61 #endif // RenderSVGGradientStop_h |
| OLD | NEW |