OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 2000 Simon Hausmann <hausmann@kde.org> | 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> |
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) | 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) |
5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. |
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
177 if (result.hitTestRequest().listBased()) { | 177 if (result.hitTestRequest().listBased()) { |
178 result.append(childFrameResult); | 178 result.append(childFrameResult); |
179 } else if (isInsideChildFrame) { | 179 } else if (isInsideChildFrame) { |
180 // Force the result not to be cacheable because the parent | 180 // Force the result not to be cacheable because the parent |
181 // frame should not cache this result; as it won't be notified o f | 181 // frame should not cache this result; as it won't be notified o f |
182 // changes in the child. | 182 // changes in the child. |
183 childFrameResult.setCacheable(false); | 183 childFrameResult.setCacheable(false); |
184 result = childFrameResult; | 184 result = childFrameResult; |
185 } | 185 } |
186 | 186 |
187 if (isInsideChildFrame) | 187 // Don't trust |isInsideChildFrame|. Returns true only when the hit test |
188 return true; | 188 // point/rect is totally within the iframe, i.e. nodeAtPointOverWidg et() |
189 // also returns true. | |
190 // Use a temparory HitTestResult because we don't want to collect th e | |
191 // iframe element itself if the hit-test rect is totally within the iframe. | |
192 if (isInsideChildFrame) { | |
dtapuska
2015/09/08 20:07:48
I presume this code path isn't necessary for the n
Yufeng Shen (Slow to review)
2015/09/08 22:08:42
done.
| |
193 HitTestResult pointOverWidgetResult = result; | |
194 bool pointOverWidget = nodeAtPointOverWidget(pointOverWidgetResu lt, locationInContainer, accumulatedOffset, action); | |
195 if (pointOverWidget) | |
196 return true; | |
197 result = pointOverWidgetResult; | |
198 return false; | |
199 } | |
189 } | 200 } |
190 } | 201 } |
191 | 202 |
192 return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action); | 203 return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action); |
193 } | 204 } |
194 | 205 |
195 CompositingReasons LayoutPart::additionalCompositingReasons() const | 206 CompositingReasons LayoutPart::additionalCompositingReasons() const |
196 { | 207 { |
197 if (requiresAcceleratedCompositing()) | 208 if (requiresAcceleratedCompositing()) |
198 return CompositingReasonIFrame; | 209 return CompositingReasonIFrame; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 if (widget() && widget()->isFrameView()) { | 349 if (widget() && widget()->isFrameView()) { |
339 FrameView* childFrameView = toFrameView(widget()); | 350 FrameView* childFrameView = toFrameView(widget()); |
340 PaintInvalidationState childViewPaintInvalidationState(*childFrameView-> layoutView(), paintInvalidationState); | 351 PaintInvalidationState childViewPaintInvalidationState(*childFrameView-> layoutView(), paintInvalidationState); |
341 toFrameView(widget())->invalidateTreeIfNeeded(childViewPaintInvalidation State); | 352 toFrameView(widget())->invalidateTreeIfNeeded(childViewPaintInvalidation State); |
342 } | 353 } |
343 | 354 |
344 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); | 355 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); |
345 } | 356 } |
346 | 357 |
347 } | 358 } |
OLD | NEW |