Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/rendering/RenderView.cpp

Issue 15219003: Move updateLayout() call from RenderLayer to RenderView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
ojan 2013/05/16 23:57:54 When does hit-testing in a child document trigger
cbiesinger 2013/05/17 00:17:04 Document::updateLayout calls updateLayout on its p
92 // that are higher up in the call stack, leading to crashes.
93 frameView()->updateLayoutAndStyleIfNeededRecursive();
90 return layer()->hitTest(request, location, result); 94 return layer()->hitTest(request, location, result);
91 } 95 }
92 96
93 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi calExtentComputedValues& computedValues) const 97 void RenderView::computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit, Logi calExtentComputedValues& computedValues) const
94 { 98 {
95 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo utUnit(viewLogicalHeight()) : logicalHeight; 99 computedValues.m_extent = (!shouldUsePrintingLayout() && m_frameView) ? Layo utUnit(viewLogicalHeight()) : logicalHeight;
96 } 100 }
97 101
98 void RenderView::updateLogicalWidth() 102 void RenderView::updateLogicalWidth()
99 { 103 {
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 #endif 1159 #endif
1156 1160
1157 if (layoutState) 1161 if (layoutState)
1158 layoutState->m_isPaginated = m_fragmenting; 1162 layoutState->m_isPaginated = m_fragmenting;
1159 1163
1160 if (m_flowThreadState != RenderObject::NotInsideFlowThread) 1164 if (m_flowThreadState != RenderObject::NotInsideFlowThread)
1161 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState); 1165 m_root->setFlowThreadStateIncludingDescendants(m_flowThreadState);
1162 } 1166 }
1163 1167
1164 } // namespace WebCore 1168 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderLayer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698