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

Side by Side Diff: Source/core/layout/line/InlineBox.cpp

Issue 944923004: rendering/RenderBoxModelObject -> layout/LayoutBoxModelObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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.h ('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 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 { 121 {
122 if (hasVirtualLogicalHeight()) 122 if (hasVirtualLogicalHeight())
123 return virtualLogicalHeight(); 123 return virtualLogicalHeight();
124 124
125 if (renderer().isText()) 125 if (renderer().isText())
126 return m_bitfields.isText() ? FloatWillBeLayoutUnit(renderer().style(isF irstLineStyle())->fontMetrics().height()) : FloatWillBeLayoutUnit(); 126 return m_bitfields.isText() ? FloatWillBeLayoutUnit(renderer().style(isF irstLineStyle())->fontMetrics().height()) : FloatWillBeLayoutUnit();
127 if (renderer().isBox() && parent()) 127 if (renderer().isBox() && parent())
128 return isHorizontal() ? toRenderBox(renderer()).size().height() : toRend erBox(renderer()).size().width(); 128 return isHorizontal() ? toRenderBox(renderer()).size().height() : toRend erBox(renderer()).size().width();
129 129
130 ASSERT(isInlineFlowBox()); 130 ASSERT(isInlineFlowBox());
131 RenderBoxModelObject* flowObject = boxModelObject(); 131 LayoutBoxModelObject* flowObject = boxModelObject();
132 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM etrics(); 132 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM etrics();
133 FloatWillBeLayoutUnit result = fontMetrics.height(); 133 FloatWillBeLayoutUnit result = fontMetrics.height();
134 if (parent()) 134 if (parent())
135 result += flowObject->borderAndPaddingLogicalHeight(); 135 result += flowObject->borderAndPaddingLogicalHeight();
136 return result; 136 return result;
137 } 137 }
138 138
139 int InlineBox::baselinePosition(FontBaseline baselineType) const 139 int InlineBox::baselinePosition(FontBaseline baselineType) const
140 { 140 {
141 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); 141 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 b->showTreeForThis(); 358 b->showTreeForThis();
359 } 359 }
360 360
361 void showLineTree(const blink::InlineBox* b) 361 void showLineTree(const blink::InlineBox* b)
362 { 362 {
363 if (b) 363 if (b)
364 b->showLineTreeForThis(); 364 b->showLineTreeForThis();
365 } 365 }
366 366
367 #endif 367 #endif
OLDNEW
« no previous file with comments | « Source/core/layout/line/InlineBox.h ('k') | Source/core/layout/line/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698