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 | |
1845 { | 1844 { |
1846 ASSERT(inlineObj->parent() == this); | 1845 ASSERT(inlineObj->parent() == this); |
1847 | 1846 |
1848 InlineIterator it(LineLayoutBlockFlow(this), LineLayoutItem(inlineObj), 0); | 1847 InlineIterator it(LineLayoutBlockFlow(this), LineLayoutItem(inlineObj), 0); |
1849 // FIXME: We should pass correct value for WhitespacePosition. | 1848 // FIXME: We should pass correct value for WhitespacePosition. |
1850 while (!it.atEnd() && !requiresLineBox(it)) | 1849 while (!it.atEnd() && !requiresLineBox(it)) |
1851 it.increment(); | 1850 it.increment(); |
1852 | 1851 |
1853 return !it.atEnd(); | 1852 return !it.atEnd(); |
1854 } | 1853 } |
1855 | 1854 |
1856 | |
1857 void LayoutBlockFlow::addOverflowFromInlineChildren() | 1855 void LayoutBlockFlow::addOverflowFromInlineChildren() |
1858 { | 1856 { |
1859 LayoutUnit endPadding = hasOverflowClip() ? paddingEnd() : LayoutUnit(); | 1857 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; | |
1863 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox())
{ | 1858 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBox())
{ |
1864 addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding)); | 1859 addLayoutOverflow(curr->paddedLayoutOverflowRect(endPadding)); |
1865 LayoutRect visualOverflow = curr->visualOverflowRect(curr->lineTop(), cu
rr->lineBottom()); | 1860 LayoutRect visualOverflow = curr->visualOverflowRect(curr->lineTop(), cu
rr->lineBottom()); |
1866 addContentsVisualOverflow(visualOverflow); | 1861 addContentsVisualOverflow(visualOverflow); |
1867 } | 1862 } |
1868 | 1863 |
1869 if (!containsInlineWithOutlineAndContinuation()) | 1864 if (!containsInlineWithOutlineAndContinuation()) |
1870 return; | 1865 return; |
1871 | 1866 |
1872 // Add outline rects of continuations of descendant inlines into visual over
flow of this block. | 1867 // 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... |
2044 LayoutUnit logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); | 2039 LayoutUnit logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); |
2045 LayoutUnit availableLogicalWidth = logicalRightOffsetForLine(logicalHeight()
, false) - logicalLeft; | 2040 LayoutUnit availableLogicalWidth = logicalRightOffsetForLine(logicalHeight()
, false) - logicalLeft; |
2046 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2041 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
2047 | 2042 |
2048 if (!style()->isLeftToRightDirection()) | 2043 if (!style()->isLeftToRightDirection()) |
2049 return logicalWidth() - logicalLeft; | 2044 return logicalWidth() - logicalLeft; |
2050 return logicalLeft; | 2045 return logicalLeft; |
2051 } | 2046 } |
2052 | 2047 |
2053 } | 2048 } |
OLD | NEW |