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

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

Issue 722343006: Add RenderSVGBlock::mapRectToPaintInvalidationBacking (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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 | Annotate | Revision Log
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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // If our bounds changed, notify the parents. 112 // If our bounds changed, notify the parents.
113 if (updateCachedBoundariesInParents) 113 if (updateCachedBoundariesInParents)
114 RenderSVGBlock::setNeedsBoundariesUpdate(); 114 RenderSVGBlock::setNeedsBoundariesUpdate();
115 115
116 // Invalidate all resources of this client if our layout changed. 116 // Invalidate all resources of this client if our layout changed.
117 if (layoutChanged) 117 if (layoutChanged)
118 SVGResourcesCache::clientLayoutChanged(this); 118 SVGResourcesCache::clientLayoutChanged(this);
119 } 119 }
120 120
121 void RenderSVGForeignObject::mapRectToPaintInvalidationBacking(const RenderLayer ModelObject* paintInvalidationContainer, LayoutRect& rect, const PaintInvalidati onState* paintInvalidationState) const
122 {
123 FloatRect r(rect);
124 r.inflate(style()->outlineWidth());
125 SVGRenderSupport::computeFloatRectForPaintInvalidation(this, paintInvalidati onContainer, r, paintInvalidationState);
126 rect = enclosingLayoutRect(r);
127 }
128
129 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction ) 121 bool RenderSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction )
130 { 122 {
131 // Embedded content is drawn in the foreground phase. 123 // Embedded content is drawn in the foreground phase.
132 if (hitTestAction != HitTestForeground) 124 if (hitTestAction != HitTestForeground)
133 return false; 125 return false;
134 126
135 AffineTransform localTransform = this->localTransform(); 127 AffineTransform localTransform = this->localTransform();
136 if (!localTransform.isInvertible()) 128 if (!localTransform.isInvertible())
137 return false; 129 return false;
138 130
139 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); 131 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent);
140 132
141 // Early exit if local point is not contained in clipped viewport area 133 // Early exit if local point is not contained in clipped viewport area
142 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo int)) 134 if (SVGRenderSupport::isOverflowHidden(this) && !m_viewport.contains(localPo int))
143 return false; 135 return false;
144 136
145 // FOs establish a stacking context, so we need to hit-test all layers. 137 // FOs establish a stacking context, so we need to hit-test all layers.
146 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); 138 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint));
147 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestForeground) 139 return RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestForeground)
148 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestFloat) 140 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestFloat)
149 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestChildBlockBackgrounds); 141 || RenderBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin t(), HitTestChildBlockBackgrounds);
150 } 142 }
151 143
152 } 144 }
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