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

Side by Side Diff: Source/core/layout/line/InlineFlowBox.h

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/layout/line/InlineBox.cpp ('k') | Source/core/layout/line/InlineFlowBox.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, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 LayoutUnit marginLogicalRight() const 136 LayoutUnit marginLogicalRight() const
137 { 137 {
138 if (!includeLogicalRightEdge()) 138 if (!includeLogicalRightEdge())
139 return 0; 139 return 0;
140 return isHorizontal() ? boxModelObject()->marginRight() : boxModelObject ()->marginBottom(); 140 return isHorizontal() ? boxModelObject()->marginRight() : boxModelObject ()->marginBottom();
141 } 141 }
142 int borderLogicalLeft() const 142 int borderLogicalLeft() const
143 { 143 {
144 if (!includeLogicalLeftEdge()) 144 if (!includeLogicalLeftEdge())
145 return 0; 145 return 0;
146 return isHorizontal() ? renderer().style(isFirstLineStyle())->borderLeft Width() : renderer().style(isFirstLineStyle())->borderTopWidth(); 146 return isHorizontal() ? layoutObject().style(isFirstLineStyle())->border LeftWidth() : layoutObject().style(isFirstLineStyle())->borderTopWidth();
147 } 147 }
148 int borderLogicalRight() const 148 int borderLogicalRight() const
149 { 149 {
150 if (!includeLogicalRightEdge()) 150 if (!includeLogicalRightEdge())
151 return 0; 151 return 0;
152 return isHorizontal() ? renderer().style(isFirstLineStyle())->borderRigh tWidth() : renderer().style(isFirstLineStyle())->borderBottomWidth(); 152 return isHorizontal() ? layoutObject().style(isFirstLineStyle())->border RightWidth() : layoutObject().style(isFirstLineStyle())->borderBottomWidth();
153 } 153 }
154 int paddingLogicalLeft() const 154 int paddingLogicalLeft() const
155 { 155 {
156 if (!includeLogicalLeftEdge()) 156 if (!includeLogicalLeftEdge())
157 return 0; 157 return 0;
158 return isHorizontal() ? boxModelObject()->paddingLeft() : boxModelObject ()->paddingTop(); 158 return isHorizontal() ? boxModelObject()->paddingLeft() : boxModelObject ()->paddingTop();
159 } 159 }
160 int paddingLogicalRight() const 160 int paddingLogicalRight() const
161 { 161 {
162 if (!includeLogicalRightEdge()) 162 if (!includeLogicalRightEdge())
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 } 228 }
229 LayoutUnit logicalBottomLayoutOverflow(LayoutUnit lineBottom) const 229 LayoutUnit logicalBottomLayoutOverflow(LayoutUnit lineBottom) const
230 { 230 {
231 if (m_overflow) 231 if (m_overflow)
232 return isHorizontal() ? m_overflow->layoutOverflowRect().maxY() : m_ overflow->layoutOverflowRect().maxX(); 232 return isHorizontal() ? m_overflow->layoutOverflowRect().maxY() : m_ overflow->layoutOverflowRect().maxX();
233 return lineBottom; 233 return lineBottom;
234 } 234 }
235 LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott om) const 235 LayoutRect logicalLayoutOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott om) const
236 { 236 {
237 LayoutRect result = layoutOverflowRect(lineTop, lineBottom); 237 LayoutRect result = layoutOverflowRect(lineTop, lineBottom);
238 if (!renderer().isHorizontalWritingMode()) 238 if (!layoutObject().isHorizontalWritingMode())
239 result = result.transposedRect(); 239 result = result.transposedRect();
240 return result; 240 return result;
241 } 241 }
242 242
243 LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) con st 243 LayoutRect visualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBottom) con st
244 { 244 {
245 // FIXME: the call to enclosingLayoutRect() below is temporary and shoul d be removed once 245 // FIXME: the call to enclosingLayoutRect() below is temporary and shoul d be removed once
246 // the transition to LayoutUnit-based types is complete (crbug.com/32123 7) 246 // the transition to LayoutUnit-based types is complete (crbug.com/32123 7)
247 return m_overflow ? m_overflow->visualOverflowRect() : frameRectIncludin gLineHeight(lineTop, lineBottom).enclosingLayoutRect(); 247 return m_overflow ? m_overflow->visualOverflowRect() : frameRectIncludin gLineHeight(lineTop, lineBottom).enclosingLayoutRect();
248 } 248 }
249 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizo ntal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect() .y()) : logicalLeft().toLayoutUnit(); } 249 LayoutUnit logicalLeftVisualOverflow() const { return m_overflow ? (isHorizo ntal() ? m_overflow->visualOverflowRect().x() : m_overflow->visualOverflowRect() .y()) : logicalLeft().toLayoutUnit(); }
250 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHoriz ontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRe ct().maxY()) : static_cast<LayoutUnit>(ceilf(logicalRight())); } 250 LayoutUnit logicalRightVisualOverflow() const { return m_overflow ? (isHoriz ontal() ? m_overflow->visualOverflowRect().maxX() : m_overflow->visualOverflowRe ct().maxY()) : static_cast<LayoutUnit>(ceilf(logicalRight())); }
251 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const 251 LayoutUnit logicalTopVisualOverflow(LayoutUnit lineTop) const
252 { 252 {
253 if (m_overflow) 253 if (m_overflow)
254 return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_ove rflow->visualOverflowRect().x(); 254 return isHorizontal() ? m_overflow->visualOverflowRect().y() : m_ove rflow->visualOverflowRect().x();
255 return lineTop; 255 return lineTop;
256 } 256 }
257 LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const 257 LayoutUnit logicalBottomVisualOverflow(LayoutUnit lineBottom) const
258 { 258 {
259 if (m_overflow) 259 if (m_overflow)
260 return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_ overflow->visualOverflowRect().maxX(); 260 return isHorizontal() ? m_overflow->visualOverflowRect().maxY() : m_ overflow->visualOverflowRect().maxX();
261 return lineBottom; 261 return lineBottom;
262 } 262 }
263 LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott om) const 263 LayoutRect logicalVisualOverflowRect(LayoutUnit lineTop, LayoutUnit lineBott om) const
264 { 264 {
265 LayoutRect result = visualOverflowRect(lineTop, lineBottom); 265 LayoutRect result = visualOverflowRect(lineTop, lineBottom);
266 if (!renderer().isHorizontalWritingMode()) 266 if (!layoutObject().isHorizontalWritingMode())
267 result = result.transposedRect(); 267 result = result.transposedRect();
268 return result; 268 return result;
269 } 269 }
270 270
271 void setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, co nst LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom ); 271 void setOverflowFromLogicalRects(const LayoutRect& logicalLayoutOverflow, co nst LayoutRect& logicalVisualOverflow, LayoutUnit lineTop, LayoutUnit lineBottom );
272 272
273 FloatRectWillBeLayoutRect frameRectIncludingLineHeight(LayoutUnit lineTop, L ayoutUnit lineBottom) const 273 FloatRectWillBeLayoutRect frameRectIncludingLineHeight(LayoutUnit lineTop, L ayoutUnit lineBottom) const
274 { 274 {
275 if (isHorizontal()) 275 if (isHorizontal())
276 return FloatRectWillBeLayoutRect(m_topLeft.x(), lineTop.toFloat(), w idth(), (lineBottom - lineTop).toFloat()); 276 return FloatRectWillBeLayoutRect(m_topLeft.x(), lineTop.toFloat(), w idth(), (lineBottom - lineTop).toFloat());
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 } 365 }
366 366
367 } // namespace blink 367 } // namespace blink
368 368
369 #ifndef NDEBUG 369 #ifndef NDEBUG
370 // Outside the WebCore namespace for ease of invocation from gdb. 370 // Outside the WebCore namespace for ease of invocation from gdb.
371 void showTree(const blink::InlineFlowBox*); 371 void showTree(const blink::InlineFlowBox*);
372 #endif 372 #endif
373 373
374 #endif // InlineFlowBox_h 374 #endif // InlineFlowBox_h
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineBox.cpp ('k') | Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698