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

Side by Side Diff: Source/core/rendering/InlineTextBox.cpp

Issue 869813003: Implement elementsFromPoint (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix typeo Created 5 years, 11 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
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(RenderStyle* style, TextEmphasisPosi tion& emphasisPosition) const 332 bool InlineTextBox::getEmphasisMarkPosition(RenderStyle* style, TextEmphasisPosi tion& 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 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj); 547 printedCharacters = fprintf(stderr, "\t%s %p", obj.renderName(), &obj);
548 const int rendererCharacterOffset = 75; 548 const int rendererCharacterOffset = 75;
549 for (; printedCharacters < rendererCharacterOffset; printedCharacters++) 549 for (; printedCharacters < rendererCharacterOffset; printedCharacters++)
550 fputc(' ', stderr); 550 fputc(' ', stderr);
551 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata()); 551 fprintf(stderr, "(%d,%d) \"%s\"\n", start(), start() + len(), value.utf8().d ata());
552 } 552 }
553 553
554 #endif 554 #endif
555 555
556 } // namespace blink 556 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698