| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) |
| 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. |
| 4 * All right reserved. | 4 * All right reserved. |
| 5 * Copyright (C) 2010 Google Inc. All rights reserved. | 5 * Copyright (C) 2010 Google Inc. 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 ASSERT(run.m_lineLayoutItem.isText()); | 141 ASSERT(run.m_lineLayoutItem.isText()); |
| 142 LineLayoutText text = LineLayoutText(run.m_lineLayoutItem); | 142 LineLayoutText text = LineLayoutText(run.m_lineLayoutItem); |
| 143 InlineTextBox* textBox = | 143 InlineTextBox* textBox = |
| 144 text.createInlineTextBox(run.m_start, run.m_stop - run.m_start); | 144 text.createInlineTextBox(run.m_start, run.m_stop - run.m_start); |
| 145 // We only treat a box as text for a <br> if we are on a line by ourself or in | 145 // We only treat a box as text for a <br> if we are on a line by ourself or in |
| 146 // strict mode (Note the use of strict mode. In "almost strict" mode, we | 146 // strict mode (Note the use of strict mode. In "almost strict" mode, we |
| 147 // don't treat the box for <br> as text.) | 147 // don't treat the box for <br> as text.) |
| 148 if (text.isBR()) | 148 if (text.isBR()) |
| 149 textBox->setIsText(isOnlyRun || text.document().inNoQuirksMode()); | 149 textBox->setIsText(isOnlyRun || text.document().inNoQuirksMode()); |
| 150 textBox->setDirOverride( | 150 textBox->setDirOverride( |
| 151 run.dirOverride(text.style()->rtlOrdering() == EOrder::Visual)); | 151 run.dirOverride(text.style()->rtlOrdering() == EOrder::kVisual)); |
| 152 if (run.m_hasHyphen) | 152 if (run.m_hasHyphen) |
| 153 textBox->setHasHyphen(true); | 153 textBox->setHasHyphen(true); |
| 154 return textBox; | 154 return textBox; |
| 155 } | 155 } |
| 156 | 156 |
| 157 static inline void dirtyLineBoxesForObject(LayoutObject* o, bool fullLayout) { | 157 static inline void dirtyLineBoxesForObject(LayoutObject* o, bool fullLayout) { |
| 158 if (o->isText()) { | 158 if (o->isText()) { |
| 159 LayoutText* layoutText = toLayoutText(o); | 159 LayoutText* layoutText = toLayoutText(o); |
| 160 layoutText->dirtyOrDeleteLineBoxesIfNeeded(fullLayout); | 160 layoutText->dirtyOrDeleteLineBoxesIfNeeded(fullLayout); |
| 161 } else { | 161 } else { |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1132 | 1132 |
| 1133 // This is a short-cut for empty lines. | 1133 // This is a short-cut for empty lines. |
| 1134 if (layoutState.lineInfo().isEmpty()) { | 1134 if (layoutState.lineInfo().isEmpty()) { |
| 1135 ASSERT(!paginationStrutFromDeletedLine); | 1135 ASSERT(!paginationStrutFromDeletedLine); |
| 1136 if (lastRootBox()) | 1136 if (lastRootBox()) |
| 1137 lastRootBox()->setLineBreakInfo(endOfLine.getLineLayoutItem(), | 1137 lastRootBox()->setLineBreakInfo(endOfLine.getLineLayoutItem(), |
| 1138 endOfLine.offset(), resolver.status()); | 1138 endOfLine.offset(), resolver.status()); |
| 1139 resolver.runs().deleteRuns(); | 1139 resolver.runs().deleteRuns(); |
| 1140 } else { | 1140 } else { |
| 1141 VisualDirectionOverride override = | 1141 VisualDirectionOverride override = |
| 1142 (styleToUse.rtlOrdering() == EOrder::Visual | 1142 (styleToUse.rtlOrdering() == EOrder::kVisual |
| 1143 ? (styleToUse.direction() == TextDirection::kLtr | 1143 ? (styleToUse.direction() == TextDirection::kLtr |
| 1144 ? VisualLeftToRightOverride | 1144 ? VisualLeftToRightOverride |
| 1145 : VisualRightToLeftOverride) | 1145 : VisualRightToLeftOverride) |
| 1146 : NoVisualOverride); | 1146 : NoVisualOverride); |
| 1147 if (isNewUBAParagraph && styleToUse.unicodeBidi() == Plaintext && | 1147 if (isNewUBAParagraph && styleToUse.unicodeBidi() == Plaintext && |
| 1148 !resolver.context()->parent()) { | 1148 !resolver.context()->parent()) { |
| 1149 TextDirection direction = determinePlaintextDirectionality( | 1149 TextDirection direction = determinePlaintextDirectionality( |
| 1150 resolver.position().root(), resolver.position().getLineLayoutItem(), | 1150 resolver.position().root(), resolver.position().getLineLayoutItem(), |
| 1151 resolver.position().offset()); | 1151 resolver.position().offset()); |
| 1152 resolver.setStatus( | 1152 resolver.setStatus( |
| (...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2511 | 2511 |
| 2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { | 2512 bool LayoutBlockFlow::paintedOutputOfObjectHasNoEffectRegardlessOfSize() const { |
| 2513 // LayoutBlockFlow is in charge of paint invalidation of the first line. | 2513 // LayoutBlockFlow is in charge of paint invalidation of the first line. |
| 2514 if (firstLineBox()) | 2514 if (firstLineBox()) |
| 2515 return false; | 2515 return false; |
| 2516 | 2516 |
| 2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); | 2517 return LayoutBlock::paintedOutputOfObjectHasNoEffectRegardlessOfSize(); |
| 2518 } | 2518 } |
| 2519 | 2519 |
| 2520 } // namespace blink | 2520 } // namespace blink |
| OLD | NEW |