| 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 { | 95 { |
| 96 TRACE_EVENT0("blink", "RenderView::hitTest"); | 96 TRACE_EVENT0("blink", "RenderView::hitTest"); |
| 97 m_hitTestCount++; | 97 m_hitTestCount++; |
| 98 | 98 |
| 99 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses | 99 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses |
| 100 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers | 100 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers |
| 101 // that are higher up in the call stack, leading to crashes. | 101 // that are higher up in the call stack, leading to crashes. |
| 102 // Note that Document::updateLayout calls its parent's updateLayout. | 102 // Note that Document::updateLayout calls its parent's updateLayout. |
| 103 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. | 103 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. |
| 104 frameView()->updateLayoutAndStyleIfNeededRecursive(); | 104 frameView()->updateLayoutAndStyleIfNeededRecursive(); |
| 105 return layer()->hitTest(request, location, result); | 105 |
| 106 bool hitLayer = layer()->hitTest(request, location, result); |
| 107 |
| 108 // ScrollView scrollbars are not the same as RenderLayer scrollbars tested b
y RenderLayer::hitTestOverflowControls, |
| 109 // so we need to test ScrollView scrollbars separately here. |
| 110 if (Scrollbar* frameScrollbar = frameView()->scrollbarAtViewPoint(location.r
oundedPoint())) |
| 111 result.setScrollbar(frameScrollbar); |
| 112 |
| 113 return hitLayer; |
| 106 } | 114 } |
| 107 | 115 |
| 108 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const | 116 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const |
| 109 { | 117 { |
| 110 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo
utUnit(viewLogicalHeight()) : logicalHeight; | 118 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo
utUnit(viewLogicalHeight()) : logicalHeight; |
| 111 } | 119 } |
| 112 | 120 |
| 113 void RenderView::updateLogicalWidth() | 121 void RenderView::updateLogicalWidth() |
| 114 { | 122 { |
| 115 if (!shouldUsePrintingLayout() && m_frameView) | 123 if (!shouldUsePrintingLayout() && m_frameView) |
| (...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 return viewWidth(IncludeScrollbars) / scale; | 1010 return viewWidth(IncludeScrollbars) / scale; |
| 1003 } | 1011 } |
| 1004 | 1012 |
| 1005 double RenderView::layoutViewportHeight() const | 1013 double RenderView::layoutViewportHeight() const |
| 1006 { | 1014 { |
| 1007 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; | 1015 float scale = m_frameView ? m_frameView->frame().pageZoomFactor() : 1; |
| 1008 return viewHeight(IncludeScrollbars) / scale; | 1016 return viewHeight(IncludeScrollbars) / scale; |
| 1009 } | 1017 } |
| 1010 | 1018 |
| 1011 } // namespace blink | 1019 } // namespace blink |
| OLD | NEW |