| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, Inc. |
| 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 |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
| 18 */ | 18 */ |
| 19 | 19 |
| 20 #ifndef LayoutSVGBlock_h | 20 #ifndef LayoutSVGBlock_h |
| 21 #define LayoutSVGBlock_h | 21 #define LayoutSVGBlock_h |
| 22 | 22 |
| 23 #include "core/layout/LayoutBlockFlow.h" | 23 #include "core/layout/LayoutBlockFlow.h" |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 | 26 |
| 27 class SVGElement; | 27 class SVGElement; |
| 28 | 28 |
| 29 // A common class of SVG objects that delegate layout, paint, etc. tasks to |
| 30 // LayoutBlockFlow. It has two coordinate spaces: |
| 31 // - local SVG coordinate space: similar to LayoutSVGModelObject, the space |
| 32 // that localSVGTransform() applies. |
| 33 // - local HTML coordinate space: defined by frameRect() as if the local SVG |
| 34 // coordinate space created a containing block. Like other LayoutBlockFlow |
| 35 // objects, LayoutSVGBlock's frameRect() is also in physical coordinates with |
| 36 // flipped blocks direction in the "containing block". |
| 29 class LayoutSVGBlock : public LayoutBlockFlow { | 37 class LayoutSVGBlock : public LayoutBlockFlow { |
| 30 public: | 38 public: |
| 31 explicit LayoutSVGBlock(SVGElement*); | 39 explicit LayoutSVGBlock(SVGElement*); |
| 32 | 40 |
| 41 // These mapping functions map coordinates in HTML spaces. |
| 33 void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, | 42 void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, |
| 34 TransformState&, | 43 TransformState&, |
| 35 MapCoordinatesFlags = ApplyContainerFlip) const final; | 44 MapCoordinatesFlags = ApplyContainerFlip) const final; |
| 36 void mapAncestorToLocal(const LayoutBoxModelObject* ancestor, | 45 void mapAncestorToLocal(const LayoutBoxModelObject* ancestor, |
| 37 TransformState&, | 46 TransformState&, |
| 38 MapCoordinatesFlags = ApplyContainerFlip) const final; | 47 MapCoordinatesFlags = ApplyContainerFlip) const final; |
| 39 const LayoutObject* pushMappingToContainer( | 48 const LayoutObject* pushMappingToContainer( |
| 40 const LayoutBoxModelObject* ancestorToStopAt, | 49 const LayoutBoxModelObject* ancestorToStopAt, |
| 41 LayoutGeometryMap&) const final; | 50 LayoutGeometryMap&) const final; |
| 42 | 51 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 HitTestAction) override; | 83 HitTestAction) override; |
| 75 | 84 |
| 76 // The inherited version doesn't check for SVG effects. | 85 // The inherited version doesn't check for SVG effects. |
| 77 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const override { | 86 bool paintedOutputOfObjectHasNoEffectRegardlessOfSize() const override { |
| 78 return false; | 87 return false; |
| 79 } | 88 } |
| 80 }; | 89 }; |
| 81 | 90 |
| 82 } // namespace blink | 91 } // namespace blink |
| 83 #endif // LayoutSVGBlock_h | 92 #endif // LayoutSVGBlock_h |
| OLD | NEW |