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

Side by Side Diff: Source/core/layout/line/InlineTextBox.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/InlineFlowBox.cpp ('k') | Source/core/layout/svg/LayoutSVGRoot.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 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 if (isLineBreak()) 316 if (isLineBreak())
317 return false; 317 return false;
318 318
319 FloatPointWillBeLayoutPoint boxOrigin = locationIncludingFlipping(); 319 FloatPointWillBeLayoutPoint boxOrigin = locationIncludingFlipping();
320 boxOrigin.moveBy(accumulatedOffset); 320 boxOrigin.moveBy(accumulatedOffset);
321 FloatRectWillBeLayoutRect rect(boxOrigin, size()); 321 FloatRectWillBeLayoutRect rect(boxOrigin, size());
322 // FIXME: both calls to rawValue() below is temporary and should be removed once the transition 322 // FIXME: both calls to rawValue() below is temporary and should be removed once the transition
323 // to LayoutUnit-based types is complete (crbug.com/321237) 323 // to LayoutUnit-based types is complete (crbug.com/321237)
324 if (m_truncation != cFullTruncation && visibleToHitTestRequest(request) && l ocationInContainer.intersects(rect.rawValue())) { 324 if (m_truncation != cFullTruncation && visibleToHitTestRequest(request) && l ocationInContainer.intersects(rect.rawValue())) {
325 renderer().updateHitTestResult(result, flipForWritingMode(locationInCont ainer.point() - toLayoutSize(accumulatedOffset))); 325 renderer().updateHitTestResult(result, flipForWritingMode(locationInCont ainer.point() - toLayoutSize(accumulatedOffset)));
326 if (!result.addNodeToRectBasedTestResult(renderer().node(), request, loc ationInContainer, rect.rawValue())) 326 if (!result.addNodeToListBasedTestResult(renderer().node(), request, loc ationInContainer, rect.rawValue()))
327 return true; 327 return true;
328 } 328 }
329 return false; 329 return false;
330 } 330 }
331 331
332 bool InlineTextBox::getEmphasisMarkPosition(const LayoutStyle& style, TextEmphas isPosition& emphasisPosition) const 332 bool InlineTextBox::getEmphasisMarkPosition(const LayoutStyle& style, TextEmphas isPosition& emphasisPosition) const
333 { 333 {
334 // This function returns true if there are text emphasis marks and they are suppressed by ruby text. 334 // This function returns true if there are text emphasis marks and they are suppressed by ruby text.
335 if (style.textEmphasisMark() == TextEmphasisMarkNone) 335 if (style.textEmphasisMark() == TextEmphasisMarkNone)
336 return false; 336 return false;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 543 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
544 const int rendererCharacterOffset = 75; 544 const int rendererCharacterOffset = 75;
545 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 545 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
546 fputc(' ', stderr); 546 fputc(' ', stderr);
547 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 547 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
548 } 548 }
549 549
550 #endif 550 #endif
551 551
552 } // namespace blink 552 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineFlowBox.cpp ('k') | Source/core/layout/svg/LayoutSVGRoot.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698