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

Side by Side Diff: Source/core/rendering/RenderBox.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/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderInline.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) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1130 matching lines...) Expand 10 before | Expand all | Expand 10 after
1141 return true; 1141 return true;
1142 } 1142 }
1143 } 1143 }
1144 1144
1145 // Check our bounds next. For this purpose always assume that we can only be hit in the 1145 // Check our bounds next. For this purpose always assume that we can only be hit in the
1146 // foreground phase (which is true for replaced elements like images). 1146 // foreground phase (which is true for replaced elements like images).
1147 LayoutRect boundsRect = borderBoxRect(); 1147 LayoutRect boundsRect = borderBoxRect();
1148 boundsRect.moveBy(adjustedLocation); 1148 boundsRect.moveBy(adjustedLocation);
1149 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat ionInContainer.intersects(boundsRect)) { 1149 if (visibleToHitTestRequest(request) && action == HitTestForeground && locat ionInContainer.intersects(boundsRect)) {
1150 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a djustedLocation)); 1150 updateHitTestResult(result, locationInContainer.point() - toLayoutSize(a djustedLocation));
1151 if (!result.addNodeToRectBasedTestResult(node(), request, locationInCont ainer, boundsRect)) 1151 if (!result.addNodeToListBasedTestResult(node(), request, locationInCont ainer, boundsRect))
1152 return true; 1152 return true;
1153 } 1153 }
1154 1154
1155 return false; 1155 return false;
1156 } 1156 }
1157 1157
1158 void RenderBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset ) 1158 void RenderBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffset )
1159 { 1159 {
1160 BoxPainter(*this).paint(paintInfo, paintOffset); 1160 BoxPainter(*this).paint(paintInfo, paintOffset);
1161 } 1161 }
(...skipping 3443 matching lines...) Expand 10 before | Expand all | Expand 10 after
4605 } 4605 }
4606 4606
4607 void RenderBox::invalidateDisplayItemClients(DisplayItemList* displayItemList) c onst 4607 void RenderBox::invalidateDisplayItemClients(DisplayItemList* displayItemList) c onst
4608 { 4608 {
4609 RenderBoxModelObject::invalidateDisplayItemClients(displayItemList); 4609 RenderBoxModelObject::invalidateDisplayItemClients(displayItemList);
4610 if (LayerScrollableArea* area = scrollableArea()) 4610 if (LayerScrollableArea* area = scrollableArea())
4611 displayItemList->invalidate(area->displayItemClient()); 4611 displayItemList->invalidate(area->displayItemClient());
4612 } 4612 }
4613 4613
4614 } // namespace blink 4614 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBlock.cpp ('k') | Source/core/rendering/RenderInline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698