Chromium Code Reviews| 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 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 874 if (adjustment) { | 874 if (adjustment) { |
| 875 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine()); | 875 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine()); |
| 876 lineBox->adjustBlockDirectionPosition(adjustment.toFloat ()); | 876 lineBox->adjustBlockDirectionPosition(adjustment.toFloat ()); |
| 877 if (layoutState.usesPaintInvalidationBounds()) | 877 if (layoutState.usesPaintInvalidationBounds()) |
| 878 layoutState.updatePaintInvalidationRangeFromBox(line Box); | 878 layoutState.updatePaintInvalidationRangeFromBox(line Box); |
| 879 | 879 |
| 880 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) { | 880 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) { |
| 881 // We have to delete this line, remove all floats th at got added, and let line layout re-run. | 881 // We have to delete this line, remove all floats th at got added, and let line layout re-run. |
| 882 lineBox->deleteLine(); | 882 lineBox->deleteLine(); |
| 883 endOfLine = restartLayoutRunsAndFloatsInRange(oldLog icalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, previousEndofLine); | 883 endOfLine = restartLayoutRunsAndFloatsInRange(oldLog icalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, previousEndofLine); |
| 884 lineMidpointState.reset(); | |
| 885 resolver.setPosition(endOfLine, numberOfIsolateAnces tors(endOfLine)); | |
|
dsinclair
2014/11/17 14:12:21
This seems like it could potentially cause issues
| |
| 884 continue; | 886 continue; |
| 885 } | 887 } |
| 886 | 888 |
| 887 setLogicalHeight(lineBox->lineBottomWithLeading()); | 889 setLogicalHeight(lineBox->lineBottomWithLeading()); |
| 888 } | 890 } |
| 889 } | 891 } |
| 890 } | 892 } |
| 891 } | 893 } |
| 892 | 894 |
| 893 for (size_t i = 0; i < lineBreaker.positionedObjects().size(); ++i) | 895 for (size_t i = 0; i < lineBreaker.positionedObjects().size(); ++i) |
| (...skipping 1151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2045 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); | 2047 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); |
| 2046 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; | 2048 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; |
| 2047 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); | 2049 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); |
| 2048 | 2050 |
| 2049 if (!style()->isLeftToRightDirection()) | 2051 if (!style()->isLeftToRightDirection()) |
| 2050 return logicalWidth() - logicalLeft; | 2052 return logicalWidth() - logicalLeft; |
| 2051 return logicalLeft; | 2053 return logicalLeft; |
| 2052 } | 2054 } |
| 2053 | 2055 |
| 2054 } | 2056 } |
| OLD | NEW |