| OLD | NEW |
| 1 /** | 1 /** |
| 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> | 2 * Copyright (C) 2007 Rob Buis <buis@kde.org> |
| 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 3 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
| 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> | 4 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 5 * Copyright (C) 2009 Google, Inc. All rights reserved. | 5 * Copyright (C) 2009 Google, Inc. All rights reserved. |
| 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 7 * | 7 * |
| 8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
| 9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
| 10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 public: | 48 public: |
| 49 // Shares child layouting code between RenderSVGRoot/RenderSVG(Hidden)Contai
ner | 49 // Shares child layouting code between RenderSVGRoot/RenderSVG(Hidden)Contai
ner |
| 50 static void layoutChildren(RenderObject*, bool selfNeedsLayout); | 50 static void layoutChildren(RenderObject*, bool selfNeedsLayout); |
| 51 | 51 |
| 52 // Layout resources used by this node. | 52 // Layout resources used by this node. |
| 53 static void layoutResourcesIfNeeded(const RenderObject*); | 53 static void layoutResourcesIfNeeded(const RenderObject*); |
| 54 | 54 |
| 55 // Helper function determining whether overflow is hidden. | 55 // Helper function determining whether overflow is hidden. |
| 56 static bool isOverflowHidden(const RenderObject*); | 56 static bool isOverflowHidden(const RenderObject*); |
| 57 | 57 |
| 58 // Returns true if we're currently within the rendering of a clip-path as a
mask. | |
| 59 static bool isRenderingClipPathAsMaskImage(const RenderObject&); | |
| 60 | |
| 61 // Calculates the paintInvalidationRect in combination with filter, clipper
and masker in local coordinates. | 58 // Calculates the paintInvalidationRect in combination with filter, clipper
and masker in local coordinates. |
| 62 static void intersectPaintInvalidationRectWithResources(const RenderObject*,
FloatRect&); | 59 static void intersectPaintInvalidationRectWithResources(const RenderObject*,
FloatRect&); |
| 63 | 60 |
| 64 // Determines whether a container needs to be laid out because it's filtered
and a child is being laid out. | 61 // Determines whether a container needs to be laid out because it's filtered
and a child is being laid out. |
| 65 static bool filtersForceContainerLayout(RenderObject*); | 62 static bool filtersForceContainerLayout(RenderObject*); |
| 66 | 63 |
| 67 // Determines whether the passed point lies in a clipping area | 64 // Determines whether the passed point lies in a clipping area |
| 68 static bool pointInClippingArea(RenderObject*, const FloatPoint&); | 65 static bool pointInClippingArea(RenderObject*, const FloatPoint&); |
| 69 | 66 |
| 70 // Transform |pointInParent| to |object|'s user-space and check if it is | 67 // Transform |pointInParent| to |object|'s user-space and check if it is |
| 71 // within the clipping area. Returns false if the transform is singular or | 68 // within the clipping area. Returns false if the transform is singular or |
| 72 // the point is outside the clipping area. | 69 // the point is outside the clipping area. |
| 73 static bool transformToUserSpaceAndCheckClipping(RenderObject*, const Affine
Transform& localTransform, const FloatPoint& pointInParent, FloatPoint& localPoi
nt); | 70 static bool transformToUserSpaceAndCheckClipping(RenderObject*, const Affine
Transform& localTransform, const FloatPoint& pointInParent, FloatPoint& localPoi
nt); |
| 74 | 71 |
| 75 static void computeContainerBoundingBoxes(const RenderObject* container, Flo
atRect& objectBoundingBox, bool& objectBoundingBoxValid, FloatRect& strokeBoundi
ngBox, FloatRect& paintInvalidationBoundingBox); | 72 static void computeContainerBoundingBoxes(const RenderObject* container, Flo
atRect& objectBoundingBox, bool& objectBoundingBoxValid, FloatRect& strokeBoundi
ngBox, FloatRect& paintInvalidationBoundingBox); |
| 76 | 73 |
| 77 static bool paintInfoIntersectsPaintInvalidationRect(const FloatRect& localP
aintInvalidationRect, const AffineTransform& localTransform, const PaintInfo&); | 74 static bool paintInfoIntersectsPaintInvalidationRect(const FloatRect& localP
aintInvalidationRect, const AffineTransform& localTransform, const PaintInfo&); |
| 78 | 75 |
| 79 // Important functions used by nearly all SVG renderers centralizing coordin
ate transformations / paint invalidation rect calculations | 76 // Important functions used by nearly all SVG renderers centralizing coordin
ate transformations / paint invalidation rect calculations |
| 80 static LayoutRect clippedOverflowRectForPaintInvalidation(const RenderObject
*, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalida
tionState*); | 77 static LayoutRect clippedOverflowRectForPaintInvalidation(const RenderObject
*, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalida
tionState*); |
| 81 static void computeFloatRectForPaintInvalidation(const RenderObject*, const
RenderLayerModelObject* paintInvalidationContainer, FloatRect&, const PaintInval
idationState*); | 78 static void computeFloatRectForPaintInvalidation(const RenderObject*, const
RenderLayerModelObject* paintInvalidationContainer, FloatRect&, const PaintInval
idationState*); |
| 82 static void mapLocalToContainer(const RenderObject*, const RenderLayerModelO
bject* paintInvalidationContainer, TransformState&, bool* wasFixed = 0, const Pa
intInvalidationState* = 0); | 79 static void mapLocalToContainer(const RenderObject*, const RenderLayerModelO
bject* paintInvalidationContainer, TransformState&, bool* wasFixed = 0, const Pa
intInvalidationState* = 0); |
| 83 static const RenderObject* pushMappingToContainer(const RenderObject*, const
RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&); | 80 static const RenderObject* pushMappingToContainer(const RenderObject*, const
RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap&); |
| 84 | 81 |
| 85 // Shared between SVG renderers and resources. | 82 // Shared between SVG renderers and resources. |
| 86 static void applyStrokeStyleToContext(GraphicsContext*, const RenderStyle*,
const RenderObject*); | 83 static void applyStrokeStyleToContext(GraphicsContext*, const RenderStyle*,
const RenderObject*); |
| 87 static void applyStrokeStyleToStrokeData(StrokeData*, const RenderStyle*, co
nst RenderObject*); | 84 static void applyStrokeStyleToStrokeData(StrokeData*, const RenderStyle*, co
nst RenderObject*); |
| 88 | 85 |
| 89 // Update the GC state (on |stateSaver.context()|) for painting |renderer| | 86 // Update the GC state (on |paintInfo.context|) for painting |renderer| |
| 90 // using |style|. |resourceMode| is used to decide between fill/stroke. | 87 // using |style|. |resourceMode| is used to decide between fill/stroke. |
| 91 // Previous state will be saved (if needed) using |stateSaver|. | 88 // Previous state will be saved (if needed) using |stateSaver|. |
| 92 static bool updateGraphicsContext(GraphicsContextStateSaver&, RenderStyle*,
RenderObject&, RenderSVGResourceMode, const AffineTransform* additionalPaintServ
erTransform = 0); | 89 static bool updateGraphicsContext(const PaintInfo&, GraphicsContextStateSave
r&, RenderStyle*, RenderObject&, RenderSVGResourceMode, const AffineTransform* a
dditionalPaintServerTransform = 0); |
| 93 | 90 |
| 94 // Determines if any ancestor's transform has changed. | 91 // Determines if any ancestor's transform has changed. |
| 95 static bool transformToRootChanged(RenderObject*); | 92 static bool transformToRootChanged(RenderObject*); |
| 96 | 93 |
| 97 // FIXME: These methods do not belong here. | 94 // FIXME: These methods do not belong here. |
| 98 static const RenderSVGRoot* findTreeRootObject(const RenderObject*); | 95 static const RenderSVGRoot* findTreeRootObject(const RenderObject*); |
| 99 | 96 |
| 100 // Helper method for determining if a RenderObject marked as text (isText()=
= true) | 97 // Helper method for determining if a RenderObject marked as text (isText()=
= true) |
| 101 // can/will be rendered as part of a <text>. | 98 // can/will be rendered as part of a <text>. |
| 102 static bool isRenderableTextNode(const RenderObject*); | 99 static bool isRenderableTextNode(const RenderObject*); |
| 103 | 100 |
| 104 private: | 101 private: |
| 105 static void updateObjectBoundingBox(FloatRect& objectBoundingBox, bool& obje
ctBoundingBoxValid, RenderObject* other, FloatRect otherBoundingBox); | 102 static void updateObjectBoundingBox(FloatRect& objectBoundingBox, bool& obje
ctBoundingBoxValid, RenderObject* other, FloatRect otherBoundingBox); |
| 106 static bool layoutSizeOfNearestViewportChanged(const RenderObject* start); | 103 static bool layoutSizeOfNearestViewportChanged(const RenderObject* start); |
| 107 }; | 104 }; |
| 108 | 105 |
| 109 } // namespace blink | 106 } // namespace blink |
| 110 | 107 |
| 111 #endif // SVGRenderSupport_h | 108 #endif // SVGRenderSupport_h |
| OLD | NEW |