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

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

Issue 869813003: Implement elementsFromPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Cleanup, add a better test for tables Created 5 years, 10 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/LayoutImage.cpp ('k') | Source/core/layout/LayoutTable.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 * (C) 2000 Simon Hausmann <hausmann@kde.org> 3 * (C) 2000 Simon Hausmann <hausmann@kde.org>
4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de)
5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2009 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2011. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2011. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 if (visibleToHitTestRequest(request) && childRoot) { 156 if (visibleToHitTestRequest(request) && childRoot) {
157 LayoutPoint adjustedLocation = accumulatedOffset + location(); 157 LayoutPoint adjustedLocation = accumulatedOffset + location();
158 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), bo rderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset()); 158 LayoutPoint contentOffset = LayoutPoint(borderLeft() + paddingLeft(), bo rderTop() + paddingTop()) - LayoutSize(childFrameView->scrollOffset());
159 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocatio n - contentOffset); 159 HitTestLocation newHitTestLocation(locationInContainer, -adjustedLocatio n - contentOffset);
160 HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildF rameHitTest); 160 HitTestRequest newHitTestRequest(request.type() | HitTestRequest::ChildF rameHitTest);
161 HitTestResult childFrameResult(newHitTestLocation); 161 HitTestResult childFrameResult(newHitTestLocation);
162 162
163 bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTe stLocation, childFrameResult); 163 bool isInsideChildFrame = childRoot->hitTest(newHitTestRequest, newHitTe stLocation, childFrameResult);
164 164
165 if (newHitTestLocation.isRectBasedTest()) 165 if (request.listBased())
166 result.append(childFrameResult); 166 result.append(childFrameResult, request);
167 else if (isInsideChildFrame) 167 else if (isInsideChildFrame)
168 result = childFrameResult; 168 result = childFrameResult;
169 169
170 if (isInsideChildFrame) 170 if (isInsideChildFrame)
171 return true; 171 return true;
172 } 172 }
173 173
174 return nodeAtPointOverWidget(request, result, locationInContainer, accumulat edOffset, action); 174 return nodeAtPointOverWidget(request, result, locationInContainer, accumulat edOffset, action);
175 } 175 }
176 176
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 if (widget->frameRect() == newFrame) 309 if (widget->frameRect() == newFrame)
310 return false; 310 return false;
311 311
312 RefPtrWillBeRawPtr<LayoutPart> protector(this); 312 RefPtrWillBeRawPtr<LayoutPart> protector(this);
313 RefPtrWillBeRawPtr<Node> protectedNode(node()); 313 RefPtrWillBeRawPtr<Node> protectedNode(node());
314 widget->setFrameRect(newFrame); 314 widget->setFrameRect(newFrame);
315 return widget->frameRect().size() != newFrame.size(); 315 return widget->frameRect().size() != newFrame.size();
316 } 316 }
317 317
318 } 318 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutImage.cpp ('k') | Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698