| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
| 5 * | 5 * |
| 6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
| 7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
| 8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
| 9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
| 10 * | 10 * |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 bool checkFonts = document().inNoQuirksMode(); | 209 bool checkFonts = document().inNoQuirksMode(); |
| 210 RenderFlowThread* flowThread = flowThreadContainingBlock(); | 210 RenderFlowThread* flowThread = flowThreadContainingBlock(); |
| 211 bool alwaysCreateLineBoxes = (parentRenderInline && parentRenderInline->alwa
ysCreateLineBoxes()) | 211 bool alwaysCreateLineBoxes = (parentRenderInline && parentRenderInline->alwa
ysCreateLineBoxes()) |
| 212 || (parentRenderInline && parentStyle->verticalAlign() != BASELINE) | 212 || (parentRenderInline && parentStyle->verticalAlign() != BASELINE) |
| 213 || style()->verticalAlign() != BASELINE | 213 || style()->verticalAlign() != BASELINE |
| 214 || style()->textEmphasisMark() != TextEmphasisMarkNone | 214 || style()->textEmphasisMark() != TextEmphasisMarkNone |
| 215 || (checkFonts && (!parentStyle->font().fontMetrics().hasIdenticalAscent
DescentAndLineGap(style()->font().fontMetrics()) | 215 || (checkFonts && (!parentStyle->font().fontMetrics().hasIdenticalAscent
DescentAndLineGap(style()->font().fontMetrics()) |
| 216 || parentStyle->lineHeight() != style()->lineHeight())) | 216 || parentStyle->lineHeight() != style()->lineHeight())) |
| 217 || (flowThread && flowThread->hasRegionsWithStyling()); | 217 || (flowThread && flowThread->hasRegionsWithStyling()); |
| 218 | 218 |
| 219 if (!alwaysCreateLineBoxes && checkFonts && document().styleSheetCollections
()->usesFirstLineRules()) { | 219 if (!alwaysCreateLineBoxes && checkFonts && document().styleEngine()->usesFi
rstLineRules()) { |
| 220 // Have to check the first line style as well. | 220 // Have to check the first line style as well. |
| 221 parentStyle = parent()->style(true); | 221 parentStyle = parent()->style(true); |
| 222 RenderStyle* childStyle = style(true); | 222 RenderStyle* childStyle = style(true); |
| 223 alwaysCreateLineBoxes = !parentStyle->font().fontMetrics().hasIdenticalA
scentDescentAndLineGap(childStyle->font().fontMetrics()) | 223 alwaysCreateLineBoxes = !parentStyle->font().fontMetrics().hasIdenticalA
scentDescentAndLineGap(childStyle->font().fontMetrics()) |
| 224 || childStyle->verticalAlign() != BASELINE | 224 || childStyle->verticalAlign() != BASELINE |
| 225 || parentStyle->lineHeight() != childStyle->lineHeight(); | 225 || parentStyle->lineHeight() != childStyle->lineHeight(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 if (alwaysCreateLineBoxes) { | 228 if (alwaysCreateLineBoxes) { |
| 229 if (!fullLayout) | 229 if (!fullLayout) |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1280 InlineFlowBox* RenderInline::createAndAppendInlineFlowBox() | 1280 InlineFlowBox* RenderInline::createAndAppendInlineFlowBox() |
| 1281 { | 1281 { |
| 1282 setAlwaysCreateLineBoxes(); | 1282 setAlwaysCreateLineBoxes(); |
| 1283 InlineFlowBox* flowBox = createInlineFlowBox(); | 1283 InlineFlowBox* flowBox = createInlineFlowBox(); |
| 1284 m_lineBoxes.appendLineBox(flowBox); | 1284 m_lineBoxes.appendLineBox(flowBox); |
| 1285 return flowBox; | 1285 return flowBox; |
| 1286 } | 1286 } |
| 1287 | 1287 |
| 1288 LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*directio
n*/, LinePositionMode /*linePositionMode*/) const | 1288 LayoutUnit RenderInline::lineHeight(bool firstLine, LineDirectionMode /*directio
n*/, LinePositionMode /*linePositionMode*/) const |
| 1289 { | 1289 { |
| 1290 if (firstLine && document().styleSheetCollections()->usesFirstLineRules()) { | 1290 if (firstLine && document().styleEngine()->usesFirstLineRules()) { |
| 1291 RenderStyle* s = style(firstLine); | 1291 RenderStyle* s = style(firstLine); |
| 1292 if (s != style()) | 1292 if (s != style()) |
| 1293 return s->computedLineHeight(view()); | 1293 return s->computedLineHeight(view()); |
| 1294 } | 1294 } |
| 1295 | 1295 |
| 1296 return style()->computedLineHeight(view()); | 1296 return style()->computedLineHeight(view()); |
| 1297 } | 1297 } |
| 1298 | 1298 |
| 1299 int RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, Li
neDirectionMode direction, LinePositionMode linePositionMode) const | 1299 int RenderInline::baselinePosition(FontBaseline baselineType, bool firstLine, Li
neDirectionMode direction, LinePositionMode linePositionMode) const |
| 1300 { | 1300 { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 container = this; | 1576 container = this; |
| 1577 | 1577 |
| 1578 FloatPoint absPos = container->localToAbsolute(); | 1578 FloatPoint absPos = container->localToAbsolute(); |
| 1579 region.bounds.setX(absPos.x() + region.bounds.x()); | 1579 region.bounds.setX(absPos.x() + region.bounds.x()); |
| 1580 region.bounds.setY(absPos.y() + region.bounds.y()); | 1580 region.bounds.setY(absPos.y() + region.bounds.y()); |
| 1581 | 1581 |
| 1582 regions.append(region); | 1582 regions.append(region); |
| 1583 } | 1583 } |
| 1584 | 1584 |
| 1585 } // namespace WebCore | 1585 } // namespace WebCore |
| OLD | NEW |