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

Side by Side Diff: Source/core/layout/LayoutTable.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/LayoutPart.cpp ('k') | Source/core/layout/LayoutTableSection.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) 1997 Martin Jones (mjones@kde.org) 2 * Copyright (C) 1997 Martin Jones (mjones@kde.org)
3 * (C) 1997 Torben Weis (weis@kde.org) 3 * (C) 1997 Torben Weis (weis@kde.org)
4 * (C) 1998 Waldo Bastian (bastian@kde.org) 4 * (C) 1998 Waldo Bastian (bastian@kde.org)
5 * (C) 1999 Lars Knoll (knoll@kde.org) 5 * (C) 1999 Lars Knoll (knoll@kde.org)
6 * (C) 1999 Antti Koivisto (koivisto@kde.org) 6 * (C) 1999 Antti Koivisto (koivisto@kde.org)
7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved. 7 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2013 Apple Inc. All rights reserved.
8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * Copyright (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1310 matching lines...) Expand 10 before | Expand all | Expand 10 after
1321 return true; 1321 return true;
1322 } 1322 }
1323 } 1323 }
1324 } 1324 }
1325 } 1325 }
1326 1326
1327 // Check our bounds next. 1327 // Check our bounds next.
1328 LayoutRect boundsRect(adjustedLocation, size()); 1328 LayoutRect boundsRect(adjustedLocation, size());
1329 if (visibleToHitTestRequest(request) && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && locationInContainer.intersects(bounds Rect)) { 1329 if (visibleToHitTestRequest(request) && (action == HitTestBlockBackground || action == HitTestChildBlockBackground) && locationInContainer.intersects(bounds Rect)) {
1330 updateHitTestResult(result, flipForWritingMode(locationInContainer.point () - toLayoutSize(adjustedLocation))); 1330 updateHitTestResult(result, flipForWritingMode(locationInContainer.point () - toLayoutSize(adjustedLocation)));
1331 if (!result.addNodeToRectBasedTestResult(node(), request, locationInCont ainer, boundsRect)) 1331 if (!result.addNodeToListBasedTestResult(node(), request, locationInCont ainer, boundsRect))
1332 return true; 1332 return true;
1333 } 1333 }
1334 1334
1335 return false; 1335 return false;
1336 } 1336 }
1337 1337
1338 LayoutTable* LayoutTable::createAnonymousWithParentRenderer(const LayoutObject* parent) 1338 LayoutTable* LayoutTable::createAnonymousWithParentRenderer(const LayoutObject* parent)
1339 { 1339 {
1340 RefPtr<LayoutStyle> newStyle = LayoutStyle::createAnonymousStyleWithDisplay( parent->styleRef(), TABLE); 1340 RefPtr<LayoutStyle> newStyle = LayoutStyle::createAnonymousStyleWithDisplay( parent->styleRef(), TABLE);
1341 LayoutTable* newTable = new LayoutTable(0); 1341 LayoutTable* newTable = new LayoutTable(0);
(...skipping 14 matching lines...) Expand all
1356 const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(const LayoutTableCel l* cell) const 1356 const BorderValue& LayoutTable::tableEndBorderAdjoiningCell(const LayoutTableCel l* cell) const
1357 { 1357 {
1358 ASSERT(cell->isFirstOrLastCellInRow()); 1358 ASSERT(cell->isFirstOrLastCellInRow());
1359 if (hasSameDirectionAs(cell->row())) 1359 if (hasSameDirectionAs(cell->row()))
1360 return style()->borderEnd(); 1360 return style()->borderEnd();
1361 1361
1362 return style()->borderStart(); 1362 return style()->borderStart();
1363 } 1363 }
1364 1364
1365 } 1365 }
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutPart.cpp ('k') | Source/core/layout/LayoutTableSection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698