| 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. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
| 5 * All rights reserved. | 5 * All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 if (alwaysCreateLineBoxes()) | 228 if (alwaysCreateLineBoxes()) |
| 229 return; | 229 return; |
| 230 | 230 |
| 231 const ComputedStyle& parentStyle = parent()->styleRef(); | 231 const ComputedStyle& parentStyle = parent()->styleRef(); |
| 232 LayoutInline* parentLayoutInline = | 232 LayoutInline* parentLayoutInline = |
| 233 parent()->isLayoutInline() ? toLayoutInline(parent()) : 0; | 233 parent()->isLayoutInline() ? toLayoutInline(parent()) : 0; |
| 234 bool checkFonts = document().inNoQuirksMode(); | 234 bool checkFonts = document().inNoQuirksMode(); |
| 235 bool alwaysCreateLineBoxesNew = | 235 bool alwaysCreateLineBoxesNew = |
| 236 (parentLayoutInline && parentLayoutInline->alwaysCreateLineBoxes()) || | 236 (parentLayoutInline && parentLayoutInline->alwaysCreateLineBoxes()) || |
| 237 (parentLayoutInline && | 237 (parentLayoutInline && |
| 238 parentStyle.verticalAlign() != VerticalAlignBaseline) || | 238 parentStyle.verticalAlign() != EVerticalAlign::Baseline) || |
| 239 style()->verticalAlign() != VerticalAlignBaseline || | 239 style()->verticalAlign() != EVerticalAlign::Baseline || |
| 240 style()->getTextEmphasisMark() != TextEmphasisMarkNone || | 240 style()->getTextEmphasisMark() != TextEmphasisMarkNone || |
| 241 (checkFonts && | 241 (checkFonts && |
| 242 (!styleRef().hasIdenticalAscentDescentAndLineGap(parentStyle) || | 242 (!styleRef().hasIdenticalAscentDescentAndLineGap(parentStyle) || |
| 243 parentStyle.lineHeight() != styleRef().lineHeight())); | 243 parentStyle.lineHeight() != styleRef().lineHeight())); |
| 244 | 244 |
| 245 if (!alwaysCreateLineBoxesNew && checkFonts && | 245 if (!alwaysCreateLineBoxesNew && checkFonts && |
| 246 document().styleEngine().usesFirstLineRules()) { | 246 document().styleEngine().usesFirstLineRules()) { |
| 247 // Have to check the first line style as well. | 247 // Have to check the first line style as well. |
| 248 const ComputedStyle& firstLineParentStyle = parent()->styleRef(true); | 248 const ComputedStyle& firstLineParentStyle = parent()->styleRef(true); |
| 249 const ComputedStyle& childStyle = styleRef(true); | 249 const ComputedStyle& childStyle = styleRef(true); |
| 250 alwaysCreateLineBoxesNew = | 250 alwaysCreateLineBoxesNew = |
| 251 !firstLineParentStyle.hasIdenticalAscentDescentAndLineGap(childStyle) || | 251 !firstLineParentStyle.hasIdenticalAscentDescentAndLineGap(childStyle) || |
| 252 childStyle.verticalAlign() != VerticalAlignBaseline || | 252 childStyle.verticalAlign() != EVerticalAlign::Baseline || |
| 253 firstLineParentStyle.lineHeight() != childStyle.lineHeight(); | 253 firstLineParentStyle.lineHeight() != childStyle.lineHeight(); |
| 254 } | 254 } |
| 255 | 255 |
| 256 if (alwaysCreateLineBoxesNew) { | 256 if (alwaysCreateLineBoxesNew) { |
| 257 if (!fullLayout) | 257 if (!fullLayout) |
| 258 dirtyLineBoxes(false); | 258 dirtyLineBoxes(false); |
| 259 setAlwaysCreateLineBoxes(); | 259 setAlwaysCreateLineBoxes(); |
| 260 } | 260 } |
| 261 } | 261 } |
| 262 | 262 |
| (...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1512 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
| 1513 } | 1513 } |
| 1514 | 1514 |
| 1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1515 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
| 1516 LayoutRect LayoutInline::debugRect() const { | 1516 LayoutRect LayoutInline::debugRect() const { |
| 1517 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1517 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
| 1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1518 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
| 1519 } | 1519 } |
| 1520 | 1520 |
| 1521 } // namespace blink | 1521 } // namespace blink |
| OLD | NEW |