| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 class SVGElement; | 27 class SVGElement; |
| 28 | 28 |
| 29 // This class is for containers which are never drawn, but do need to support | 29 // This class is for containers which are never drawn, but do need to support |
| 30 // style <defs>, <linearGradient>, <radialGradient> are all good examples | 30 // style <defs>, <linearGradient>, <radialGradient> are all good examples |
| 31 class LayoutSVGHiddenContainer : public LayoutSVGContainer { | 31 class LayoutSVGHiddenContainer : public LayoutSVGContainer { |
| 32 public: | 32 public: |
| 33 explicit LayoutSVGHiddenContainer(SVGElement*); | 33 explicit LayoutSVGHiddenContainer(SVGElement*); |
| 34 | 34 |
| 35 const char* name() const override { return "LayoutSVGHiddenContainer"; } | 35 const char* name() const override { return "LayoutSVGHiddenContainer"; } |
| 36 | 36 |
| 37 // DisplayItemClient implementation. |
| 38 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const final { |
| 39 // LayoutSVGHiddenContainer paints nothing. |
| 40 return true; |
| 41 } |
| 42 |
| 37 protected: | 43 protected: |
| 38 void layout() override; | 44 void layout() override; |
| 39 | 45 |
| 40 bool isOfType(LayoutObjectType type) const override { | 46 bool isOfType(LayoutObjectType type) const override { |
| 41 return type == LayoutObjectSVGHiddenContainer || | 47 return type == LayoutObjectSVGHiddenContainer || |
| 42 LayoutSVGContainer::isOfType(type); | 48 LayoutSVGContainer::isOfType(type); |
| 43 } | 49 } |
| 44 | 50 |
| 45 private: | 51 private: |
| 46 // LayoutSVGHiddenContainer paints nothing. | |
| 47 void paint(const PaintInfo&, const LayoutPoint&) const final {} | 52 void paint(const PaintInfo&, const LayoutPoint&) const final {} |
| 48 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const final { | |
| 49 return true; | |
| 50 } | |
| 51 LayoutRect absoluteVisualRect() const final { return LayoutRect(); } | 53 LayoutRect absoluteVisualRect() const final { return LayoutRect(); } |
| 52 FloatRect visualRectInLocalSVGCoordinates() const final { | 54 FloatRect visualRectInLocalSVGCoordinates() const final { |
| 53 return FloatRect(); | 55 return FloatRect(); |
| 54 } | 56 } |
| 55 void absoluteQuads(Vector<FloatQuad>&, | 57 void absoluteQuads(Vector<FloatQuad>&, |
| 56 MapCoordinatesFlags mode = 0) const final {} | 58 MapCoordinatesFlags mode = 0) const final {} |
| 57 | 59 |
| 58 bool nodeAtFloatPoint(HitTestResult&, | 60 bool nodeAtFloatPoint(HitTestResult&, |
| 59 const FloatPoint& pointInParent, | 61 const FloatPoint& pointInParent, |
| 60 HitTestAction) final; | 62 HitTestAction) final; |
| 61 }; | 63 }; |
| 62 } // namespace blink | 64 } // namespace blink |
| 63 | 65 |
| 64 #endif // LayoutSVGHiddenContainer_h | 66 #endif // LayoutSVGHiddenContainer_h |
| OLD | NEW |