Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(786)

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.h

Issue 2400783002: Reformat comments in core/layout/svg (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 class ComputedStyle; 43 class ComputedStyle;
44 class LayoutSVGRoot; 44 class LayoutSVGRoot;
45 class SVGLengthContext; 45 class SVGLengthContext;
46 class StrokeData; 46 class StrokeData;
47 class TransformState; 47 class TransformState;
48 48
49 class CORE_EXPORT SVGLayoutSupport { 49 class CORE_EXPORT SVGLayoutSupport {
50 STATIC_ONLY(SVGLayoutSupport); 50 STATIC_ONLY(SVGLayoutSupport);
51 51
52 public: 52 public:
53 // Shares child layouting code between LayoutSVGRoot/LayoutSVG(Hidden)Containe r 53 // Shares child layouting code between
54 // LayoutSVGRoot/LayoutSVG(Hidden)Container
54 static void layoutChildren(LayoutObject*, 55 static void layoutChildren(LayoutObject*,
55 bool forceLayout, 56 bool forceLayout,
56 bool screenScalingFactorChanged, 57 bool screenScalingFactorChanged,
57 bool layoutSizeChanged); 58 bool layoutSizeChanged);
58 59
59 // Layout resources used by this node. 60 // Layout resources used by this node.
60 static void layoutResourcesIfNeeded(const LayoutObject*); 61 static void layoutResourcesIfNeeded(const LayoutObject*);
61 62
62 // Helper function determining whether overflow is hidden. 63 // Helper function determining whether overflow is hidden.
63 static bool isOverflowHidden(const LayoutObject*); 64 static bool isOverflowHidden(const LayoutObject*);
64 65
65 // Calculates the paintInvalidationRect in combination with filter, clipper an d masker in local coordinates. 66 // Calculates the paintInvalidationRect in combination with filter, clipper
67 // and masker in local coordinates.
66 static void intersectPaintInvalidationRectWithResources(const LayoutObject*, 68 static void intersectPaintInvalidationRectWithResources(const LayoutObject*,
67 FloatRect&); 69 FloatRect&);
68 70
69 // Determine if the LayoutObject references a filter resource object. 71 // Determine if the LayoutObject references a filter resource object.
70 static bool hasFilterResource(const LayoutObject&); 72 static bool hasFilterResource(const LayoutObject&);
71 73
72 // Determines whether the passed point lies in a clipping area 74 // Determines whether the passed point lies in a clipping area
73 static bool pointInClippingArea(const LayoutObject&, const FloatPoint&); 75 static bool pointInClippingArea(const LayoutObject&, const FloatPoint&);
74 76
75 // Transform |pointInParent| to |object|'s user-space and check if it is 77 // Transform |pointInParent| to |object|'s user-space and check if it is
76 // within the clipping area. Returns false if the transform is singular or 78 // within the clipping area. Returns false if the transform is singular or
77 // the point is outside the clipping area. 79 // the point is outside the clipping area.
78 static bool transformToUserSpaceAndCheckClipping( 80 static bool transformToUserSpaceAndCheckClipping(
79 const LayoutObject&, 81 const LayoutObject&,
80 const AffineTransform& localTransform, 82 const AffineTransform& localTransform,
81 const FloatPoint& pointInParent, 83 const FloatPoint& pointInParent,
82 FloatPoint& localPoint); 84 FloatPoint& localPoint);
83 85
84 static void computeContainerBoundingBoxes( 86 static void computeContainerBoundingBoxes(
85 const LayoutObject* container, 87 const LayoutObject* container,
86 FloatRect& objectBoundingBox, 88 FloatRect& objectBoundingBox,
87 bool& objectBoundingBoxValid, 89 bool& objectBoundingBoxValid,
88 FloatRect& strokeBoundingBox, 90 FloatRect& strokeBoundingBox,
89 FloatRect& paintInvalidationBoundingBox); 91 FloatRect& paintInvalidationBoundingBox);
90 92
91 // Important functions used by nearly all SVG layoutObjects centralizing coord inate transformations / paint invalidation rect calculations 93 // Important functions used by nearly all SVG layoutObjects centralizing
94 // coordinate transformations / paint invalidation rect calculations
92 static FloatRect localOverflowRectForPaintInvalidation(const LayoutObject&); 95 static FloatRect localOverflowRectForPaintInvalidation(const LayoutObject&);
93 static LayoutRect clippedOverflowRectForPaintInvalidation( 96 static LayoutRect clippedOverflowRectForPaintInvalidation(
94 const LayoutObject&, 97 const LayoutObject&,
95 const LayoutBoxModelObject& paintInvalidationContainer); 98 const LayoutBoxModelObject& paintInvalidationContainer);
96 static LayoutRect transformPaintInvalidationRect(const LayoutObject&, 99 static LayoutRect transformPaintInvalidationRect(const LayoutObject&,
97 const AffineTransform&, 100 const AffineTransform&,
98 const FloatRect&); 101 const FloatRect&);
99 static bool mapToVisualRectInAncestorSpace( 102 static bool mapToVisualRectInAncestorSpace(
100 const LayoutObject&, 103 const LayoutObject&,
101 const LayoutBoxModelObject* ancestor, 104 const LayoutBoxModelObject* ancestor,
(...skipping 24 matching lines...) Expand all
126 129
127 // Determines if any ancestor has adjusted the scale factor. 130 // Determines if any ancestor has adjusted the scale factor.
128 static bool screenScaleFactorChanged(const LayoutObject*); 131 static bool screenScaleFactorChanged(const LayoutObject*);
129 132
130 // Determines if any ancestor's layout size has changed. 133 // Determines if any ancestor's layout size has changed.
131 static bool layoutSizeOfNearestViewportChanged(const LayoutObject*); 134 static bool layoutSizeOfNearestViewportChanged(const LayoutObject*);
132 135
133 // FIXME: These methods do not belong here. 136 // FIXME: These methods do not belong here.
134 static const LayoutSVGRoot* findTreeRootObject(const LayoutObject*); 137 static const LayoutSVGRoot* findTreeRootObject(const LayoutObject*);
135 138
136 // Helper method for determining if a LayoutObject marked as text (isText()== true) 139 // Helper method for determining if a LayoutObject marked as text (isText()==
137 // can/will be laid out as part of a <text>. 140 // true) can/will be laid out as part of a <text>.
138 static bool isLayoutableTextNode(const LayoutObject*); 141 static bool isLayoutableTextNode(const LayoutObject*);
139 142
140 // Determines whether a svg node should isolate or not based on ComputedStyle. 143 // Determines whether a svg node should isolate or not based on ComputedStyle.
141 static bool willIsolateBlendingDescendantsForStyle(const ComputedStyle&); 144 static bool willIsolateBlendingDescendantsForStyle(const ComputedStyle&);
142 static bool willIsolateBlendingDescendantsForObject(const LayoutObject*); 145 static bool willIsolateBlendingDescendantsForObject(const LayoutObject*);
143 template <typename LayoutObjectType> 146 template <typename LayoutObjectType>
144 static bool computeHasNonIsolatedBlendingDescendants(const LayoutObjectType*); 147 static bool computeHasNonIsolatedBlendingDescendants(const LayoutObjectType*);
145 static bool isIsolationRequired(const LayoutObject*); 148 static bool isIsolationRequired(const LayoutObject*);
146 149
147 static AffineTransform deprecatedCalculateTransformToLayer( 150 static AffineTransform deprecatedCalculateTransformToLayer(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 if (child->hasNonIsolatedBlendingDescendants() && 222 if (child->hasNonIsolatedBlendingDescendants() &&
220 !willIsolateBlendingDescendantsForObject(child)) 223 !willIsolateBlendingDescendantsForObject(child))
221 return true; 224 return true;
222 } 225 }
223 return false; 226 return false;
224 } 227 }
225 228
226 } // namespace blink 229 } // namespace blink
227 230
228 #endif // SVGLayoutSupport_h 231 #endif // SVGLayoutSupport_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698