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

Side by Side Diff: Source/core/layout/LayoutView.cpp

Issue 1126883002: Change all one-off lifecycle callers to FrameView::updateLayoutAndStyleForPainting (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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/layout/LayoutThemeTest.cpp ('k') | Source/core/page/ContextMenuControllerTest.cpp » ('j') | 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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 TRACE_EVENT0("blink", "LayoutView::hitTest"); 86 TRACE_EVENT0("blink", "LayoutView::hitTest");
87 m_hitTestCount++; 87 m_hitTestCount++;
88 88
89 ASSERT(!location.isRectBasedTest() || request.listBased()); 89 ASSERT(!location.isRectBasedTest() || request.listBased());
90 90
91 // We have to recursively update layout/style here because otherwise, when t he hit test recurses 91 // We have to recursively update layout/style here because otherwise, when t he hit test recurses
92 // into a child document, it could trigger a layout on the parent document, which can destroy DeprecatedPaintLayer 92 // into a child document, it could trigger a layout on the parent document, which can destroy DeprecatedPaintLayer
93 // that are higher up in the call stack, leading to crashes. 93 // that are higher up in the call stack, leading to crashes.
94 // Note that Document::updateLayout calls its parent's updateLayout. 94 // Note that Document::updateLayout calls its parent's updateLayout.
95 // FIXME: It should be the caller's responsibility to ensure an up-to-date l ayout. 95 // FIXME: It should be the caller's responsibility to ensure an up-to-date l ayout.
96 frameView()->updateLayoutAndStyleIfNeededRecursive(); 96 frameView()->updateLayoutAndStyleForPainting();
97 commitPendingSelection(); 97 commitPendingSelection();
98 98
99 bool hitLayer = layer()->hitTest(request, location, result); 99 bool hitLayer = layer()->hitTest(request, location, result);
100 100
101 // FrameView scrollbars are not the same as Layer scrollbars tested by Layer ::hitTestOverflowControls, 101 // FrameView scrollbars are not the same as Layer scrollbars tested by Layer ::hitTestOverflowControls,
102 // so we need to test FrameView scrollbars separately here. Note that it's i mportant we do this after 102 // so we need to test FrameView scrollbars separately here. Note that it's i mportant we do this after
103 // the hit test above, because that may overwrite the entire HitTestResult w hen it finds a hit. 103 // the hit test above, because that may overwrite the entire HitTestResult w hen it finds a hit.
104 IntPoint framePoint = frameView()->contentsToFrame(location.roundedPoint()); 104 IntPoint framePoint = frameView()->contentsToFrame(location.roundedPoint());
105 if (Scrollbar* frameScrollbar = frameView()->scrollbarAtFramePoint(framePoin t)) 105 if (Scrollbar* frameScrollbar = frameView()->scrollbarAtFramePoint(framePoin t))
106 result.setScrollbar(frameScrollbar); 106 result.setScrollbar(frameScrollbar);
(...skipping 836 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 return viewHeight(IncludeScrollbars) / scale; 943 return viewHeight(IncludeScrollbars) / scale;
944 } 944 }
945 945
946 void LayoutView::willBeDestroyed() 946 void LayoutView::willBeDestroyed()
947 { 947 {
948 LayoutBlockFlow::willBeDestroyed(); 948 LayoutBlockFlow::willBeDestroyed();
949 m_compositor.clear(); 949 m_compositor.clear();
950 } 950 }
951 951
952 } // namespace blink 952 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutThemeTest.cpp ('k') | Source/core/page/ContextMenuControllerTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698