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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 { | 80 { |
81 } | 81 } |
82 | 82 |
83 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) | 83 bool RenderView::hitTest(const HitTestRequest& request, HitTestResult& result) |
84 { | 84 { |
85 return hitTest(request, result.hitTestLocation(), result); | 85 return hitTest(request, result.hitTestLocation(), result); |
86 } | 86 } |
87 | 87 |
88 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) | 88 bool RenderView::hitTest(const HitTestRequest& request, const HitTestLocation& l
ocation, HitTestResult& result) |
89 { | 89 { |
| 90 // We have to recursively update layout/style here because otherwise, when t
he hit test recurses |
| 91 // into a child document, it could trigger a layout on the parent document,
which can destroy RenderLayers |
| 92 // that are higher up in the call stack, leading to crashes. |
| 93 // Note that Document::updateLayout calls its parent's updateLayout. |
| 94 // FIXME: It should be the caller's responsibility to ensure an up-to-date l
ayout. |
| 95 frameView()->updateLayoutAndStyleIfNeededRecursive(); |
90 return layer()->hitTest(request, location, result); | 96 return layer()->hitTest(request, location, result); |
91 } | 97 } |
92 | 98 |
93 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const | 99 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi
calExtentComputedValues& computedValues) const |
94 { | 100 { |
95 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo
utUnit(viewLogicalHeight()) : logicalHeight; | 101 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo
utUnit(viewLogicalHeight()) : logicalHeight; |
96 } | 102 } |
97 | 103 |
98 void RenderView::updateLogicalWidth() | 104 void RenderView::updateLogicalWidth() |
99 { | 105 { |
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1155 #endif | 1161 #endif |
1156 | 1162 |
1157 if (layoutState) | 1163 if (layoutState) |
1158 layoutState->m_isPaginated = m_fragmenting; | 1164 layoutState->m_isPaginated = m_fragmenting; |
1159 | 1165 |
1160 if (m_flowThreadState != RenderObject::NotInsideFlowThread) | 1166 if (m_flowThreadState != RenderObject::NotInsideFlowThread) |
1161 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); | 1167 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); |
1162 } | 1168 } |
1163 | 1169 |
1164 } // namespace WebCore | 1170 } // namespace WebCore |
OLD | NEW |