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 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1834 // Now delete the lines that we failed to sync. | 1834 // Now delete the lines that we failed to sync. |
1835 deleteLineRange(layoutState, originalEndLine, result); | 1835 deleteLineRange(layoutState, originalEndLine, result); |
1836 return matched; | 1836 return matched; |
1837 } | 1837 } |
1838 } | 1838 } |
1839 | 1839 |
1840 return false; | 1840 return false; |
1841 } | 1841 } |
1842 | 1842 |
1843 bool LayoutBlockFlow::generatesLineBoxesForInlineChild(LayoutObject* inlineObj) | 1843 bool LayoutBlockFlow::generatesLineBoxesForInlineChild(LayoutObject* inlineObj) |
| 1844 |
1844 { | 1845 { |
1845 ASSERT(inlineObj->parent() == this); | 1846 ASSERT(inlineObj->parent() == this); |
1846 | 1847 |
1847 InlineIterator it(LineLayoutBlockFlow(this), LineLayoutItem(inlineObj), 0); | 1848 InlineIterator it(LineLayoutBlockFlow(this), LineLayoutItem(inlineObj), 0); |
1848 // FIXME: We should pass correct value for WhitespacePosition. | 1849 // FIXME: We should pass correct value for WhitespacePosition. |
1849 while (!it.atEnd() && !requiresLineBox(it)) | 1850 while (!it.atEnd() && !requiresLineBox(it)) |
1850 it.increment(); | 1851 it.increment(); |
1851 | 1852 |
1852 return !it.atEnd(); | 1853 return !it.atEnd(); |
1853 } | 1854 } |
1854 | 1855 |
| 1856 |
1855 void LayoutBlockFlow::addOverflowFromInlineChildren() | 1857 void LayoutBlockFlow::addOverflowFromInlineChildren() |
1856 { | 1858 { |
1857 LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : LayoutUnit(); | 1859 LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : LayoutUnit(); |
| 1860 // FIXME: Need to find another way to do this, since scrollbars could show w
hen we don't want them to. |
| 1861 if (hasOverflowClip() && !endPadding && node() && node()->isRootEditableElem
ent() && style()->isLeftToRightDirection()) |
| 1862 endPadding = 1; |
1858 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox())
{ | 1863 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox())
{ |
1859 addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding)); | 1864 addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding)); |
1860 LayoutRect visualOverflow = curr->visualOverflowRect(curr->lineTop(), cu
rr->lineBottom()); | 1865 LayoutRect visualOverflow = curr->visualOverflowRect(curr->lineTop(), cu
rr->lineBottom()); |
1861 addContentsVisualOverflow(visualOverflow); | 1866 addContentsVisualOverflow(visualOverflow); |
1862 } | 1867 } |
1863 | 1868 |
1864 if (!containsInlineWithOutlineAndContinuation()) | 1869 if (!containsInlineWithOutlineAndContinuation()) |
1865 return; | 1870 return; |
1866 | 1871 |
1867 // Add outline rects of continuations of descendant inlines into visual over
flow of this block. | 1872 // Add outline rects of continuations of descendant inlines into visual over
flow of this block. |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2039 LayoutUnit logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); | 2044 LayoutUnit logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); |
2040 LayoutUnit availableLogicalWidth = logicalRightOffsetForLine(logicalHeight()
, false) - logicalLeft; | 2045 LayoutUnit availableLogicalWidth = logicalRightOffsetForLine(logicalHeight()
, false) - logicalLeft; |
2041 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2046 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
2042 | 2047 |
2043 if (!style()->isLeftToRightDirection()) | 2048 if (!style()->isLeftToRightDirection()) |
2044 return logicalWidth() - logicalLeft; | 2049 return logicalWidth() - logicalLeft; |
2045 return logicalLeft; | 2050 return logicalLeft; |
2046 } | 2051 } |
2047 | 2052 |
2048 } | 2053 } |
OLD | NEW |