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

Side by Side Diff: third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp

Issue 2324603002: Move AX local bounding box calculation into LayoutObject (Closed)
Patch Set: Rebase Created 4 years, 3 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) 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 IntRect rect = enclosingIntRect(strokeBoundingBox()); 76 IntRect rect = enclosingIntRect(strokeBoundingBox());
77 rect.moveBy(roundedIntPoint(accumulatedOffset)); 77 rect.moveBy(roundedIntPoint(accumulatedOffset));
78 rects.append(rect); 78 rects.append(rect);
79 } 79 }
80 80
81 void LayoutSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads) const 81 void LayoutSVGModelObject::absoluteQuads(Vector<FloatQuad>& quads) const
82 { 82 {
83 quads.append(localToAbsoluteQuad(strokeBoundingBox())); 83 quads.append(localToAbsoluteQuad(strokeBoundingBox()));
84 } 84 }
85 85
86 FloatRect LayoutSVGModelObject::localBoundingBoxRectForAccessibility() const
87 {
88 return strokeBoundingBox();
89 }
90
86 void LayoutSVGModelObject::willBeDestroyed() 91 void LayoutSVGModelObject::willBeDestroyed()
87 { 92 {
88 SVGResourcesCache::clientDestroyed(this); 93 SVGResourcesCache::clientDestroyed(this);
89 LayoutObject::willBeDestroyed(); 94 LayoutObject::willBeDestroyed();
90 } 95 }
91 96
92 PaintInvalidationReason LayoutSVGModelObject::invalidatePaintIfNeeded(const Pain tInvalidatorContext& context) const 97 PaintInvalidationReason LayoutSVGModelObject::invalidatePaintIfNeeded(const Pain tInvalidatorContext& context) const
93 { 98 {
94 return SVGModelObjectPaintInvalidator(*this, context).invalidatePaintIfNeede d(); 99 return SVGModelObjectPaintInvalidator(*this, context).invalidatePaintIfNeede d();
95 } 100 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 135 }
131 136
132 // The SVG addOutlineRects() method adds rects in local coordinates so the defau lt absoluteElementBoundingBoxRect() 137 // The SVG addOutlineRects() method adds rects in local coordinates so the defau lt absoluteElementBoundingBoxRect()
133 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds. 138 // returns incorrect values for SVG objects. Overriding this method provides acc ess to the absolute bounds.
134 IntRect LayoutSVGModelObject::absoluteElementBoundingBoxRect() const 139 IntRect LayoutSVGModelObject::absoluteElementBoundingBoxRect() const
135 { 140 {
136 return localToAbsoluteQuad(FloatQuad(paintInvalidationRectInLocalSVGCoordina tes())).enclosingBoundingBox(); 141 return localToAbsoluteQuad(FloatQuad(paintInvalidationRectInLocalSVGCoordina tes())).enclosingBoundingBox();
137 } 142 }
138 143
139 } // namespace blink 144 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698