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 778 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
789 } | 789 } |
790 | 790 |
791 void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, | 791 void LayoutBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, |
792 InlineBidiResolver& resolver, const InlineIterator& cleanLineStart, | 792 InlineBidiResolver& resolver, const InlineIterator& cleanLineStart, |
793 const BidiStatus& cleanLineBidiStatus) | 793 const BidiStatus& cleanLineBidiStatus) |
794 { | 794 { |
795 const ComputedStyle& styleToUse = styleRef(); | 795 const ComputedStyle& styleToUse = styleRef(); |
796 bool paginated = view()->layoutState() && view()->layoutState()->isPaginated (); | 796 bool paginated = view()->layoutState() && view()->layoutState()->isPaginated (); |
797 LineMidpointState& lineMidpointState = resolver.midpointState(); | 797 LineMidpointState& lineMidpointState = resolver.midpointState(); |
798 InlineIterator endOfLine = resolver.position(); | 798 InlineIterator endOfLine = resolver.position(); |
799 bool checkForEndLineMatch = layoutState.endLine(); | 799 const bool needsToCheckEndLine = containsFloats() && lastChild() && lastChil d()->isBR() && lastChild()->style()->clear(); |
leviw_travelin_and_unemployed
2015/04/24 18:55:47
Driveby: This needs a better name. The addition of
changseok
2015/04/24 21:53:08
Yes it does as long as I know. If the br places in
| |
800 bool checkForEndLineMatch = layoutState.endLine() && !needsToCheckEndLine; | |
801 | |
800 LayoutTextInfo renderTextInfo; | 802 LayoutTextInfo renderTextInfo; |
801 VerticalPositionCache verticalPositionCache; | 803 VerticalPositionCache verticalPositionCache; |
802 | 804 |
803 LineBreaker lineBreaker(this); | 805 LineBreaker lineBreaker(this); |
804 | 806 |
805 while (!endOfLine.atEnd()) { | 807 while (!endOfLine.atEnd()) { |
806 bool logicalWidthIsAvailable = false; | 808 bool logicalWidthIsAvailable = false; |
807 | 809 |
808 // FIXME: Is this check necessary before the first iteration or can it b e moved to the end? | 810 // FIXME: Is this check necessary before the first iteration or can it b e moved to the end? |
809 if (checkForEndLineMatch) { | 811 if (checkForEndLineMatch) { |
(...skipping 1242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2052 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); | 2054 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat (); |
2053 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; | 2055 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal se) - logicalLeft; |
2054 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); | 2056 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid th, availableLogicalWidth, 0); |
2055 | 2057 |
2056 if (!style()->isLeftToRightDirection()) | 2058 if (!style()->isLeftToRightDirection()) |
2057 return logicalWidth() - logicalLeft; | 2059 return logicalWidth() - logicalLeft; |
2058 return logicalLeft; | 2060 return logicalLeft; |
2059 } | 2061 } |
2060 | 2062 |
2061 } | 2063 } |
OLD | NEW |