| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 1218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1229 } else { | 1229 } else { |
| 1230 LayoutUnit topOfEmphasisMark = curr->logicalTop() - style.fo
nt().emphasisMarkHeight(style.textEmphasisMarkString()); | 1230 LayoutUnit topOfEmphasisMark = curr->logicalTop() - style.fo
nt().emphasisMarkHeight(style.textEmphasisMarkString()); |
| 1231 result = std::max(result, allowedPosition - topOfEmphasisMar
k); | 1231 result = std::max(result, allowedPosition - topOfEmphasisMar
k); |
| 1232 } | 1232 } |
| 1233 } | 1233 } |
| 1234 } | 1234 } |
| 1235 } | 1235 } |
| 1236 return result; | 1236 return result; |
| 1237 } | 1237 } |
| 1238 | 1238 |
| 1239 void InlineFlowBox::collectLeafBoxesInLogicalOrder(Vector<InlineBox*>& leafBoxes
InLogicalOrder, CustomInlineBoxRangeReverse customReverseImplementation, void* u
serData) const | 1239 void InlineFlowBox::collectLeafBoxesInLogicalOrder(Vector<InlineBox*>& leafBoxes
InLogicalOrder, CustomInlineBoxRangeReverse customReverseImplementation) const |
| 1240 { | 1240 { |
| 1241 InlineBox* leaf = firstLeafChild(); | 1241 InlineBox* leaf = firstLeafChild(); |
| 1242 | 1242 |
| 1243 // FIXME: The reordering code is a copy of parts from BidiResolver::createBi
diRunsForLine, operating directly on InlineBoxes, instead of BidiRuns. | 1243 // FIXME: The reordering code is a copy of parts from BidiResolver::createBi
diRunsForLine, operating directly on InlineBoxes, instead of BidiRuns. |
| 1244 // Investigate on how this code could possibly be shared. | 1244 // Investigate on how this code could possibly be shared. |
| 1245 unsigned char minLevel = 128; | 1245 unsigned char minLevel = 128; |
| 1246 unsigned char maxLevel = 0; | 1246 unsigned char maxLevel = 0; |
| 1247 | 1247 |
| 1248 // First find highest and lowest levels, and initialize leafBoxesInLogicalOr
der with the leaf boxes in visual order. | 1248 // First find highest and lowest levels, and initialize leafBoxesInLogicalOr
der with the leaf boxes in visual order. |
| 1249 for (; leaf; leaf = leaf->nextLeafChild()) { | 1249 for (; leaf; leaf = leaf->nextLeafChild()) { |
| (...skipping 22 matching lines...) Expand all Loading... |
| 1272 break; | 1272 break; |
| 1273 ++it; | 1273 ++it; |
| 1274 } | 1274 } |
| 1275 Vector<InlineBox*>::iterator first = it; | 1275 Vector<InlineBox*>::iterator first = it; |
| 1276 while (it != end) { | 1276 while (it != end) { |
| 1277 if ((*it)->bidiLevel() < minLevel) | 1277 if ((*it)->bidiLevel() < minLevel) |
| 1278 break; | 1278 break; |
| 1279 ++it; | 1279 ++it; |
| 1280 } | 1280 } |
| 1281 Vector<InlineBox*>::iterator last = it; | 1281 Vector<InlineBox*>::iterator last = it; |
| 1282 if (customReverseImplementation) { | 1282 if (customReverseImplementation) |
| 1283 ASSERT(userData); | 1283 (*customReverseImplementation)(first, last); |
| 1284 (*customReverseImplementation)(userData, first, last); | 1284 else |
| 1285 } else { | |
| 1286 std::reverse(first, last); | 1285 std::reverse(first, last); |
| 1287 } | |
| 1288 } | 1286 } |
| 1289 ++minLevel; | 1287 ++minLevel; |
| 1290 } | 1288 } |
| 1291 } | 1289 } |
| 1292 | 1290 |
| 1293 const char* InlineFlowBox::boxName() const | 1291 const char* InlineFlowBox::boxName() const |
| 1294 { | 1292 { |
| 1295 return "InlineFlowBox"; | 1293 return "InlineFlowBox"; |
| 1296 } | 1294 } |
| 1297 | 1295 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1317 ASSERT(child->prevOnLine() == prev); | 1315 ASSERT(child->prevOnLine() == prev); |
| 1318 prev = child; | 1316 prev = child; |
| 1319 } | 1317 } |
| 1320 ASSERT(prev == m_lastChild); | 1318 ASSERT(prev == m_lastChild); |
| 1321 #endif | 1319 #endif |
| 1322 } | 1320 } |
| 1323 | 1321 |
| 1324 #endif | 1322 #endif |
| 1325 | 1323 |
| 1326 } // namespace blink | 1324 } // namespace blink |
| OLD | NEW |