| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2006 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
| 3 * Copyright (C) 2006 Apple Computer Inc. | 3 * Copyright (C) 2006 Apple Computer 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 LayoutSVGInline : public LayoutInline { | 28 class LayoutSVGInline : public LayoutInline { |
| 29 public: | 29 public: |
| 30 explicit LayoutSVGInline(Element*); | 30 explicit LayoutSVGInline(Element*); |
| 31 | 31 |
| 32 const char* name() const override { return "LayoutSVGInline"; } | 32 const char* name() const override { return "LayoutSVGInline"; } |
| 33 PaintLayerType layerTypeRequired() const final { return NoPaintLayer; } | 33 PaintLayerType layerTypeRequired() const final { return NoPaintLayer; } |
| 34 bool isOfType(LayoutObjectType type) const override { | 34 bool isOfType(LayoutObjectType type) const override { |
| 35 return type == LayoutObjectSVG || type == LayoutObjectSVGInline || | 35 return type == LayoutObjectSVG || type == LayoutObjectSVGInline || |
| 36 LayoutInline::isOfType(type); | 36 LayoutInline::isOfType(type); |
| 37 } | 37 } |
| 38 char objectSize() const override { return sizeof(this); } |
| 38 | 39 |
| 39 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; | 40 bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; |
| 40 | 41 |
| 41 // Chapter 10.4 of the SVG Specification say that we should use the | 42 // Chapter 10.4 of the SVG Specification say that we should use the |
| 42 // object bounding box of the parent text element. | 43 // object bounding box of the parent text element. |
| 43 // We search for the root text element and take its bounding box. | 44 // We search for the root text element and take its bounding box. |
| 44 // It is also necessary to take the stroke and visual rect of this element, | 45 // It is also necessary to take the stroke and visual rect of this element, |
| 45 // since we need it for filters. | 46 // since we need it for filters. |
| 46 FloatRect objectBoundingBox() const final; | 47 FloatRect objectBoundingBox() const final; |
| 47 FloatRect strokeBoundingBox() const final; | 48 FloatRect strokeBoundingBox() const final; |
| (...skipping 19 matching lines...) Expand all Loading... |
| 67 | 68 |
| 68 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) final; | 69 void addChild(LayoutObject* child, LayoutObject* beforeChild = nullptr) final; |
| 69 void removeChild(LayoutObject*) final; | 70 void removeChild(LayoutObject*) final; |
| 70 }; | 71 }; |
| 71 | 72 |
| 72 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInline, isSVGInline()); | 73 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGInline, isSVGInline()); |
| 73 | 74 |
| 74 } // namespace blink | 75 } // namespace blink |
| 75 | 76 |
| 76 #endif // LayoutSVGInline_H | 77 #endif // LayoutSVGInline_H |
| OLD | NEW |