LEFT | RIGHT |
1 /* | 1 /* |
2 * Copyright (C) 2006 Apple Inc. | 2 * Copyright (C) 2006 Apple Inc. |
3 * Copyright (C) 2009 Google, Inc. | 3 * Copyright (C) 2009 Google, Inc. |
4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.· | 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.· |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 SVGForeignObjectElement& RenderSVGForeignObject::foreignObjectElement() const | 49 SVGForeignObjectElement& RenderSVGForeignObject::foreignObjectElement() const |
50 { | 50 { |
51 return downcast<SVGForeignObjectElement>(RenderSVGBlock::graphicsElement()); | 51 return downcast<SVGForeignObjectElement>(RenderSVGBlock::graphicsElement()); |
52 } | 52 } |
53 | 53 |
54 void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&) | 54 void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&) |
55 { | 55 { |
56 if (paintInfo.context().paintingDisabled()) | 56 if (paintInfo.context().paintingDisabled()) |
57 return; | 57 return; |
58 | 58 |
59 if (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintPhase
Selection) | 59 if (paintInfo.phase != PaintPhase::Foreground && paintInfo.phase != PaintPha
se::Selection) |
60 return; | 60 return; |
61 | 61 |
62 PaintInfo childPaintInfo(paintInfo); | 62 PaintInfo childPaintInfo(paintInfo); |
63 GraphicsContextStateSaver stateSaver(childPaintInfo.context()); | 63 GraphicsContextStateSaver stateSaver(childPaintInfo.context()); |
64 childPaintInfo.applyTransform(localTransform()); | 64 childPaintInfo.applyTransform(localTransform()); |
65 | 65 |
66 if (SVGRenderSupport::isOverflowHidden(*this)) | 66 if (SVGRenderSupport::isOverflowHidden(*this)) |
67 childPaintInfo.context().clip(m_viewport); | 67 childPaintInfo.context().clip(m_viewport); |
68 | 68 |
69 SVGRenderingContext renderingContext; | 69 SVGRenderingContext renderingContext; |
70 if (paintInfo.phase == PaintPhaseForeground) { | 70 if (paintInfo.phase == PaintPhase::Foreground) { |
71 renderingContext.prepareToRenderSVGContent(*this, childPaintInfo); | 71 renderingContext.prepareToRenderSVGContent(*this, childPaintInfo); |
72 if (!renderingContext.isRenderingPrepared()) | 72 if (!renderingContext.isRenderingPrepared()) |
73 return; | 73 return; |
74 } | 74 } |
75 | 75 |
76 LayoutPoint childPoint = IntPoint(); | 76 LayoutPoint childPoint = IntPoint(); |
77 if (paintInfo.phase == PaintPhaseSelection) { | 77 if (paintInfo.phase == PaintPhase::Selection) { |
78 RenderBlock::paint(childPaintInfo, childPoint); | 78 RenderBlock::paint(childPaintInfo, childPoint); |
79 return; | 79 return; |
80 } | 80 } |
81 | 81 |
82 // Paint all phases of FO elements atomically, as though the FO element esta
blished its | 82 // Paint all phases of FO elements atomically, as though the FO element esta
blished its |
83 // own stacking context. | 83 // own stacking context. |
84 childPaintInfo.phase = PaintPhaseBlockBackground; | 84 childPaintInfo.phase = PaintPhase::BlockBackground; |
85 RenderBlock::paint(childPaintInfo, childPoint); | 85 RenderBlock::paint(childPaintInfo, childPoint); |
86 childPaintInfo.phase = PaintPhaseChildBlockBackgrounds; | 86 childPaintInfo.phase = PaintPhase::ChildBlockBackgrounds; |
87 RenderBlock::paint(childPaintInfo, childPoint); | 87 RenderBlock::paint(childPaintInfo, childPoint); |
88 childPaintInfo.phase = PaintPhaseFloat; | 88 childPaintInfo.phase = PaintPhase::Float; |
89 RenderBlock::paint(childPaintInfo, childPoint); | 89 RenderBlock::paint(childPaintInfo, childPoint); |
90 childPaintInfo.phase = PaintPhaseForeground; | 90 childPaintInfo.phase = PaintPhase::Foreground; |
91 RenderBlock::paint(childPaintInfo, childPoint); | 91 RenderBlock::paint(childPaintInfo, childPoint); |
92 childPaintInfo.phase = PaintPhaseOutline; | 92 childPaintInfo.phase = PaintPhase::Outline; |
93 RenderBlock::paint(childPaintInfo, childPoint); | 93 RenderBlock::paint(childPaintInfo, childPoint); |
94 } | 94 } |
95 | 95 |
96 LayoutRect RenderSVGForeignObject::clippedOverflowRectForRepaint(const RenderLay
erModelObject* repaintContainer) const | 96 LayoutRect RenderSVGForeignObject::clippedOverflowRectForRepaint(const RenderLay
erModelObject* repaintContainer) const |
97 { | 97 { |
98 return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContain
er); | 98 return SVGRenderSupport::clippedOverflowRectForRepaint(*this, repaintContain
er); |
99 } | 99 } |
100 | 100 |
101 FloatRect RenderSVGForeignObject::computeFloatRectForRepaint(const FloatRect& re
paintRect, const RenderLayerModelObject* repaintContainer, bool fixed, bool useI
nclusiveIntersection, bool* intersects) const | 101 FloatRect RenderSVGForeignObject::computeFloatRectForRepaint(const FloatRect& re
paintRect, const RenderLayerModelObject* repaintContainer, bool fixed, bool useI
nclusiveIntersection, bool* intersects) const |
102 { | 102 { |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 { | 205 { |
206 SVGRenderSupport::mapLocalToContainer(*this, repaintContainer, transformStat
e, wasFixed); | 206 SVGRenderSupport::mapLocalToContainer(*this, repaintContainer, transformStat
e, wasFixed); |
207 } | 207 } |
208 | 208 |
209 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL
ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const | 209 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL
ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
210 { | 210 { |
211 return SVGRenderSupport::pushMappingToContainer(*this, ancestorToStopAt, geo
metryMap); | 211 return SVGRenderSupport::pushMappingToContainer(*this, ancestorToStopAt, geo
metryMap); |
212 } | 212 } |
213 | 213 |
214 } | 214 } |
LEFT | RIGHT |