OLD | NEW |
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 26 matching lines...) Expand all Loading... |
37 #include "core/rendering/svg/SVGResourcesCache.h" | 37 #include "core/rendering/svg/SVGResourcesCache.h" |
38 #include "core/svg/SVGGraphicsElement.h" | 38 #include "core/svg/SVGGraphicsElement.h" |
39 | 39 |
40 namespace WebCore { | 40 namespace WebCore { |
41 | 41 |
42 RenderSVGModelObject::RenderSVGModelObject(SVGElement* node) | 42 RenderSVGModelObject::RenderSVGModelObject(SVGElement* node) |
43 : RenderObject(node) | 43 : RenderObject(node) |
44 { | 44 { |
45 } | 45 } |
46 | 46 |
| 47 bool RenderSVGModelObject::isChildAllowed(RenderObject* child, RenderStyle*) con
st |
| 48 { |
| 49 return child->isSVG() && !(child->isSVGInline() || child->isSVGInlineText())
; |
| 50 } |
| 51 |
47 LayoutRect RenderSVGModelObject::clippedOverflowRectForRepaint(const RenderLayer
ModelObject* repaintContainer) const | 52 LayoutRect RenderSVGModelObject::clippedOverflowRectForRepaint(const RenderLayer
ModelObject* repaintContainer) const |
48 { | 53 { |
49 return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContaine
r); | 54 return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContaine
r); |
50 } | 55 } |
51 | 56 |
52 void RenderSVGModelObject::computeFloatRectForRepaint(const RenderLayerModelObje
ct* repaintContainer, FloatRect& repaintRect, bool fixed) const | 57 void RenderSVGModelObject::computeFloatRectForRepaint(const RenderLayerModelObje
ct* repaintContainer, FloatRect& repaintRect, bool fixed) const |
53 { | 58 { |
54 SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaint
Rect, fixed); | 59 SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaint
Rect, fixed); |
55 } | 60 } |
56 | 61 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 if (!isGraphicsElement(renderer)) | 200 if (!isGraphicsElement(renderer)) |
196 return false; | 201 return false; |
197 AffineTransform ctm; | 202 AffineTransform ctm; |
198 SVGGraphicsElement* svgElement = toSVGGraphicsElement(renderer->node()); | 203 SVGGraphicsElement* svgElement = toSVGGraphicsElement(renderer->node()); |
199 getElementCTM(svgElement, ctm); | 204 getElementCTM(svgElement, ctm); |
200 ASSERT(svgElement->renderer()); | 205 ASSERT(svgElement->renderer()); |
201 return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalC
oordinates())); | 206 return rect.contains(ctm.mapRect(svgElement->renderer()->repaintRectInLocalC
oordinates())); |
202 } | 207 } |
203 | 208 |
204 } // namespace WebCore | 209 } // namespace WebCore |
OLD | NEW |