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

Side by Side Diff: Source/core/layout/line/InlineFlowBox.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/line/EllipsisBox.cpp ('k') | Source/core/layout/line/InlineTextBox.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) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * This library is free software; you can redistribute it and/or 4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public 5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either 6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version. 7 * version 2 of the License, or (at your option) any later version.
8 * 8 *
9 * This library is distributed in the hope that it will be useful, 9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after
1064 logicalHeight = bottom - top; 1064 logicalHeight = bottom - top;
1065 } 1065 }
1066 1066
1067 // Move x/y to our coordinates. 1067 // Move x/y to our coordinates.
1068 LayoutRect rect(minX, minY, width, height); 1068 LayoutRect rect(minX, minY, width, height);
1069 flipForWritingMode(rect); 1069 flipForWritingMode(rect);
1070 rect.moveBy(accumulatedOffset); 1070 rect.moveBy(accumulatedOffset);
1071 1071
1072 if (visibleToHitTestRequest(request) && locationInContainer.intersects(rect) ) { 1072 if (visibleToHitTestRequest(request) && locationInContainer.intersects(rect) ) {
1073 renderer().updateHitTestResult(result, flipForWritingMode(locationInCont ainer.point() - toLayoutSize(accumulatedOffset))); // Don't add in m_x or m_y he re, we want coords in the containing block's space. 1073 renderer().updateHitTestResult(result, flipForWritingMode(locationInCont ainer.point() - toLayoutSize(accumulatedOffset))); // Don't add in m_x or m_y he re, we want coords in the containing block's space.
1074 if (!result.addNodeToRectBasedTestResult(renderer().node(), request, loc ationInContainer, rect)) 1074 if (!result.addNodeToListBasedTestResult(renderer().node(), request, loc ationInContainer, rect))
1075 return true; 1075 return true;
1076 } 1076 }
1077 1077
1078 return false; 1078 return false;
1079 } 1079 }
1080 1080
1081 void InlineFlowBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf fset, LayoutUnit lineTop, LayoutUnit lineBottom) 1081 void InlineFlowBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOf fset, LayoutUnit lineTop, LayoutUnit lineBottom)
1082 { 1082 {
1083 InlineFlowBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBotto m); 1083 InlineFlowBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBotto m);
1084 } 1084 }
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 ASSERT(child->prevOnLine() == prev); 1333 ASSERT(child->prevOnLine() == prev);
1334 prev = child; 1334 prev = child;
1335 } 1335 }
1336 ASSERT(prev == m_lastChild); 1336 ASSERT(prev == m_lastChild);
1337 #endif 1337 #endif
1338 } 1338 }
1339 1339
1340 #endif 1340 #endif
1341 1341
1342 } // namespace blink 1342 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/line/EllipsisBox.cpp ('k') | Source/core/layout/line/InlineTextBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698