| 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) | 88 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) |
| 89 { | 89 { |
| 90 return hitTest(request, result.hitTestLocation(), result); | 90 return hitTest(request, result.hitTestLocation(), result); |
| 91 } | 91 } |
| 92 | 92 |
| 93 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) | 93 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) |
| 94 { | 94 { |
| 95 TRACE_EVENT0("blink", "RenderView::hitTest"); | 95 TRACE_EVENT0("blink", "RenderView::hitTest"); |
| 96 m_hitTestCount++; | 96 m_hitTestCount++; |
| 97 | 97 |
| 98 ASSERT(!location.isRectBasedTest() || request.listBased()); |
| 99 |
| 98 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses | 100 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses |
| 99 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers | 101 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers |
| 100 // that are higher up in the call stack, leading to crashes. | 102 // that are higher up in the call stack, leading to crashes. |
| 101 // Note that Document::updateLayout calls its parent's updateLayout. | 103 // Note that Document::updateLayout calls its parent's updateLayout. |
| 102 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. | 104 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. |
| 103 frameView()->updateLayoutAndStyleIfNeededRecursive(); | 105 frameView()->updateLayoutAndStyleIfNeededRecursive(); |
| 104 commitPendingSelection(); | 106 commitPendingSelection(); |
| 105 | 107 |
| 106 bool hitLayer = layer()->hitTest(request, location, result); | 108 bool hitLayer = layer()->hitTest(request, location, result); |
| 107 | 109 |
| (...skipping 867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 975 return viewWidth(IncludeScrollbars) / scale; | 977 return viewWidth(IncludeScrollbars) / scale; |
| 976 } | 978 } |
| 977 | 979 |
| 978 double RenderView::layoutViewportHeight() const | 980 double RenderView::layoutViewportHeight() const |
| 979 { | 981 { |
| 980 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 982 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 981 return viewHeight(IncludeScrollbars) / scale; | 983 return viewHeight(IncludeScrollbars) / scale; |
| 982 } | 984 } |
| 983 | 985 |
| 984 } // namespace blink | 986 } // namespace blink |
| OLD | NEW |