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 Inc. All rights reserved. | 3 * Copyright (C) 2006 Apple Inc. All rights reserved. |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010. 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 * |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 InlineFlowBox* LayoutSVGInline::createInlineFlowBox() | 57 InlineFlowBox* LayoutSVGInline::createInlineFlowBox() |
58 { | 58 { |
59 InlineFlowBox* box = new SVGInlineFlowBox(*this); | 59 InlineFlowBox* box = new SVGInlineFlowBox(*this); |
60 box->setHasVirtualLogicalHeight(); | 60 box->setHasVirtualLogicalHeight(); |
61 return box; | 61 return box; |
62 } | 62 } |
63 | 63 |
64 FloatRect LayoutSVGInline::objectBoundingBox() const | 64 FloatRect LayoutSVGInline::objectBoundingBox() const |
65 { | 65 { |
66 if (const LayoutObject* object = LayoutSVGText::locateLayoutSVGTextAncestor(
this)) | 66 if (const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncest
or(this)) |
67 return object->objectBoundingBox(); | 67 return textRoot->objectBoundingBox(); |
68 | 68 |
69 return FloatRect(); | 69 return FloatRect(); |
70 } | 70 } |
71 | 71 |
72 FloatRect LayoutSVGInline::strokeBoundingBox() const | 72 FloatRect LayoutSVGInline::strokeBoundingBox() const |
73 { | 73 { |
74 if (const LayoutObject* object = LayoutSVGText::locateLayoutSVGTextAncestor(
this)) | 74 if (const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncest
or(this)) |
75 return object->strokeBoundingBox(); | 75 return textRoot->strokeBoundingBox(); |
76 | 76 |
77 return FloatRect(); | 77 return FloatRect(); |
78 } | 78 } |
79 | 79 |
80 FloatRect LayoutSVGInline::paintInvalidationRectInLocalCoordinates() const | 80 FloatRect LayoutSVGInline::paintInvalidationRectInLocalCoordinates() const |
81 { | 81 { |
82 if (const LayoutObject* object = LayoutSVGText::locateLayoutSVGTextAncestor(
this)) | 82 if (const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncest
or(this)) |
83 return object->paintInvalidationRectInLocalCoordinates(); | 83 return textRoot->paintInvalidationRectInLocalCoordinates(); |
84 | 84 |
85 return FloatRect(); | 85 return FloatRect(); |
86 } | 86 } |
87 | 87 |
88 LayoutRect LayoutSVGInline::clippedOverflowRectForPaintInvalidation(const Layout
BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI
nvalidationState) const | 88 LayoutRect LayoutSVGInline::clippedOverflowRectForPaintInvalidation(const Layout
BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI
nvalidationState) const |
89 { | 89 { |
90 return SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(*this, pain
tInvalidationContainer, paintInvalidationState); | 90 return SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(*this, pain
tInvalidationContainer, paintInvalidationState); |
91 } | 91 } |
92 | 92 |
93 void LayoutSVGInline::mapLocalToContainer(const LayoutBoxModelObject* paintInval
idationContainer, TransformState& transformState, MapCoordinatesFlags, bool* was
Fixed, const PaintInvalidationState* paintInvalidationState) const | 93 void LayoutSVGInline::mapLocalToContainer(const LayoutBoxModelObject* paintInval
idationContainer, TransformState& transformState, MapCoordinatesFlags, bool* was
Fixed, const PaintInvalidationState* paintInvalidationState) const |
94 { | 94 { |
95 SVGLayoutSupport::mapLocalToContainer(this, paintInvalidationContainer, tran
sformState, wasFixed, paintInvalidationState); | 95 SVGLayoutSupport::mapLocalToContainer(this, paintInvalidationContainer, tran
sformState, wasFixed, paintInvalidationState); |
96 } | 96 } |
97 | 97 |
98 const LayoutObject* LayoutSVGInline::pushMappingToContainer(const LayoutBoxModel
Object* ancestorToStopAt, LayoutGeometryMap& geometryMap) const | 98 const LayoutObject* LayoutSVGInline::pushMappingToContainer(const LayoutBoxModel
Object* ancestorToStopAt, LayoutGeometryMap& geometryMap) const |
99 { | 99 { |
100 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); | 100 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); |
101 } | 101 } |
102 | 102 |
103 void LayoutSVGInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) co
nst | 103 void LayoutSVGInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) co
nst |
104 { | 104 { |
105 const LayoutObject* object = LayoutSVGText::locateLayoutSVGTextAncestor(this
); | 105 const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncestor(t
his); |
106 if (!object) | 106 if (!textRoot) |
107 return; | 107 return; |
108 | 108 |
109 FloatRect textBoundingBox = object->strokeBoundingBox(); | 109 FloatRect textBoundingBox = textRoot->strokeBoundingBox(); |
110 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) | 110 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) |
111 quads.append(localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x(
).toFloat(), textBoundingBox.y() + box->y().toFloat(), box->logicalWidth().toFlo
at(), box->logicalHeight().toFloat()), false, wasFixed)); | 111 quads.append(localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x(
).toFloat(), textBoundingBox.y() + box->y().toFloat(), box->logicalWidth().toFlo
at(), box->logicalHeight().toFloat()), false, wasFixed)); |
112 } | 112 } |
113 | 113 |
114 void LayoutSVGInline::willBeDestroyed() | 114 void LayoutSVGInline::willBeDestroyed() |
115 { | 115 { |
116 SVGResourcesCache::clientDestroyed(this); | 116 SVGResourcesCache::clientDestroyed(this); |
117 LayoutInline::willBeDestroyed(); | 117 LayoutInline::willBeDestroyed(); |
118 } | 118 } |
119 | 119 |
(...skipping 24 matching lines...) Expand all Loading... |
144 LayoutInline::removeChild(child); | 144 LayoutInline::removeChild(child); |
145 return; | 145 return; |
146 } | 146 } |
147 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; | 147 Vector<SVGTextLayoutAttributes*, 2> affectedAttributes; |
148 textLayoutObject->subtreeChildWillBeRemoved(child, affectedAttributes); | 148 textLayoutObject->subtreeChildWillBeRemoved(child, affectedAttributes); |
149 LayoutInline::removeChild(child); | 149 LayoutInline::removeChild(child); |
150 textLayoutObject->subtreeChildWasRemoved(affectedAttributes); | 150 textLayoutObject->subtreeChildWasRemoved(affectedAttributes); |
151 } | 151 } |
152 | 152 |
153 } | 153 } |
OLD | NEW |