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

Side by Side Diff: Source/core/rendering/InlineBox.cpp

Issue 351213002: Change RenderObject::style(bool) to accept an enum instead (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed enum to OwnOrFirstLineStyle, rebased and got rid of duplicate state on the stack in RootInl… Created 6 years, 5 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/InlineBox.h ('k') | Source/core/rendering/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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 RenderBoxModelObject* flowObject = boxModelObject(); 130 RenderBoxModelObject* flowObject = boxModelObject();
131 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM etrics(); 131 const FontMetrics& fontMetrics = renderer().style(isFirstLineStyle())->fontM etrics();
132 float result = fontMetrics.height(); 132 float result = fontMetrics.height();
133 if (parent()) 133 if (parent())
134 result += flowObject->borderAndPaddingLogicalHeight(); 134 result += flowObject->borderAndPaddingLogicalHeight();
135 return result; 135 return result;
136 } 136 }
137 137
138 int InlineBox::baselinePosition(FontBaseline baselineType) const 138 int InlineBox::baselinePosition(FontBaseline baselineType) const
139 { 139 {
140 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin e(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); 140 return boxModelObject()->baselinePosition(baselineType, m_bitfields.firstLin e() ? FirstLineStyle : OwnStyle, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine);
141 } 141 }
142 142
143 LayoutUnit InlineBox::lineHeight() const 143 LayoutUnit InlineBox::lineHeight() const
144 { 144 {
145 return boxModelObject()->lineHeight(m_bitfields.firstLine(), isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainingLine); 145 return boxModelObject()->lineHeight(m_bitfields.firstLine() ? FirstLineStyle : OwnStyle, isHorizontal() ? HorizontalLine : VerticalLine, PositionOnContainin gLine);
146 } 146 }
147 147
148 int InlineBox::caretMinOffset() const 148 int InlineBox::caretMinOffset() const
149 { 149 {
150 return renderer().caretMinOffset(); 150 return renderer().caretMinOffset();
151 } 151 }
152 152
153 int InlineBox::caretMaxOffset() const 153 int InlineBox::caretMaxOffset() const
154 { 154 {
155 return renderer().caretMaxOffset(); 155 return renderer().caretMaxOffset();
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 b->showTreeForThis(); 361 b->showTreeForThis();
362 } 362 }
363 363
364 void showLineTree(const WebCore::InlineBox* b) 364 void showLineTree(const WebCore::InlineBox* b)
365 { 365 {
366 if (b) 366 if (b)
367 b->showLineTreeForThis(); 367 b->showLineTreeForThis();
368 } 368 }
369 369
370 #endif 370 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineBox.h ('k') | Source/core/rendering/InlineFlowBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698