Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Side by Side Diff: Source/core/rendering/RenderBlockLineLayout.cpp

Issue 685623005: Add missing reset calls after continue in layoutRunsAndFloatsInRange(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Next attempt Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/fast/html/layout-runs-and-floats-crash-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « LayoutTests/fast/html/layout-runs-and-floats-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698