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

Side by Side Diff: Source/core/rendering/svg/RenderSVGModelObject.cpp

Issue 210043008: Kill outlineBox (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebaselined patch, hoping it would solve the bot failure I can't reproduce locally Created 6 years, 9 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2009, Google Inc. All rights reserved. 2 * Copyright (c) 2009, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 void RenderSVGModelObject::mapLocalToContainer(const RenderLayerModelObject* rep aintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFix ed) const 62 void RenderSVGModelObject::mapLocalToContainer(const RenderLayerModelObject* rep aintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasFix ed) const
63 { 63 {
64 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState , wasFixed); 64 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState , wasFixed);
65 } 65 }
66 66
67 const RenderObject* RenderSVGModelObject::pushMappingToContainer(const RenderLay erModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const 67 const RenderObject* RenderSVGModelObject::pushMappingToContainer(const RenderLay erModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
68 { 68 {
69 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom etryMap); 69 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom etryMap);
70 } 70 }
71 71
72 // Copied from RenderBox, this method likely requires further refactoring to wor k easily for both SVG and CSS Box Model content.
73 // FIXME: This may also need to move into SVGRenderSupport as the RenderBox vers ion depends
74 // on borderBoundingBox() which SVG RenderBox subclases (like SVGRenderBlock) do not implement.
75 LayoutRect RenderSVGModelObject::outlineBoundsForRepaint(const RenderLayerModelO bject* repaintContainer, const RenderGeometryMap*) const
76 {
77 LayoutRect box = enclosingLayoutRect(repaintRectInLocalCoordinates());
78 adjustRectForOutline(box);
79
80 FloatQuad containerRelativeQuad = localToContainerQuad(FloatRect(box), repai ntContainer);
81 return containerRelativeQuad.enclosingBoundingBox();
82 }
83
84 void RenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoi nt& accumulatedOffset) const 72 void RenderSVGModelObject::absoluteRects(Vector<IntRect>& rects, const LayoutPoi nt& accumulatedOffset) const
85 { 73 {
86 IntRect rect = enclosingIntRect(strokeBoundingBox()); 74 IntRect rect = enclosingIntRect(strokeBoundingBox());
87 rect.moveBy(roundedIntPoint(accumulatedOffset)); 75 rect.moveBy(roundedIntPoint(accumulatedOffset));
88 rects.append(rect); 76 rects.append(rect);
89 } 77 }
90 78
91 void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixe d) const 79 void RenderSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads, bool* wasFixe d) const
92 { 80 {
93 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed )); 81 quads.append(localToAbsoluteQuad(strokeBoundingBox(), 0 /* mode */, wasFixed ));
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 117 }
130 118
131 // The SVG addFocusRingRects() method adds rects in local coordinates so the def ault absoluteFocusRingQuads 119 // The SVG addFocusRingRects() method adds rects in local coordinates so the def ault absoluteFocusRingQuads
132 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds. 120 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds.
133 void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) 121 void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads)
134 { 122 {
135 quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())) ); 123 quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates())) );
136 } 124 }
137 125
138 } // namespace WebCore 126 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGModelObject.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698