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 17 matching lines...) Expand all Loading... |
28 #include "core/rendering/RenderLayer.h" | 28 #include "core/rendering/RenderLayer.h" |
29 #include "core/rendering/RenderListMarker.h" | 29 #include "core/rendering/RenderListMarker.h" |
30 #include "core/rendering/RenderRegion.h" | 30 #include "core/rendering/RenderRegion.h" |
31 #include "core/rendering/RenderRubyRun.h" | 31 #include "core/rendering/RenderRubyRun.h" |
32 #include "core/rendering/RenderView.h" | 32 #include "core/rendering/RenderView.h" |
33 #include "core/rendering/TrailingFloatsRootInlineBox.h" | 33 #include "core/rendering/TrailingFloatsRootInlineBox.h" |
34 #include "core/rendering/VerticalPositionCache.h" | 34 #include "core/rendering/VerticalPositionCache.h" |
35 #include "core/rendering/line/BreakingContextInlineHeaders.h" | 35 #include "core/rendering/line/BreakingContextInlineHeaders.h" |
36 #include "core/rendering/line/LineLayoutState.h" | 36 #include "core/rendering/line/LineLayoutState.h" |
37 #include "core/rendering/line/LineWidth.h" | 37 #include "core/rendering/line/LineWidth.h" |
| 38 #include "core/rendering/line/RenderTextInfo.h" |
| 39 #include "core/rendering/line/WordMeasurement.h" |
38 #include "core/rendering/svg/SVGRootInlineBox.h" | 40 #include "core/rendering/svg/SVGRootInlineBox.h" |
39 #include "platform/fonts/Character.h" | 41 #include "platform/fonts/Character.h" |
40 #include "platform/text/BidiResolver.h" | 42 #include "platform/text/BidiResolver.h" |
41 #include "wtf/RefCountedLeakCounter.h" | 43 #include "wtf/RefCountedLeakCounter.h" |
42 #include "wtf/StdLibExtras.h" | 44 #include "wtf/StdLibExtras.h" |
43 #include "wtf/Vector.h" | 45 #include "wtf/Vector.h" |
44 #include "wtf/unicode/CharacterNames.h" | 46 #include "wtf/unicode/CharacterNames.h" |
45 | 47 |
46 namespace WebCore { | 48 namespace WebCore { |
47 | 49 |
(...skipping 863 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
911 clearFloats(clear); | 913 clearFloats(clear); |
912 } | 914 } |
913 } | 915 } |
914 } | 916 } |
915 | 917 |
916 layoutRunsAndFloatsInRange(layoutState, resolver, cleanLineStart, cleanLineB
idiStatus, consecutiveHyphenatedLines); | 918 layoutRunsAndFloatsInRange(layoutState, resolver, cleanLineStart, cleanLineB
idiStatus, consecutiveHyphenatedLines); |
917 linkToEndLineIfNeeded(layoutState); | 919 linkToEndLineIfNeeded(layoutState); |
918 repaintDirtyFloats(layoutState.floats()); | 920 repaintDirtyFloats(layoutState.floats()); |
919 } | 921 } |
920 | 922 |
921 RenderTextInfo::RenderTextInfo() | |
922 : m_text(0) | |
923 , m_font(0) | |
924 { | |
925 } | |
926 | |
927 RenderTextInfo::~RenderTextInfo() | |
928 { | |
929 } | |
930 | |
931 // Before restarting the layout loop with a new logicalHeight, remove all floats
that were added and reset the resolver. | 923 // Before restarting the layout loop with a new logicalHeight, remove all floats
that were added and reset the resolver. |
932 inline const InlineIterator& RenderBlockFlow::restartLayoutRunsAndFloatsInRange(
LayoutUnit oldLogicalHeight, LayoutUnit newLogicalHeight, FloatingObject* lastF
loatFromPreviousLine, InlineBidiResolver& resolver, const InlineIterator& oldEn
d) | 924 inline const InlineIterator& RenderBlockFlow::restartLayoutRunsAndFloatsInRange(
LayoutUnit oldLogicalHeight, LayoutUnit newLogicalHeight, FloatingObject* lastF
loatFromPreviousLine, InlineBidiResolver& resolver, const InlineIterator& oldEn
d) |
933 { | 925 { |
934 removeFloatingObjectsBelow(lastFloatFromPreviousLine, oldLogicalHeight); | 926 removeFloatingObjectsBelow(lastFloatFromPreviousLine, oldLogicalHeight); |
935 setLogicalHeight(newLogicalHeight); | 927 setLogicalHeight(newLogicalHeight); |
936 resolver.setPositionIgnoringNestedIsolates(oldEnd); | 928 resolver.setPositionIgnoringNestedIsolates(oldEnd); |
937 return oldEnd; | 929 return oldEnd; |
938 } | 930 } |
939 | 931 |
940 void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
nlineBidiResolver& resolver, const InlineIterator& cleanLineStart, const BidiSta
tus& cleanLineBidiStatus, unsigned consecutiveHyphenatedLines) | 932 void RenderBlockFlow::layoutRunsAndFloatsInRange(LineLayoutState& layoutState, I
nlineBidiResolver& resolver, const InlineIterator& cleanLineStart, const BidiSta
tus& cleanLineBidiStatus, unsigned consecutiveHyphenatedLines) |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2190 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); | 2182 float logicalLeft = logicalLeftOffsetForLine(logicalHeight(), false).toFloat
(); |
2191 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; | 2183 float availableLogicalWidth = logicalRightOffsetForLine(logicalHeight(), fal
se) - logicalLeft; |
2192 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); | 2184 updateLogicalWidthForAlignment(textAlign, 0, 0, logicalLeft, totalLogicalWid
th, availableLogicalWidth, 0); |
2193 | 2185 |
2194 if (!style()->isLeftToRightDirection()) | 2186 if (!style()->isLeftToRightDirection()) |
2195 return logicalWidth() - logicalLeft; | 2187 return logicalWidth() - logicalLeft; |
2196 return logicalLeft; | 2188 return logicalLeft; |
2197 } | 2189 } |
2198 | 2190 |
2199 } | 2191 } |
OLD | NEW |