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 862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 873 if (adjustment) { | 873 if (adjustment) { |
| 874 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine()); | 874 LayoutUnit oldLineWidth = availableLogicalWidthForLine(o ldLogicalHeight, layoutState.lineInfo().isFirstLine()); |
| 875 lineBox->adjustBlockDirectionPosition(adjustment.toFloat ()); | 875 lineBox->adjustBlockDirectionPosition(adjustment.toFloat ()); |
| 876 if (layoutState.usesPaintInvalidationBounds()) | 876 if (layoutState.usesPaintInvalidationBounds()) |
| 877 layoutState.updatePaintInvalidationRangeFromBox(line Box); | 877 layoutState.updatePaintInvalidationRangeFromBox(line Box); |
| 878 | 878 |
| 879 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) { | 879 if (availableLogicalWidthForLine(oldLogicalHeight + adju stment, layoutState.lineInfo().isFirstLine()) != oldLineWidth) { |
| 880 // We have to delete this line, remove all floats th at got added, and let line layout re-run. | 880 // We have to delete this line, remove all floats th at got added, and let line layout re-run. |
| 881 lineBox->deleteLine(); | 881 lineBox->deleteLine(); |
| 882 endOfLine = restartLayoutRunsAndFloatsInRange(oldLog icalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, previousEndofLine); | 882 endOfLine = restartLayoutRunsAndFloatsInRange(oldLog icalHeight, oldLogicalHeight + adjustment, lastFloatFromPreviousLine, resolver, previousEndofLine); |
| 883 lineMidpointState.reset(); | |
| 884 resolver.setPosition(endOfLine, numberOfIsolateAnces tors(endOfLine)); | |
|
rhogan
2014/11/03 18:58:12
This looks right to me. The lineMidpointState.rese
| |
| 883 continue; | 885 continue; |
| 884 } | 886 } |
| 885 | 887 |
| 886 setLogicalHeight(lineBox->lineBottomWithLeading()); | 888 setLogicalHeight(lineBox->lineBottomWithLeading()); |
| 887 } | 889 } |
| 888 } | 890 } |
| 889 } | 891 } |
| 890 } | 892 } |
| 891 | 893 |
| 892 for (size_t i = 0; i < lineBreaker.positionedObjects().size(); ++i) | 894 for (size_t i = 0; i < lineBreaker.positionedObjects().size(); ++i) |
| (...skipping 1152 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 |