OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 13 matching lines...) Expand all Loading... | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "core/rendering/RenderFlexibleBox.h" | 32 #include "core/rendering/RenderFlexibleBox.h" |
33 | 33 |
34 #include "core/rendering/FastTextAutosizer.h" | |
34 #include "core/rendering/LayoutRepainter.h" | 35 #include "core/rendering/LayoutRepainter.h" |
35 #include "core/rendering/RenderLayer.h" | 36 #include "core/rendering/RenderLayer.h" |
36 #include "core/rendering/RenderView.h" | 37 #include "core/rendering/RenderView.h" |
37 #include "platform/LengthFunctions.h" | 38 #include "platform/LengthFunctions.h" |
38 #include "wtf/MathExtras.h" | 39 #include "wtf/MathExtras.h" |
39 #include <limits> | 40 #include <limits> |
40 | 41 |
41 namespace WebCore { | 42 namespace WebCore { |
42 | 43 |
43 struct RenderFlexibleBox::LineContext { | 44 struct RenderFlexibleBox::LineContext { |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
233 | 234 |
234 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); | 235 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); |
235 | 236 |
236 if (updateLogicalWidthAndColumnWidth()) | 237 if (updateLogicalWidthAndColumnWidth()) |
237 relayoutChildren = true; | 238 relayoutChildren = true; |
238 | 239 |
239 LayoutUnit previousHeight = logicalHeight(); | 240 LayoutUnit previousHeight = logicalHeight(); |
240 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()) ; | 241 setLogicalHeight(borderAndPaddingLogicalHeight() + scrollbarLogicalHeight()) ; |
241 | 242 |
242 { | 243 { |
244 FastTextAutosizer::LayoutScope fastTextAutosizerLayoutScope(this); | |
pdr.
2014/06/11 03:57:05
If we moved these outside this scope, could we ass
skobes
2014/06/11 21:36:21
Maybe, but I'm not sure why that's useful?
| |
243 LayoutStateMaintainer statePusher(*this, locationOffset()); | 245 LayoutStateMaintainer statePusher(*this, locationOffset()); |
244 | 246 |
245 m_numberOfInFlowChildrenOnFirstLine = -1; | 247 m_numberOfInFlowChildrenOnFirstLine = -1; |
246 | 248 |
247 RenderBlock::startDelayUpdateScrollInfo(); | 249 RenderBlock::startDelayUpdateScrollInfo(); |
248 | 250 |
249 prepareOrderIteratorAndMargins(); | 251 prepareOrderIteratorAndMargins(); |
250 | 252 |
251 ChildFrameRects oldChildRects; | 253 ChildFrameRects oldChildRects; |
252 appendChildFrameRects(oldChildRects); | 254 appendChildFrameRects(oldChildRects); |
(...skipping 1160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1413 ASSERT(child); | 1415 ASSERT(child); |
1414 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; | 1416 LayoutUnit lineCrossAxisExtent = lineContexts[lineNumber].crossAxisE xtent; |
1415 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; | 1417 LayoutUnit originalOffset = lineContexts[lineNumber].crossAxisOffset - crossAxisStartEdge; |
1416 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; | 1418 LayoutUnit newOffset = contentExtent - originalOffset - lineCrossAxi sExtent; |
1417 adjustAlignmentForChild(child, newOffset - originalOffset); | 1419 adjustAlignmentForChild(child, newOffset - originalOffset); |
1418 } | 1420 } |
1419 } | 1421 } |
1420 } | 1422 } |
1421 | 1423 |
1422 } | 1424 } |
OLD | NEW |