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 // 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 HitTestResult pointOverWidgetResult = result; | |
193 if (isInsideChildFrame | |
194 && nodeAtPointOverWidget(pointOverWidgetResult, locationInContai ner, accumulatedOffset, action)) | |
Rick Byers
2015/09/08 15:12:33
If this returns false, we'll run it again below.
Yufeng Shen (Slow to review)
2015/09/08 18:44:53
right, optimized so that nodeAtPointOverWidget() w
| |
188 return true; | 195 return true; |
196 | |
189 } | 197 } |
190 } | 198 } |
191 | 199 |
192 return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action); | 200 return nodeAtPointOverWidget(result, locationInContainer, accumulatedOffset, action); |
193 } | 201 } |
194 | 202 |
195 CompositingReasons LayoutPart::additionalCompositingReasons() const | 203 CompositingReasons LayoutPart::additionalCompositingReasons() const |
196 { | 204 { |
197 if (requiresAcceleratedCompositing()) | 205 if (requiresAcceleratedCompositing()) |
198 return CompositingReasonIFrame; | 206 return CompositingReasonIFrame; |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
338 if (widget() && widget()->isFrameView()) { | 346 if (widget() && widget()->isFrameView()) { |
339 FrameView* childFrameView = toFrameView(widget()); | 347 FrameView* childFrameView = toFrameView(widget()); |
340 PaintInvalidationState childViewPaintInvalidationState(*childFrameView-> layoutView(), paintInvalidationState); | 348 PaintInvalidationState childViewPaintInvalidationState(*childFrameView-> layoutView(), paintInvalidationState); |
341 toFrameView(widget())->invalidateTreeIfNeeded(childViewPaintInvalidation State); | 349 toFrameView(widget())->invalidateTreeIfNeeded(childViewPaintInvalidation State); |
342 } | 350 } |
343 | 351 |
344 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); | 352 LayoutReplaced::invalidatePaintOfSubtreesIfNeeded(paintInvalidationState); |
345 } | 353 } |
346 | 354 |
347 } | 355 } |
OLD | NEW |