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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 SVGLayoutSupport::mapLocalToAncestor(this, ancestor, transformState, flags); | 91 SVGLayoutSupport::mapLocalToAncestor(this, ancestor, transformState, flags); |
92 } | 92 } |
93 | 93 |
94 const LayoutObject* LayoutSVGInline::pushMappingToContainer( | 94 const LayoutObject* LayoutSVGInline::pushMappingToContainer( |
95 const LayoutBoxModelObject* ancestorToStopAt, | 95 const LayoutBoxModelObject* ancestorToStopAt, |
96 LayoutGeometryMap& geometryMap) const { | 96 LayoutGeometryMap& geometryMap) const { |
97 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, | 97 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, |
98 geometryMap); | 98 geometryMap); |
99 } | 99 } |
100 | 100 |
101 void LayoutSVGInline::absoluteQuads(Vector<FloatQuad>& quads) const { | 101 void LayoutSVGInline::absoluteQuads(Vector<FloatQuad>& quads, |
| 102 MapCoordinatesFlags mode) const { |
102 const LayoutSVGText* textRoot = | 103 const LayoutSVGText* textRoot = |
103 LayoutSVGText::locateLayoutSVGTextAncestor(this); | 104 LayoutSVGText::locateLayoutSVGTextAncestor(this); |
104 if (!textRoot) | 105 if (!textRoot) |
105 return; | 106 return; |
106 | 107 |
107 FloatRect textBoundingBox = textRoot->strokeBoundingBox(); | 108 FloatRect textBoundingBox = textRoot->strokeBoundingBox(); |
108 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) | 109 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) { |
109 quads.append( | 110 quads.append( |
110 localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x().toFloat(), | 111 localToAbsoluteQuad(FloatRect(textBoundingBox.x() + box->x().toFloat(), |
111 textBoundingBox.y() + box->y().toFloat(), | 112 textBoundingBox.y() + box->y().toFloat(), |
112 box->logicalWidth().toFloat(), | 113 box->logicalWidth().toFloat(), |
113 box->logicalHeight().toFloat()), | 114 box->logicalHeight().toFloat()), |
114 false)); | 115 mode)); |
| 116 } |
115 } | 117 } |
116 | 118 |
117 void LayoutSVGInline::willBeDestroyed() { | 119 void LayoutSVGInline::willBeDestroyed() { |
118 SVGResourcesCache::clientDestroyed(this); | 120 SVGResourcesCache::clientDestroyed(this); |
119 LayoutInline::willBeDestroyed(); | 121 LayoutInline::willBeDestroyed(); |
120 } | 122 } |
121 | 123 |
122 void LayoutSVGInline::styleDidChange(StyleDifference diff, | 124 void LayoutSVGInline::styleDidChange(StyleDifference diff, |
123 const ComputedStyle* oldStyle) { | 125 const ComputedStyle* oldStyle) { |
124 if (diff.needsFullLayout()) | 126 if (diff.needsFullLayout()) |
(...skipping 23 matching lines...) Expand all Loading... |
148 | 150 |
149 void LayoutSVGInline::invalidateTreeIfNeeded( | 151 void LayoutSVGInline::invalidateTreeIfNeeded( |
150 const PaintInvalidationState& paintInvalidationState) { | 152 const PaintInvalidationState& paintInvalidationState) { |
151 // TODO(wangxianzhu): Verify if the inherited | 153 // TODO(wangxianzhu): Verify if the inherited |
152 // LayoutBoxModelObject::invalidateTreeIfNeeded() is applicable here. | 154 // LayoutBoxModelObject::invalidateTreeIfNeeded() is applicable here. |
153 // If yes, remove this overriding method. | 155 // If yes, remove this overriding method. |
154 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); | 156 LayoutObject::invalidateTreeIfNeeded(paintInvalidationState); |
155 } | 157 } |
156 | 158 |
157 } // namespace blink | 159 } // namespace blink |
OLD | NEW |