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 1998 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2009 if (ltr) | 2009 if (ltr) |
2010 curr->moveInInlineDirection(logicalLeft); | 2010 curr->moveInInlineDirection(logicalLeft); |
2011 else | 2011 else |
2012 curr->moveInInlineDirection(logicalLeft - (availableLogicalW
idth - totalLogicalWidth)); | 2012 curr->moveInInlineDirection(logicalLeft - (availableLogicalW
idth - totalLogicalWidth)); |
2013 } | 2013 } |
2014 } | 2014 } |
2015 indentText = DoNotIndentText; | 2015 indentText = DoNotIndentText; |
2016 } | 2016 } |
2017 } | 2017 } |
2018 | 2018 |
| 2019 void LayoutBlockFlow::markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUn
it logicalBottom, RootInlineBox* highest) |
| 2020 { |
| 2021 if (logicalTop >= logicalBottom) |
| 2022 return; |
| 2023 |
| 2024 RootInlineBox* lowestDirtyLine = lastRootBox(); |
| 2025 RootInlineBox* afterLowest = lowestDirtyLine; |
| 2026 while (lowestDirtyLine && lowestDirtyLine->lineBottomWithLeading() >= logica
lBottom && logicalBottom < LayoutUnit::max()) { |
| 2027 afterLowest = lowestDirtyLine; |
| 2028 lowestDirtyLine = lowestDirtyLine->prevRootBox(); |
| 2029 } |
| 2030 |
| 2031 while (afterLowest && afterLowest != highest && (afterLowest->lineBottomWith
Leading() >= logicalTop || afterLowest->lineBottomWithLeading() < LayoutUnit()))
{ |
| 2032 afterLowest->markDirty(); |
| 2033 afterLowest = afterLowest->prevRootBox(); |
| 2034 } |
| 2035 } |
| 2036 |
2019 LayoutUnit LayoutBlockFlow::startAlignedOffsetForLine(LayoutUnit position, Inden
tTextOrNot indentText) | 2037 LayoutUnit LayoutBlockFlow::startAlignedOffsetForLine(LayoutUnit position, Inden
tTextOrNot indentText) |
2020 { | 2038 { |
2021 ETextAlign textAlign = style()->textAlign(); | 2039 ETextAlign textAlign = style()->textAlign(); |
2022 | 2040 |
2023 bool applyIndentText; | 2041 bool applyIndentText; |
2024 switch (textAlign) { // FIXME: Handle TAEND here | 2042 switch (textAlign) { // FIXME: Handle TAEND here |
2025 case LEFT: | 2043 case LEFT: |
2026 case WEBKIT_LEFT: | 2044 case WEBKIT_LEFT: |
2027 applyIndentText = style()->isLeftToRightDirection(); | 2045 applyIndentText = style()->isLeftToRightDirection(); |
2028 break; | 2046 break; |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2070 if (!line || !line->isFirstLineStyle()) | 2088 if (!line || !line->isFirstLineStyle()) |
2071 return reason; | 2089 return reason; |
2072 // It's the RootInlineBox that paints the ::first-line background. Note that
since it may be | 2090 // It's the RootInlineBox that paints the ::first-line background. Note that
since it may be |
2073 // expensive to figure out if the first line is affected by any ::first-line
selectors at all, | 2091 // expensive to figure out if the first line is affected by any ::first-line
selectors at all, |
2074 // we just invalidate it unconditionally, since that's typically cheaper. | 2092 // we just invalidate it unconditionally, since that's typically cheaper. |
2075 invalidateDisplayItemClient(*line); | 2093 invalidateDisplayItemClient(*line); |
2076 return reason; | 2094 return reason; |
2077 } | 2095 } |
2078 | 2096 |
2079 } // namespace blink | 2097 } // namespace blink |
OLD | NEW |