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

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

Issue 136723007: Share more code between RenderSVGText and RenderSVGForeignObject (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add FINAL Created 6 years, 11 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) 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 childPaintInfo.phase = PaintPhaseFloat; 78 childPaintInfo.phase = PaintPhaseFloat;
79 RenderBlock::paint(childPaintInfo, childPoint); 79 RenderBlock::paint(childPaintInfo, childPoint);
80 childPaintInfo.phase = PaintPhaseForeground; 80 childPaintInfo.phase = PaintPhaseForeground;
81 RenderBlock::paint(childPaintInfo, childPoint); 81 RenderBlock::paint(childPaintInfo, childPoint);
82 childPaintInfo.phase = PaintPhaseOutline; 82 childPaintInfo.phase = PaintPhaseOutline;
83 RenderBlock::paint(childPaintInfo, childPoint); 83 RenderBlock::paint(childPaintInfo, childPoint);
84 } 84 }
85 } 85 }
86 } 86 }
87 87
88 LayoutRect RenderSVGForeignObject::clippedOverflowRectForRepaint(const RenderLay erModelObject* repaintContainer) const
89 {
90 return SVGRenderSupport::clippedOverflowRectForRepaint(this, repaintContaine r);
91 }
92
93 void RenderSVGForeignObject::computeFloatRectForRepaint(const RenderLayerModelOb ject* repaintContainer, FloatRect& repaintRect, bool fixed) const
94 {
95 SVGRenderSupport::computeFloatRectForRepaint(this, repaintContainer, repaint Rect, fixed);
96 }
97
98 const AffineTransform& RenderSVGForeignObject::localToParentTransform() const 88 const AffineTransform& RenderSVGForeignObject::localToParentTransform() const
99 { 89 {
100 m_localToParentTransform = localTransform(); 90 m_localToParentTransform = localTransform();
101 m_localToParentTransform.translate(m_viewport.x(), m_viewport.y()); 91 m_localToParentTransform.translate(m_viewport.x(), m_viewport.y());
102 return m_localToParentTransform; 92 return m_localToParentTransform;
103 } 93 }
104 94
105 void RenderSVGForeignObject::updateLogicalWidth() 95 void RenderSVGForeignObject::updateLogicalWidth()
106 { 96 {
107 // FIXME: Investigate in size rounding issues 97 // FIXME: Investigate in size rounding issues
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo int)) 167 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo int))
178 return false; 168 return false;
179 169
180 // FOs establish a stacking context, so we need to hit-test all layers. 170 // FOs establish a stacking context, so we need to hit-test all layers.
181 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); 171 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint));
182 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestForeground) 172 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestForeground)
183 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestFloat) 173 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestFloat)
184 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestChildBlockBackgrounds); 174 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestChildBlockBackgrounds);
185 } 175 }
186 176
187 bool RenderSVGForeignObject::nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTestLocation&, const LayoutPoint&, HitTestAction)
188 {
189 ASSERT_NOT_REACHED();
190 return false;
191 } 177 }
192
193 void RenderSVGForeignObject::mapLocalToContainer(const RenderLayerModelObject* r epaintContainer, TransformState& transformState, MapCoordinatesFlags, bool* wasF ixed) const
194 {
195 SVGRenderSupport::mapLocalToContainer(this, repaintContainer, transformState , wasFixed);
196 }
197
198 const RenderObject* RenderSVGForeignObject::pushMappingToContainer(const RenderL ayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
199 {
200 return SVGRenderSupport::pushMappingToContainer(this, ancestorToStopAt, geom etryMap);
201 }
202
203 }
OLDNEW
« no previous file with comments | « Source/core/rendering/svg/RenderSVGForeignObject.h ('k') | Source/core/rendering/svg/RenderSVGText.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698