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

Side by Side Diff: Source/core/rendering/RootInlineBox.h

Issue 630093005: Move paint code from RootInlineBox and EllipsisBox to RootInlineBoxPainter and EllipsisBoxPainter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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
« no previous file with comments | « Source/core/rendering/EllipsisBox.cpp ('k') | Source/core/rendering/RootInlineBox.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, 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2006, 2007, 2008 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 bool lineCanAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, in t ellipsisWidth); 98 bool lineCanAccommodateEllipsis(bool ltr, int blockEdge, int lineBoxEdge, in t ellipsisWidth);
99 // Return the truncatedWidth, the width of the truncated text + ellipsis. 99 // Return the truncatedWidth, the width of the truncated text + ellipsis.
100 float placeEllipsis(const AtomicString& ellipsisStr, bool ltr, float blockLe ftEdge, float blockRightEdge, float ellipsisWidth, InlineBox* markupBox = 0); 100 float placeEllipsis(const AtomicString& ellipsisStr, bool ltr, float blockLe ftEdge, float blockRightEdge, float ellipsisWidth, InlineBox* markupBox = 0);
101 // Return the position of the EllipsisBox or -1. 101 // Return the position of the EllipsisBox or -1.
102 virtual float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRig htEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) OVERRIDE FIN AL; 102 virtual float placeEllipsisBox(bool ltr, float blockLeftEdge, float blockRig htEdge, float ellipsisWidth, float &truncatedWidth, bool& foundBox) OVERRIDE FIN AL;
103 103
104 using InlineBox::hasEllipsisBox; 104 using InlineBox::hasEllipsisBox;
105 EllipsisBox* ellipsisBox() const; 105 EllipsisBox* ellipsisBox() const;
106 106
107 void paintEllipsisBox(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, La youtUnit lineBottom) const;
108
109 virtual void clearTruncation() OVERRIDE FINAL; 107 virtual void clearTruncation() OVERRIDE FINAL;
110 108
111 virtual int baselinePosition(FontBaseline baselineType) const OVERRIDE FINAL ; 109 virtual int baselinePosition(FontBaseline baselineType) const OVERRIDE FINAL ;
112 virtual LayoutUnit lineHeight() const OVERRIDE FINAL; 110 virtual LayoutUnit lineHeight() const OVERRIDE FINAL;
113 111
114 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou tUnit lineBottom) OVERRIDE; 112 virtual void paint(PaintInfo&, const LayoutPoint&, LayoutUnit lineTop, Layou tUnit lineBottom) OVERRIDE;
115 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) OVERRIDE FINAL; 113 virtual bool nodeAtPoint(const HitTestRequest&, HitTestResult&, const HitTes tLocation& locationInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit lineTop, LayoutUnit lineBottom) OVERRIDE FINAL;
116 114
117 using InlineBox::hasSelectedChildren; 115 using InlineBox::hasSelectedChildren;
118 using InlineBox::setHasSelectedChildren; 116 using InlineBox::setHasSelectedChildren;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
230 LayoutUnit m_lineTop; 228 LayoutUnit m_lineTop;
231 LayoutUnit m_lineBottom; 229 LayoutUnit m_lineBottom;
232 LayoutUnit m_lineTopWithLeading; 230 LayoutUnit m_lineTopWithLeading;
233 LayoutUnit m_lineBottomWithLeading; 231 LayoutUnit m_lineBottomWithLeading;
234 LayoutUnit m_selectionBottom; 232 LayoutUnit m_selectionBottom;
235 }; 233 };
236 234
237 } // namespace blink 235 } // namespace blink
238 236
239 #endif // RootInlineBox_h 237 #endif // RootInlineBox_h
OLDNEW
« no previous file with comments | « Source/core/rendering/EllipsisBox.cpp ('k') | Source/core/rendering/RootInlineBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698