| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * Copyright (C) 2006 Apple Computer, Inc. | 2  * Copyright (C) 2006 Apple Computer, Inc. | 
| 3  * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3  * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 
| 4  * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 4  * Copyright (C) Research In Motion Limited 2010-2012. All rights reserved. | 
| 5  * | 5  * | 
| 6  * This library is free software; you can redistribute it and/or | 6  * This library is free software; you can redistribute it and/or | 
| 7  * modify it under the terms of the GNU Library General Public | 7  * modify it under the terms of the GNU Library General Public | 
| 8  * License as published by the Free Software Foundation; either | 8  * License as published by the Free Software Foundation; either | 
| 9  * version 2 of the License, or (at your option) any later version. | 9  * version 2 of the License, or (at your option) any later version. | 
| 10  * | 10  * | 
| 11  * This library is distributed in the hope that it will be useful, | 11  * This library is distributed in the hope that it will be useful, | 
| 12  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12  * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
| 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
| 14  * Library General Public License for more details. | 14  * Library General Public License for more details. | 
| 15  * | 15  * | 
| 16  * You should have received a copy of the GNU Library General Public License | 16  * You should have received a copy of the GNU Library General Public License | 
| 17  * along with this library; see the file COPYING.LIB.  If not, write to | 17  * along with this library; see the file COPYING.LIB.  If not, write to | 
| 18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 
| 19  * Boston, MA 02110-1301, USA. | 19  * Boston, MA 02110-1301, USA. | 
| 20  */ | 20  */ | 
| 21 | 21 | 
| 22 #ifndef LayoutSVGText_h | 22 #ifndef LayoutSVGText_h | 
| 23 #define LayoutSVGText_h | 23 #define LayoutSVGText_h | 
| 24 | 24 | 
| 25 #include "core/layout/svg/LayoutSVGBlock.h" | 25 #include "core/layout/svg/LayoutSVGBlock.h" | 
| 26 #include "platform/transforms/AffineTransform.h" |  | 
| 27 | 26 | 
| 28 namespace blink { | 27 namespace blink { | 
| 29 | 28 | 
| 30 class LayoutSVGInlineText; | 29 class LayoutSVGInlineText; | 
| 31 class SVGTextElement; | 30 class SVGTextElement; | 
| 32 class SVGTextLayoutAttributes; |  | 
| 33 | 31 | 
| 34 class LayoutSVGText final : public LayoutSVGBlock { | 32 class LayoutSVGText final : public LayoutSVGBlock { | 
| 35 public: | 33 public: | 
| 36     explicit LayoutSVGText(SVGTextElement*); | 34     explicit LayoutSVGText(SVGTextElement*); | 
| 37     ~LayoutSVGText() override; | 35     ~LayoutSVGText() override; | 
| 38 | 36 | 
| 39     bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; | 37     bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override; | 
| 40 | 38 | 
| 41     void setNeedsPositioningValuesUpdate() { m_needsPositioningValuesUpdate = tr
    ue; } | 39     void setNeedsPositioningValuesUpdate() { m_needsPositioningValuesUpdate = tr
    ue; } | 
| 42     void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; } | 40     void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; } | 
| 43     void setNeedsTextMetricsUpdate() { m_needsTextMetricsUpdate = true; } | 41     void setNeedsTextMetricsUpdate() { m_needsTextMetricsUpdate = true; } | 
| 44     FloatRect paintInvalidationRectInLocalSVGCoordinates() const override; | 42     FloatRect paintInvalidationRectInLocalSVGCoordinates() const override; | 
| 45     FloatRect objectBoundingBox() const override { return FloatRect(frameRect())
    ; } | 43     FloatRect objectBoundingBox() const override { return FloatRect(frameRect())
    ; } | 
| 46     FloatRect strokeBoundingBox() const override; | 44     FloatRect strokeBoundingBox() const override; | 
| 47     bool isObjectBoundingBoxValid() const; | 45     bool isObjectBoundingBoxValid() const; | 
| 48 | 46 | 
| 49     static LayoutSVGText* locateLayoutSVGTextAncestor(LayoutObject*); | 47     static LayoutSVGText* locateLayoutSVGTextAncestor(LayoutObject*); | 
| 50     static const LayoutSVGText* locateLayoutSVGTextAncestor(const LayoutObject*)
    ; | 48     static const LayoutSVGText* locateLayoutSVGTextAncestor(const LayoutObject*)
    ; | 
| 51 | 49 | 
| 52     bool needsReordering() const { return m_needsReordering; } | 50     bool needsReordering() const { return m_needsReordering; } | 
| 53     Vector<SVGTextLayoutAttributes*>& layoutAttributes() { return m_layoutAttrib
    utes; } | 51     const Vector<LayoutSVGInlineText*>& descendantTextNodes() const { return m_d
    escendantTextNodes; } | 
| 54 | 52 | 
| 55     void subtreeChildWasAdded(); | 53     void subtreeChildWasAdded(); | 
| 56     void subtreeChildWillBeRemoved(); | 54     void subtreeChildWillBeRemoved(); | 
| 57     void subtreeTextDidChange(); | 55     void subtreeTextDidChange(); | 
| 58 | 56 | 
| 59     const AffineTransform& localToSVGParentTransform() const override { return m
    _localTransform; } | 57     const AffineTransform& localToSVGParentTransform() const override { return m
    _localTransform; } | 
| 60 | 58 | 
| 61     const char* name() const override { return "LayoutSVGText"; } | 59     const char* name() const override { return "LayoutSVGText"; } | 
| 62 | 60 | 
| 63 private: | 61 private: | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
| 78     void invalidateTreeIfNeeded(const PaintInvalidationState&) override; | 76     void invalidateTreeIfNeeded(const PaintInvalidationState&) override; | 
| 79 | 77 | 
| 80     RootInlineBox* createRootInlineBox() override; | 78     RootInlineBox* createRootInlineBox() override; | 
| 81 | 79 | 
| 82     void invalidatePositioningValues(LayoutInvalidationReasonForTracing); | 80     void invalidatePositioningValues(LayoutInvalidationReasonForTracing); | 
| 83 | 81 | 
| 84     bool m_needsReordering : 1; | 82     bool m_needsReordering : 1; | 
| 85     bool m_needsPositioningValuesUpdate : 1; | 83     bool m_needsPositioningValuesUpdate : 1; | 
| 86     bool m_needsTransformUpdate : 1; | 84     bool m_needsTransformUpdate : 1; | 
| 87     bool m_needsTextMetricsUpdate : 1; | 85     bool m_needsTextMetricsUpdate : 1; | 
| 88     Vector<SVGTextLayoutAttributes*> m_layoutAttributes; | 86     Vector<LayoutSVGInlineText*> m_descendantTextNodes; | 
| 89 }; | 87 }; | 
| 90 | 88 | 
| 91 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGText, isSVGText()); | 89 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutSVGText, isSVGText()); | 
| 92 | 90 | 
| 93 } // namespace blink | 91 } // namespace blink | 
| 94 | 92 | 
| 95 #endif | 93 #endif | 
| OLD | NEW | 
|---|