OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 m_hitTestCount++; | 89 m_hitTestCount++; |
90 | 90 |
91 ASSERT(!location.isRectBasedTest() || request.listBased()); | 91 ASSERT(!location.isRectBasedTest() || request.listBased()); |
92 | 92 |
93 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses | 93 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses |
94 // into a child document, it could trigger a layout on the parent document,
which can destroy DeprecatedPaintLayer | 94 // into a child document, it could trigger a layout on the parent document,
which can destroy DeprecatedPaintLayer |
95 // that are higher up in the call stack, leading to crashes. | 95 // that are higher up in the call stack, leading to crashes. |
96 // Note that Document::updateLayout calls its parent's updateLayout. | 96 // Note that Document::updateLayout calls its parent's updateLayout. |
97 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. | 97 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. |
98 frameView()->updateLayoutAndStyleIfNeededRecursive(); | 98 frameView()->updateLayoutAndStyleIfNeededRecursive(); |
| 99 compositor()->updateIfNeededRecursive(); |
99 commitPendingSelection(); | 100 commitPendingSelection(); |
100 | 101 |
101 bool hitLayer = layer()->hitTest(request, location, result); | 102 bool hitLayer = layer()->hitTest(request, location, result); |
102 | 103 |
103 // FrameView scrollbars are not the same as Layer scrollbars tested by Layer
::hitTestOverflowControls, | 104 // FrameView scrollbars are not the same as Layer scrollbars tested by Layer
::hitTestOverflowControls, |
104 // so we need to test FrameView scrollbars separately here. Note that it's i
mportant we do this after | 105 // so we need to test FrameView scrollbars separately here. Note that it's i
mportant we do this after |
105 // the hit test above, because that may overwrite the entire HitTestResult w
hen it finds a hit. | 106 // the hit test above, because that may overwrite the entire HitTestResult w
hen it finds a hit. |
106 IntPoint framePoint = frameView()->contentsToFrame(location.roundedPoint()); | 107 IntPoint framePoint = frameView()->contentsToFrame(location.roundedPoint()); |
107 if (Scrollbar* frameScrollbar = frameView()->scrollbarAtFramePoint(framePoin
t)) | 108 if (Scrollbar* frameScrollbar = frameView()->scrollbarAtFramePoint(framePoin
t)) |
108 result.setScrollbar(frameScrollbar); | 109 result.setScrollbar(frameScrollbar); |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
992 return viewHeight(IncludeScrollbars) / scale; | 993 return viewHeight(IncludeScrollbars) / scale; |
993 } | 994 } |
994 | 995 |
995 void LayoutView::willBeDestroyed() | 996 void LayoutView::willBeDestroyed() |
996 { | 997 { |
997 LayoutBlockFlow::willBeDestroyed(); | 998 LayoutBlockFlow::willBeDestroyed(); |
998 m_compositor.clear(); | 999 m_compositor.clear(); |
999 } | 1000 } |
1000 | 1001 |
1001 } // namespace blink | 1002 } // namespace blink |
OLD | NEW |