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 1871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(),
lineInfo, LeadingWhitespace)) { | 1882 while (!resolver.position().atEnd() && !requiresLineBox(resolver.position(),
lineInfo, LeadingWhitespace)) { |
1883 RenderObject* object = resolver.position().m_obj; | 1883 RenderObject* object = resolver.position().m_obj; |
1884 if (object->isPositioned()) { | 1884 if (object->isPositioned()) { |
1885 setStaticPositions(m_block, toRenderBox(object)); | 1885 setStaticPositions(m_block, toRenderBox(object)); |
1886 if (object->style()->isOriginalDisplayInlineType()) { | 1886 if (object->style()->isOriginalDisplayInlineType()) { |
1887 resolver.runs().addRun(createRun(0, 1, object, resolver)); | 1887 resolver.runs().addRun(createRun(0, 1, object, resolver)); |
1888 lineInfo.incrementRunsFromLeadingWhitespace(); | 1888 lineInfo.incrementRunsFromLeadingWhitespace(); |
1889 } | 1889 } |
1890 } else if (object->isFloating()) | 1890 } else if (object->isFloating()) |
1891 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend
erBox(object)), lastFloatFromPreviousLine, lineInfo, width); | 1891 m_block->positionNewFloatOnLine(m_block->insertFloatingObject(toRend
erBox(object)), lastFloatFromPreviousLine, lineInfo, width); |
| 1892 else if (object->isText() && object->style()->hasTextCombine() && object
->isCombineText()) { |
| 1893 toRenderCombineText(object)->combineText(); |
| 1894 continue; |
| 1895 } |
1892 resolver.increment(); | 1896 resolver.increment(); |
1893 } | 1897 } |
1894 resolver.commitExplicitEmbedding(); | 1898 resolver.commitExplicitEmbedding(); |
1895 } | 1899 } |
1896 | 1900 |
1897 // This is currently just used for list markers and inline flows that have line
boxes. Neither should | 1901 // This is currently just used for list markers and inline flows that have line
boxes. Neither should |
1898 // have an effect on whitespace at the start of the line. | 1902 // have an effect on whitespace at the start of the line. |
1899 static bool shouldSkipWhitespaceAfterStartObject(RenderBlock* block, RenderObjec
t* o, LineMidpointState& lineMidpointState) | 1903 static bool shouldSkipWhitespaceAfterStartObject(RenderBlock* block, RenderObjec
t* o, LineMidpointState& lineMidpointState) |
1900 { | 1904 { |
1901 RenderObject* next = bidiNextSkippingEmptyInlines(block, o); | 1905 RenderObject* next = bidiNextSkippingEmptyInlines(block, o); |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2267 if (!current.m_pos) | 2271 if (!current.m_pos) |
2268 appliedStartWidth = false; | 2272 appliedStartWidth = false; |
2269 | 2273 |
2270 RenderText* t = toRenderText(current.m_obj); | 2274 RenderText* t = toRenderText(current.m_obj); |
2271 | 2275 |
2272 #if ENABLE(SVG) | 2276 #if ENABLE(SVG) |
2273 bool isSVGText = t->isSVGInlineText(); | 2277 bool isSVGText = t->isSVGInlineText(); |
2274 #endif | 2278 #endif |
2275 | 2279 |
2276 RenderStyle* style = t->style(lineInfo.isFirstLine()); | 2280 RenderStyle* style = t->style(lineInfo.isFirstLine()); |
2277 if (style->hasTextCombine() && current.m_obj->isCombineText()) | 2281 if (style->hasTextCombine() && current.m_obj->isCombineText() && !to
RenderCombineText(current.m_obj)->isCombined()) |
2278 toRenderCombineText(current.m_obj)->combineText(); | 2282 toRenderCombineText(current.m_obj)->combineText(); |
2279 | 2283 |
2280 const Font& f = style->font(); | 2284 const Font& f = style->font(); |
2281 bool isFixedPitch = f.isFixedPitch(); | 2285 bool isFixedPitch = f.isFixedPitch(); |
2282 bool canHyphenate = style->hyphens() == HyphensAuto && WebCore::canH
yphenate(style->locale()); | 2286 bool canHyphenate = style->hyphens() == HyphensAuto && WebCore::canH
yphenate(style->locale()); |
2283 | 2287 |
2284 int lastSpace = current.m_pos; | 2288 int lastSpace = current.m_pos; |
2285 float wordSpacing = current.m_obj->style()->wordSpacing(); | 2289 float wordSpacing = current.m_obj->style()->wordSpacing(); |
2286 float lastSpaceWordSpacing = 0; | 2290 float lastSpaceWordSpacing = 0; |
2287 | 2291 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2742 availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) -
logicalLeft; | 2746 availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), false) -
logicalLeft; |
2743 float totalLogicalWidth = logicalWidthForChild(child); | 2747 float totalLogicalWidth = logicalWidthForChild(child); |
2744 updateLogicalWidthForAlignment(textAlign, 0l, logicalLeft, totalLogicalWidth
, availableLogicalWidth, 0); | 2748 updateLogicalWidthForAlignment(textAlign, 0l, logicalLeft, totalLogicalWidth
, availableLogicalWidth, 0); |
2745 | 2749 |
2746 if (!style()->isLeftToRightDirection()) | 2750 if (!style()->isLeftToRightDirection()) |
2747 return logicalWidth() - (logicalLeft + totalLogicalWidth); | 2751 return logicalWidth() - (logicalLeft + totalLogicalWidth); |
2748 return logicalLeft; | 2752 return logicalLeft; |
2749 } | 2753 } |
2750 | 2754 |
2751 } | 2755 } |
OLD | NEW |