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

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

Issue 1741073002: Rename enums/functions that collide in chromium style in core/layout/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@get-names-6
Patch Set: get-names-7: rebase Created 4 years, 9 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 19 matching lines...) Expand all
30 30
31 namespace blink { 31 namespace blink {
32 32
33 void EllipsisBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs et, LayoutUnit lineTop, LayoutUnit lineBottom) const 33 void EllipsisBox::paint(const PaintInfo& paintInfo, const LayoutPoint& paintOffs et, LayoutUnit lineTop, LayoutUnit lineBottom) const
34 { 34 {
35 EllipsisBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBottom) ; 35 EllipsisBoxPainter(*this).paint(paintInfo, paintOffset, lineTop, lineBottom) ;
36 } 36 }
37 37
38 IntRect EllipsisBox::selectionRect() const 38 IntRect EllipsisBox::selectionRect() const
39 { 39 {
40 const ComputedStyle& style = lineLayoutItem().styleRef(isFirstLineStyle()); 40 const ComputedStyle& style = getLineLayoutItem().styleRef(isFirstLineStyle() );
41 const Font& font = style.font(); 41 const Font& font = style.font();
42 return enclosingIntRect(font.selectionRectForText(constructTextRun(font, m_s tr, style, TextRun::AllowTrailingExpansion), IntPoint(logicalLeft(), logicalTop( ) + root().selectionTop()), root().selectionHeight())); 42 return enclosingIntRect(font.selectionRectForText(constructTextRun(font, m_s tr, style, TextRun::AllowTrailingExpansion), IntPoint(logicalLeft(), logicalTop( ) + root().selectionTop()), root().selectionHeight()));
43 } 43 }
44 44
45 bool EllipsisBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca tionInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, Layou tUnit lineBottom) 45 bool EllipsisBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& loca tionInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, Layou tUnit lineBottom)
46 { 46 {
47 // FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once 47 // FIXME: the call to roundedLayoutPoint() below is temporary and should be removed once
48 // the transition to LayoutUnit-based types is complete (crbug.com/321237) 48 // the transition to LayoutUnit-based types is complete (crbug.com/321237)
49 LayoutPoint adjustedLocation = accumulatedOffset + topLeft(); 49 LayoutPoint adjustedLocation = accumulatedOffset + topLeft();
50 50
51 LayoutPoint boxOrigin = locationIncludingFlipping(); 51 LayoutPoint boxOrigin = locationIncludingFlipping();
52 boxOrigin.moveBy(accumulatedOffset); 52 boxOrigin.moveBy(accumulatedOffset);
53 LayoutRect boundsRect(boxOrigin, size()); 53 LayoutRect boundsRect(boxOrigin, size());
54 if (visibleToHitTestRequest(result.hitTestRequest()) && boundsRect.intersect s(LayoutRect(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0)))) { 54 if (visibleToHitTestRequest(result.hitTestRequest()) && boundsRect.intersect s(LayoutRect(HitTestLocation::rectForPoint(locationInContainer.point(), 0, 0, 0, 0)))) {
55 lineLayoutItem().updateHitTestResult(result, locationInContainer.point() - toLayoutSize(adjustedLocation)); 55 getLineLayoutItem().updateHitTestResult(result, locationInContainer.poin t() - toLayoutSize(adjustedLocation));
56 if (result.addNodeToListBasedTestResult(lineLayoutItem().node(), locatio nInContainer, boundsRect) == StopHitTesting) 56 if (result.addNodeToListBasedTestResult(getLineLayoutItem().node(), loca tionInContainer, boundsRect) == StopHitTesting)
57 return true; 57 return true;
58 } 58 }
59 59
60 return false; 60 return false;
61 } 61 }
62 62
63 const char* EllipsisBox::boxName() const 63 const char* EllipsisBox::boxName() const
64 { 64 {
65 return "EllipsisBox"; 65 return "EllipsisBox";
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/line/EllipsisBox.h ('k') | third_party/WebKit/Source/core/layout/line/InlineBox.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698