| 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 * |
| 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 #include "core/layout/svg/LayoutSVGInline.h" | 22 #include "core/layout/svg/LayoutSVGInline.h" |
| 23 | 23 |
| 24 #include "core/layout/LayoutView.h" |
| 24 #include "core/layout/svg/LayoutSVGText.h" | 25 #include "core/layout/svg/LayoutSVGText.h" |
| 25 #include "core/layout/svg/SVGLayoutSupport.h" | 26 #include "core/layout/svg/SVGLayoutSupport.h" |
| 26 #include "core/layout/svg/SVGResourcesCache.h" | 27 #include "core/layout/svg/SVGResourcesCache.h" |
| 27 #include "core/layout/svg/line/SVGInlineFlowBox.h" | 28 #include "core/layout/svg/line/SVGInlineFlowBox.h" |
| 28 #include "core/svg/SVGAElement.h" | 29 #include "core/svg/SVGAElement.h" |
| 29 | 30 |
| 30 namespace blink { | 31 namespace blink { |
| 31 | 32 |
| 32 bool LayoutSVGInline::isChildAllowed(LayoutObject* child, const ComputedStyle& s
tyle) const | 33 bool LayoutSVGInline::isChildAllowed(LayoutObject* child, const ComputedStyle& s
tyle) const |
| 33 { | 34 { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 } | 77 } |
| 77 | 78 |
| 78 FloatRect LayoutSVGInline::paintInvalidationRectInLocalSVGCoordinates() const | 79 FloatRect LayoutSVGInline::paintInvalidationRectInLocalSVGCoordinates() const |
| 79 { | 80 { |
| 80 if (const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncest
or(this)) | 81 if (const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncest
or(this)) |
| 81 return textRoot->paintInvalidationRectInLocalSVGCoordinates(); | 82 return textRoot->paintInvalidationRectInLocalSVGCoordinates(); |
| 82 | 83 |
| 83 return FloatRect(); | 84 return FloatRect(); |
| 84 } | 85 } |
| 85 | 86 |
| 86 LayoutRect LayoutSVGInline::clippedOverflowRectForPaintInvalidation(const Layout
BoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintI
nvalidationState) const | 87 LayoutRect LayoutSVGInline::absoluteClippedOverflowRect() const |
| 87 { | 88 { |
| 88 return SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(*this, pain
tInvalidationContainer, paintInvalidationState); | 89 return SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(*this, *vie
w()); |
| 89 } | 90 } |
| 90 | 91 |
| 91 void LayoutSVGInline::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, T
ransformState& transformState, MapCoordinatesFlags, bool* wasFixed, const PaintI
nvalidationState* paintInvalidationState) const | 92 void LayoutSVGInline::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, T
ransformState& transformState, MapCoordinatesFlags, bool* wasFixed) const |
| 92 { | 93 { |
| 93 SVGLayoutSupport::mapLocalToAncestor(this, ancestor, transformState, wasFixe
d, paintInvalidationState); | 94 SVGLayoutSupport::mapLocalToAncestor(this, ancestor, transformState, wasFixe
d); |
| 94 } | 95 } |
| 95 | 96 |
| 96 const LayoutObject* LayoutSVGInline::pushMappingToContainer(const LayoutBoxModel
Object* ancestorToStopAt, LayoutGeometryMap& geometryMap) const | 97 const LayoutObject* LayoutSVGInline::pushMappingToContainer(const LayoutBoxModel
Object* ancestorToStopAt, LayoutGeometryMap& geometryMap) const |
| 97 { | 98 { |
| 98 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); | 99 return SVGLayoutSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); |
| 99 } | 100 } |
| 100 | 101 |
| 101 void LayoutSVGInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) co
nst | 102 void LayoutSVGInline::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixed) co
nst |
| 102 { | 103 { |
| 103 const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncestor(t
his); | 104 const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncestor(t
his); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); | 159 PaintInvalidationState newPaintInvalidationState(paintInvalidationState, *th
is); |
| 159 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); | 160 PaintInvalidationReason reason = invalidatePaintIfNeeded(newPaintInvalidatio
nState); |
| 160 clearPaintInvalidationFlags(newPaintInvalidationState); | 161 clearPaintInvalidationFlags(newPaintInvalidationState); |
| 161 | 162 |
| 162 if (reason == PaintInvalidationDelayedFull) | 163 if (reason == PaintInvalidationDelayedFull) |
| 163 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); | 164 paintInvalidationState.pushDelayedPaintInvalidationTarget(*this); |
| 164 | 165 |
| 165 if (reason == PaintInvalidationSVGResourceChange) | 166 if (reason == PaintInvalidationSVGResourceChange) |
| 166 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); | 167 newPaintInvalidationState.setForceSubtreeInvalidationWithinContainer(); |
| 167 | 168 |
| 168 newPaintInvalidationState.updatePaintOffsetAndClipForChildren(); | 169 newPaintInvalidationState.updateForChildren(); |
| 169 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); | 170 invalidatePaintOfSubtreesIfNeeded(newPaintInvalidationState); |
| 170 } | 171 } |
| 171 | 172 |
| 172 } // namespace blink | 173 } // namespace blink |
| OLD | NEW |