| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006 Apple Computer, Inc. | 2 * Copyright (C) 2006 Apple Computer, 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 28 matching lines...) Expand all Loading... |
| 39 , m_needsTransformUpdate(true) | 39 , m_needsTransformUpdate(true) |
| 40 { | 40 { |
| 41 } | 41 } |
| 42 | 42 |
| 43 RenderSVGForeignObject::~RenderSVGForeignObject() | 43 RenderSVGForeignObject::~RenderSVGForeignObject() |
| 44 { | 44 { |
| 45 } | 45 } |
| 46 | 46 |
| 47 void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&) | 47 void RenderSVGForeignObject::paint(PaintInfo& paintInfo, const LayoutPoint&) |
| 48 { | 48 { |
| 49 if (paintInfo.context->paintingDisabled() | 49 if (paintInfo.getContext()->paintingDisabled() |
| 50 || (paintInfo.phase != PaintPhaseForeground && paintInfo.phase != PaintP
haseSelection)) | 50 || (paintInfo.getPhase() != PaintPhaseForeground && paintInfo.getPhase()
!= PaintPhaseSelection)) |
| 51 return; | 51 return; |
| 52 | 52 |
| 53 PaintInfo childPaintInfo(paintInfo); | 53 PaintInfo childPaintInfo(paintInfo); |
| 54 GraphicsContextStateSaver stateSaver(*childPaintInfo.context); | 54 GraphicsContextStateSaver stateSaver(*(childPaintInfo.getContext())); |
| 55 childPaintInfo.applyTransform(localTransform()); | 55 childPaintInfo.applyTransform(localTransform()); |
| 56 | 56 |
| 57 if (SVGRenderSupport::isOverflowHidden(this)) | 57 if (SVGRenderSupport::isOverflowHidden(this)) |
| 58 childPaintInfo.context->clip(m_viewport); | 58 childPaintInfo.getContext()->clip(m_viewport); |
| 59 | 59 |
| 60 SVGRenderingContext renderingContext; | 60 SVGRenderingContext renderingContext; |
| 61 bool continueRendering = true; | 61 bool continueRendering = true; |
| 62 if (paintInfo.phase == PaintPhaseForeground) { | 62 if (paintInfo.getPhase() == PaintPhaseForeground) { |
| 63 renderingContext.prepareToRenderSVGContent(this, childPaintInfo); | 63 renderingContext.prepareToRenderSVGContent(this, childPaintInfo); |
| 64 continueRendering = renderingContext.isRenderingPrepared(); | 64 continueRendering = renderingContext.isRenderingPrepared(); |
| 65 } | 65 } |
| 66 | 66 |
| 67 if (continueRendering) { | 67 if (continueRendering) { |
| 68 // Paint all phases of FO elements atomically, as though the FO element
established its | 68 // Paint all phases of FO elements atomically, as though the FO element
established its |
| 69 // own stacking context. | 69 // own stacking context. |
| 70 bool preservePhase = paintInfo.phase == PaintPhaseSelection || paintInfo
.phase == PaintPhaseTextClip; | 70 bool preservePhase = paintInfo.getPhase() == PaintPhaseSelection || pain
tInfo.getPhase() == PaintPhaseTextClip; |
| 71 LayoutPoint childPoint = IntPoint(); | 71 LayoutPoint childPoint = IntPoint(); |
| 72 childPaintInfo.phase = preservePhase ? paintInfo.phase : PaintPhaseBlock
Background; | 72 PaintPhase phase = preservePhase ? paintInfo.getPhase() : PaintPhaseBloc
kBackground; |
| 73 childPaintInfo.setPhase(phase); |
| 73 RenderBlock::paint(childPaintInfo, IntPoint()); | 74 RenderBlock::paint(childPaintInfo, IntPoint()); |
| 74 if (!preservePhase) { | 75 if (!preservePhase) { |
| 75 childPaintInfo.phase = PaintPhaseChildBlockBackgrounds; | 76 childPaintInfo.setPhase(PaintPhaseChildBlockBackgrounds); |
| 76 RenderBlock::paint(childPaintInfo, childPoint); | 77 RenderBlock::paint(childPaintInfo, childPoint); |
| 77 childPaintInfo.phase = PaintPhaseFloat; | 78 childPaintInfo.setPhase(PaintPhaseFloat); |
| 78 RenderBlock::paint(childPaintInfo, childPoint); | 79 RenderBlock::paint(childPaintInfo, childPoint); |
| 79 childPaintInfo.phase = PaintPhaseForeground; | 80 childPaintInfo.setPhase(PaintPhaseForeground); |
| 80 RenderBlock::paint(childPaintInfo, childPoint); | 81 RenderBlock::paint(childPaintInfo, childPoint); |
| 81 childPaintInfo.phase = PaintPhaseOutline; | 82 childPaintInfo.setPhase(PaintPhaseOutline); |
| 82 RenderBlock::paint(childPaintInfo, childPoint); | 83 RenderBlock::paint(childPaintInfo, childPoint); |
| 83 } | 84 } |
| 84 } | 85 } |
| 85 } | 86 } |
| 86 | 87 |
| 87 LayoutRect RenderSVGForeignObject::clippedOverflowRectForRepaint(const RenderLay
erModelObject* repaintContainer) const | 88 LayoutRect RenderSVGForeignObject::clippedOverflowRectForRepaint(const RenderLay
erModelObject* repaintContainer) const |
| 88 { | 89 { |
| 89 return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContaine
r); | 90 return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContaine
r); |
| 90 } | 91 } |
| 91 | 92 |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 { | 194 { |
| 194 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState
, wasFixed); | 195 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState
, wasFixed); |
| 195 } | 196 } |
| 196 | 197 |
| 197 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL
ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const | 198 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL
ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
| 198 { | 199 { |
| 199 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); | 200 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom
etryMap); |
| 200 } | 201 } |
| 201 | 202 |
| 202 } | 203 } |
| OLD | NEW |