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

Side by Side Diff: third_party/WebKit/Source/core/layout/line/EllipsisBox.cpp

Issue 2393693002: Reformat comments in core/layout/line (Closed)
Patch Set: Created 4 years, 2 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 * Copyright (C) 2003, 2006 Apple Computer, Inc. 2 * Copyright (C) 2003, 2006 Apple Computer, Inc.
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 IntPoint(logicalLeft().toInt(), 45 IntPoint(logicalLeft().toInt(),
46 (logicalTop() + root().selectionTop()).toInt()), 46 (logicalTop() + root().selectionTop()).toInt()),
47 root().selectionHeight().toInt())); 47 root().selectionHeight().toInt()));
48 } 48 }
49 49
50 bool EllipsisBox::nodeAtPoint(HitTestResult& result, 50 bool EllipsisBox::nodeAtPoint(HitTestResult& result,
51 const HitTestLocation& locationInContainer, 51 const HitTestLocation& locationInContainer,
52 const LayoutPoint& accumulatedOffset, 52 const LayoutPoint& accumulatedOffset,
53 LayoutUnit lineTop, 53 LayoutUnit lineTop,
54 LayoutUnit lineBottom) { 54 LayoutUnit lineBottom) {
55 // FIXME: the call to roundedLayoutPoint() below is temporary and should be re moved once
56 // the transition to LayoutUnit-based types is complete (crbug.com/321237)
57 LayoutPoint adjustedLocation = accumulatedOffset + topLeft(); 55 LayoutPoint adjustedLocation = accumulatedOffset + topLeft();
58 56
59 LayoutPoint boxOrigin = locationIncludingFlipping(); 57 LayoutPoint boxOrigin = locationIncludingFlipping();
60 boxOrigin.moveBy(accumulatedOffset); 58 boxOrigin.moveBy(accumulatedOffset);
61 LayoutRect boundsRect(boxOrigin, size()); 59 LayoutRect boundsRect(boxOrigin, size());
62 if (visibleToHitTestRequest(result.hitTestRequest()) && 60 if (visibleToHitTestRequest(result.hitTestRequest()) &&
63 boundsRect.intersects(LayoutRect(HitTestLocation::rectForPoint( 61 boundsRect.intersects(LayoutRect(HitTestLocation::rectForPoint(
64 locationInContainer.point(), 0, 0, 0, 0)))) { 62 locationInContainer.point(), 0, 0, 0, 0)))) {
65 getLineLayoutItem().updateHitTestResult( 63 getLineLayoutItem().updateHitTestResult(
66 result, locationInContainer.point() - toLayoutSize(adjustedLocation)); 64 result, locationInContainer.point() - toLayoutSize(adjustedLocation));
67 if (result.addNodeToListBasedTestResult(getLineLayoutItem().node(), 65 if (result.addNodeToListBasedTestResult(getLineLayoutItem().node(),
68 locationInContainer, 66 locationInContainer,
69 boundsRect) == StopHitTesting) 67 boundsRect) == StopHitTesting)
70 return true; 68 return true;
71 } 69 }
72 70
73 return false; 71 return false;
74 } 72 }
75 73
76 const char* EllipsisBox::boxName() const { 74 const char* EllipsisBox::boxName() const {
77 return "EllipsisBox"; 75 return "EllipsisBox";
78 } 76 }
79 77
80 } // namespace blink 78 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698