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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
893 FloatingObjectSetIterator it = floatingObjectSet.begin(); | 893 FloatingObjectSetIterator it = floatingObjectSet.begin(); |
894 FloatingObjectSetIterator end = floatingObjectSet.end(); | 894 FloatingObjectSetIterator end = floatingObjectSet.end(); |
895 if (layoutState.lastFloat()) { | 895 if (layoutState.lastFloat()) { |
896 FloatingObjectSetIterator lastFloatIterator = floatingObject
Set.find(layoutState.lastFloat()); | 896 FloatingObjectSetIterator lastFloatIterator = floatingObject
Set.find(layoutState.lastFloat()); |
897 ASSERT(lastFloatIterator != end); | 897 ASSERT(lastFloatIterator != end); |
898 ++lastFloatIterator; | 898 ++lastFloatIterator; |
899 it = lastFloatIterator; | 899 it = lastFloatIterator; |
900 } | 900 } |
901 for (; it != end; ++it) { | 901 for (; it != end; ++it) { |
902 FloatingObject& floatingObject = *it->get(); | 902 FloatingObject& floatingObject = *it->get(); |
| 903 // If we've reached the start of clean lines any remaining f
loating children belong to them. |
| 904 // We don't care about the 'last float' mechanism once we're
in clean lines so it's ok to let it get set below. |
| 905 if (floatingObject.layoutObject() == cleanLineStart.object()
) |
| 906 break; |
903 appendFloatingObjectToLastLine(floatingObject); | 907 appendFloatingObjectToLastLine(floatingObject); |
904 ASSERT(floatingObject.layoutObject() == layoutState.floats()
[layoutState.floatIndex()].object); | 908 ASSERT(floatingObject.layoutObject() == layoutState.floats()
[layoutState.floatIndex()].object); |
905 // If a float's geometry has changed, give up on syncing wit
h clean lines. | 909 // If a float's geometry has changed, give up on syncing wit
h clean lines. |
906 if (layoutState.floats()[layoutState.floatIndex()].rect != f
loatingObject.frameRect()) | 910 if (layoutState.floats()[layoutState.floatIndex()].rect != f
loatingObject.frameRect()) |
907 checkForEndLineMatch = false; | 911 checkForEndLineMatch = false; |
908 layoutState.setFloatIndex(layoutState.floatIndex() + 1); | 912 layoutState.setFloatIndex(layoutState.floatIndex() + 1); |
909 } | 913 } |
910 layoutState.setLastFloat(!floatingObjectSet.isEmpty() ? floating
ObjectSet.last().get() : 0); | 914 layoutState.setLastFloat(!floatingObjectSet.isEmpty() ? floating
ObjectSet.last().get() : 0); |
911 } | 915 } |
912 } | 916 } |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2013 LayoutUnit logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); | 2017 LayoutUnit logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false); |
2014 LayoutUnit availableLogicalWidth = logicalRightOffsetForLine(logicalHeight()
, false) - logicalLeft; | 2018 LayoutUnit availableLogicalWidth = logicalRightOffsetForLine(logicalHeight()
, false) - logicalLeft; |
2015 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2019 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
2016 | 2020 |
2017 if (!style()->isLeftToRightDirection()) | 2021 if (!style()->isLeftToRightDirection()) |
2018 return logicalWidth() - logicalLeft; | 2022 return logicalWidth() - logicalLeft; |
2019 return logicalLeft; | 2023 return logicalLeft; |
2020 } | 2024 } |
2021 | 2025 |
2022 } | 2026 } |
OLD | NEW |