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. All r
ight reserved. | 3 * Copyright (C) 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ight reserved. |
4 * Copyright (C) 2010 Google Inc. All rights reserved. | 4 * Copyright (C) 2010 Google 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 469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 fallbackFonts.clear(); | 480 fallbackFonts.clear(); |
481 } | 481 } |
482 } | 482 } |
483 | 483 |
484 if (!measuredWidth) | 484 if (!measuredWidth) |
485 measuredWidth = renderer->width(run->m_start, run->m_stop - run->m_start
, xPos, run->direction(), lineInfo.isFirstLine(), &fallbackFonts, &glyphOverflow
); | 485 measuredWidth = renderer->width(run->m_start, run->m_stop - run->m_start
, xPos, run->direction(), lineInfo.isFirstLine(), &fallbackFonts, &glyphOverflow
); |
486 | 486 |
487 run->m_box->setLogicalWidth(measuredWidth + hyphenWidth); | 487 run->m_box->setLogicalWidth(measuredWidth + hyphenWidth); |
488 if (!fallbackFonts.isEmpty()) { | 488 if (!fallbackFonts.isEmpty()) { |
489 ASSERT(run->m_box->isText()); | 489 ASSERT(run->m_box->isText()); |
490 GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.add(toInl
ineTextBox(run->m_box), make_pair(Vector<const SimpleFontData*>(), GlyphOverflow
())).iterator; | 490 GlyphOverflowAndFallbackFontsMap::ValueType* it = textBoxDataMap.add(toI
nlineTextBox(run->m_box), make_pair(Vector<const SimpleFontData*>(), GlyphOverfl
ow())).iterator; |
491 ASSERT(it->value.first.isEmpty()); | 491 ASSERT(it->value.first.isEmpty()); |
492 copyToVector(fallbackFonts, it->value.first); | 492 copyToVector(fallbackFonts, it->value.first); |
493 run->m_box->parent()->clearDescendantsHaveSameLineHeightAndBaseline(); | 493 run->m_box->parent()->clearDescendantsHaveSameLineHeightAndBaseline(); |
494 } | 494 } |
495 if ((glyphOverflow.top || glyphOverflow.bottom || glyphOverflow.left || glyp
hOverflow.right)) { | 495 if ((glyphOverflow.top || glyphOverflow.bottom || glyphOverflow.left || glyp
hOverflow.right)) { |
496 ASSERT(run->m_box->isText()); | 496 ASSERT(run->m_box->isText()); |
497 GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.add(toInl
ineTextBox(run->m_box), make_pair(Vector<const SimpleFontData*>(), GlyphOverflow
())).iterator; | 497 GlyphOverflowAndFallbackFontsMap::ValueType* it = textBoxDataMap.add(toI
nlineTextBox(run->m_box), make_pair(Vector<const SimpleFontData*>(), GlyphOverfl
ow())).iterator; |
498 it->value.second = glyphOverflow; | 498 it->value.second = glyphOverflow; |
499 run->m_box->clearKnownToHaveNoOverflow(); | 499 run->m_box->clearKnownToHaveNoOverflow(); |
500 } | 500 } |
501 } | 501 } |
502 | 502 |
503 static inline void computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun*
trailingSpaceRun, Vector<unsigned, 16>& expansionOpportunities, unsigned expansi
onOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth) | 503 static inline void computeExpansionForJustifiedText(BidiRun* firstRun, BidiRun*
trailingSpaceRun, Vector<unsigned, 16>& expansionOpportunities, unsigned expansi
onOpportunityCount, float& totalLogicalWidth, float availableLogicalWidth) |
504 { | 504 { |
505 if (!expansionOpportunityCount || availableLogicalWidth <= totalLogicalWidth
) | 505 if (!expansionOpportunityCount || availableLogicalWidth <= totalLogicalWidth
) |
506 return; | 506 return; |
507 | 507 |
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2059 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); | 2059 lineGridBox->alignBoxesInBlockDirection(logicalHeight(), textBoxDataMap, ver
ticalPositionCache); |
2060 | 2060 |
2061 setLineGridBox(lineGridBox); | 2061 setLineGridBox(lineGridBox); |
2062 | 2062 |
2063 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying | 2063 // FIXME: If any of the characteristics of the box change compared to the ol
d one, then we need to do a deep dirtying |
2064 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping | 2064 // (similar to what happens when the page height changes). Ideally, though,
we only do this if someone is actually snapping |
2065 // to this grid. | 2065 // to this grid. |
2066 } | 2066 } |
2067 | 2067 |
2068 } | 2068 } |
OLD | NEW |