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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 FrameView* childFrameView = toFrameView(widget()); | 163 FrameView* childFrameView = toFrameView(widget()); |
164 LayoutView* childRoot = childFrameView->layoutView(); | 164 LayoutView* childRoot = childFrameView->layoutView(); |
165 | 165 |
166 if (visibleToHitTestRequest(result.hitTestRequest()) && childRoot) { | 166 if (visibleToHitTestRequest(result.hitTestRequest()) && childRoot) { |
167 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 167 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
168 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), bo
rderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); | 168 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), bo
rderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); |
169 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocatio
n - contentOffset); | 169 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocatio
n - contentOffset); |
170 HitTestRequest newHitTestRequest(result.hitTestRequest().type() | HitTes
tRequest::ChildFrameHitTest); | 170 HitTestRequest newHitTestRequest(result.hitTestRequest().type() | HitTes
tRequest::ChildFrameHitTest); |
171 HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation); | 171 HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation); |
| 172 childFrameResult.setValidityRect(result.validityRect()); |
172 | 173 |
173 bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTe
stLocation, childFrameResult); | 174 bool isInsideChildFrame = childRoot->hitTest(childFrameResult); |
174 | 175 |
175 if (result.hitTestRequest().listBased()) | 176 if (result.hitTestRequest().listBased()) |
176 result.append(childFrameResult); | 177 result.append(childFrameResult); |
177 else if (isInsideChildFrame) | 178 else if (isInsideChildFrame) |
178 result = childFrameResult; | 179 result = childFrameResult; |
179 | 180 |
180 if (isInsideChildFrame) | 181 if (isInsideChildFrame) |
181 return true; | 182 return true; |
182 } | 183 } |
183 | 184 |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
319 if (widget->frameRect() == newFrame) | 320 if (widget->frameRect() == newFrame) |
320 return false; | 321 return false; |
321 | 322 |
322 RefPtr<LayoutPart> protector(this); | 323 RefPtr<LayoutPart> protector(this); |
323 RefPtrWillBeRawPtr<Node> protectedNode(node()); | 324 RefPtrWillBeRawPtr<Node> protectedNode(node()); |
324 widget->setFrameRect(newFrame); | 325 widget->setFrameRect(newFrame); |
325 return widget->frameRect().size() != newFrame.size(); | 326 return widget->frameRect().size() != newFrame.size(); |
326 } | 327 } |
327 | 328 |
328 } | 329 } |
OLD | NEW |