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 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 FrameView* childFrameView = toFrameView(widget()); | 169 FrameView* childFrameView = toFrameView(widget()); |
170 LayoutViewItem childRootItem = childFrameView->layoutViewItem(); | 170 LayoutViewItem childRootItem = childFrameView->layoutViewItem(); |
171 | 171 |
172 if (visibleToHitTestRequest(result.hitTestRequest()) && !childRootItem.i
sNull()) { | 172 if (visibleToHitTestRequest(result.hitTestRequest()) && !childRootItem.i
sNull()) { |
173 LayoutPoint adjustedLocation = accumulatedOffset + location(); | 173 LayoutPoint adjustedLocation = accumulatedOffset + location(); |
174 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft()
, borderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); | 174 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft()
, borderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); |
175 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLoc
ation - contentOffset); | 175 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLoc
ation - contentOffset); |
176 HitTestRequest newHitTestRequest(result.hitTestRequest().type() | Hi
tTestRequest::ChildFrameHitTest); | 176 HitTestRequest newHitTestRequest(result.hitTestRequest().type() | Hi
tTestRequest::ChildFrameHitTest); |
177 HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation
); | 177 HitTestResult childFrameResult(newHitTestRequest, newHitTestLocation
); |
178 | 178 |
179 // The frame's layout and style must be up-to-date if we reach here. | 179 // The frame's layout and style must be up to date if we reach here. |
180 bool isInsideChildFrame = childRootItem.hitTestNoLifecycleUpdate(chi
ldFrameResult); | 180 bool isInsideChildFrame = childRootItem.hitTestNoLifecycleUpdate(chi
ldFrameResult); |
181 | 181 |
182 if (result.hitTestRequest().listBased()) { | 182 if (result.hitTestRequest().listBased()) { |
183 result.append(childFrameResult); | 183 result.append(childFrameResult); |
184 } else if (isInsideChildFrame) { | 184 } else if (isInsideChildFrame) { |
185 // Force the result not to be cacheable because the parent | 185 // Force the result not to be cacheable because the parent |
186 // frame should not cache this result; as it won't be notified o
f | 186 // frame should not cache this result; as it won't be notified o
f |
187 // changes in the child. | 187 // changes in the child. |
188 childFrameResult.setCacheable(false); | 188 childFrameResult.setCacheable(false); |
189 result = childFrameResult; | 189 result = childFrameResult; |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
369 | 369 |
370 bool LayoutPart::isThrottledFrameView() const | 370 bool LayoutPart::isThrottledFrameView() const |
371 { | 371 { |
372 if (!widget() || !widget()->isFrameView()) | 372 if (!widget() || !widget()->isFrameView()) |
373 return false; | 373 return false; |
374 const FrameView* frameView = toFrameView(widget()); | 374 const FrameView* frameView = toFrameView(widget()); |
375 return frameView->shouldThrottleRendering(); | 375 return frameView->shouldThrottleRendering(); |
376 } | 376 } |
377 | 377 |
378 } // namespace blink | 378 } // namespace blink |
OLD | NEW |