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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 | 115 |
116 // If our bounds changed, notify the parents. | 116 // If our bounds changed, notify the parents. |
117 if (updateCachedBoundariesInParents) | 117 if (updateCachedBoundariesInParents) |
118 LayoutSVGBlock::setNeedsBoundariesUpdate(); | 118 LayoutSVGBlock::setNeedsBoundariesUpdate(); |
119 | 119 |
120 // Invalidate all resources of this client if our layout changed. | 120 // Invalidate all resources of this client if our layout changed. |
121 if (layoutChanged) | 121 if (layoutChanged) |
122 SVGResourcesCache::clientLayoutChanged(this); | 122 SVGResourcesCache::clientLayoutChanged(this); |
123 } | 123 } |
124 | 124 |
125 bool LayoutSVGForeignObject::nodeAtFloatPoint(const HitTestRequest& request, Hit
TestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction
) | 125 bool LayoutSVGForeignObject::nodeAtFloatPoint(HitTestResult& result, const Float
Point& pointInParent, HitTestAction hitTestAction) |
126 { | 126 { |
127 // Embedded content is drawn in the foreground phase. | 127 // Embedded content is drawn in the foreground phase. |
128 if (hitTestAction != HitTestForeground) | 128 if (hitTestAction != HitTestForeground) |
129 return false; | 129 return false; |
130 | 130 |
131 AffineTransform localTransform = this->localTransform(); | 131 AffineTransform localTransform = this->localTransform(); |
132 if (!localTransform.isInvertible()) | 132 if (!localTransform.isInvertible()) |
133 return false; | 133 return false; |
134 | 134 |
135 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); | 135 FloatPoint localPoint = localTransform.inverse().mapPoint(pointInParent); |
136 | 136 |
137 // Early exit if local point is not contained in clipped viewport area | 137 // Early exit if local point is not contained in clipped viewport area |
138 if (SVGLayoutSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) | 138 if (SVGLayoutSupport::isOverflowHidden(this) && !m_viewport.contains(localPo
int)) |
139 return false; | 139 return false; |
140 | 140 |
141 // FOs establish a stacking context, so we need to hit-test all layers. | 141 // FOs establish a stacking context, so we need to hit-test all layers. |
142 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); | 142 HitTestLocation hitTestLocation(roundedLayoutPoint(localPoint)); |
143 return LayoutBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestForeground) | 143 return LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT
estForeground) |
144 || LayoutBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestFloat) | 144 || LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT
estFloat) |
145 || LayoutBlock::nodeAtPoint(request, result, hitTestLocation, LayoutPoin
t(), HitTestChildBlockBackgrounds); | 145 || LayoutBlock::nodeAtPoint(result, hitTestLocation, LayoutPoint(), HitT
estChildBlockBackgrounds); |
146 } | 146 } |
147 | 147 |
148 } | 148 } |
OLD | NEW |