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

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

Issue 1032823003: Refactor HitTestResult to store the HitTestRequest (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Updated as per review comments Created 5 years, 8 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
« no previous file with comments | « Source/core/layout/LayoutView.h ('k') | Source/core/layout/line/EllipsisBox.h » ('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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 71
72 setPreferredLogicalWidthsDirty(MarkOnlyThis); 72 setPreferredLogicalWidthsDirty(MarkOnlyThis);
73 73
74 setPositionState(AbsolutePosition); // to 0,0 :) 74 setPositionState(AbsolutePosition); // to 0,0 :)
75 } 75 }
76 76
77 LayoutView::~LayoutView() 77 LayoutView::~LayoutView()
78 { 78 {
79 } 79 }
80 80
81 bool LayoutView::hitTest(const HitTestRequest& request, HitTestResult& result) 81 bool LayoutView::hitTest(HitTestResult& result)
82 { 82 {
83 return hitTest(request, result.hitTestLocation(), result); 83 return hitTest(result.hitTestRequest(), result.hitTestLocation(), result);
84 } 84 }
85 85
86 bool LayoutView::hitTest(const HitTestRequest& request, const HitTestLocation& l ocation, HitTestResult& result) 86 bool LayoutView::hitTest(const HitTestRequest& request, const HitTestLocation& l ocation, HitTestResult& result)
87 { 87 {
88 TRACE_EVENT0("blink", "LayoutView::hitTest"); 88 TRACE_EVENT0("blink", "LayoutView::hitTest");
89 m_hitTestCount++; 89 m_hitTestCount++;
90 90
91 ASSERT(!location.isRectBasedTest() || request.listBased()); 91 ASSERT(!location.isRectBasedTest() || request.listBased());
92 92
93 // We have to recursively update layout/style here because otherwise, when t he hit test recurses 93 // We have to recursively update layout/style here because otherwise, when t he hit test recurses
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 return viewHeight(IncludeScrollbars) / scale; 957 return viewHeight(IncludeScrollbars) / scale;
958 } 958 }
959 959
960 void LayoutView::willBeDestroyed() 960 void LayoutView::willBeDestroyed()
961 { 961 {
962 LayoutBlockFlow::willBeDestroyed(); 962 LayoutBlockFlow::willBeDestroyed();
963 m_compositor.clear(); 963 m_compositor.clear();
964 } 964 }
965 965
966 } // namespace blink 966 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutView.h ('k') | Source/core/layout/line/EllipsisBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698