| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 15 matching lines...) Expand all Loading... |
| 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/RenderBlockFlow.h" | 32 #include "core/rendering/RenderBlockFlow.h" |
| 33 | 33 |
| 34 #include "core/accessibility/AXObjectCache.h" | 34 #include "core/accessibility/AXObjectCache.h" |
| 35 #include "core/frame/FrameView.h" | 35 #include "core/frame/FrameView.h" |
| 36 #include "core/rendering/FastTextAutosizer.h" |
| 36 #include "core/rendering/HitTestLocation.h" | 37 #include "core/rendering/HitTestLocation.h" |
| 37 #include "core/rendering/LayoutRectRecorder.h" | 38 #include "core/rendering/LayoutRectRecorder.h" |
| 38 #include "core/rendering/LayoutRepainter.h" | 39 #include "core/rendering/LayoutRepainter.h" |
| 39 #include "core/rendering/RenderLayer.h" | 40 #include "core/rendering/RenderLayer.h" |
| 40 #include "core/rendering/RenderNamedFlowFragment.h" | 41 #include "core/rendering/RenderNamedFlowFragment.h" |
| 41 #include "core/rendering/RenderNamedFlowThread.h" | 42 #include "core/rendering/RenderNamedFlowThread.h" |
| 42 #include "core/rendering/RenderText.h" | 43 #include "core/rendering/RenderText.h" |
| 43 #include "core/rendering/RenderView.h" | 44 #include "core/rendering/RenderView.h" |
| 44 #include "core/rendering/line/LineWidth.h" | 45 #include "core/rendering/line/LineWidth.h" |
| 45 #include "core/rendering/svg/SVGTextRunRenderingContext.h" | 46 #include "core/rendering/svg/SVGTextRunRenderingContext.h" |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 setPaginationStrut(0); | 296 setPaginationStrut(0); |
| 296 } | 297 } |
| 297 | 298 |
| 298 SubtreeLayoutScope layoutScope(this); | 299 SubtreeLayoutScope layoutScope(this); |
| 299 | 300 |
| 300 LayoutUnit beforeEdge = borderBefore() + paddingBefore(); | 301 LayoutUnit beforeEdge = borderBefore() + paddingBefore(); |
| 301 LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeig
ht(); | 302 LayoutUnit afterEdge = borderAfter() + paddingAfter() + scrollbarLogicalHeig
ht(); |
| 302 LayoutUnit previousHeight = logicalHeight(); | 303 LayoutUnit previousHeight = logicalHeight(); |
| 303 setLogicalHeight(beforeEdge); | 304 setLogicalHeight(beforeEdge); |
| 304 | 305 |
| 306 FastTextAutosizer* textAutosizer = document().fastTextAutosizer(); |
| 307 if (textAutosizer) |
| 308 textAutosizer->beginLayout(this); |
| 309 |
| 305 m_repaintLogicalTop = 0; | 310 m_repaintLogicalTop = 0; |
| 306 m_repaintLogicalBottom = 0; | 311 m_repaintLogicalBottom = 0; |
| 307 LayoutUnit maxFloatLogicalBottom = 0; | 312 LayoutUnit maxFloatLogicalBottom = 0; |
| 308 if (!firstChild() && !isAnonymousBlock()) | 313 if (!firstChild() && !isAnonymousBlock()) |
| 309 setChildrenInline(true); | 314 setChildrenInline(true); |
| 310 if (childrenInline()) | 315 if (childrenInline()) |
| 311 layoutInlineChildren(relayoutChildren, m_repaintLogicalTop, m_repaintLog
icalBottom, afterEdge); | 316 layoutInlineChildren(relayoutChildren, m_repaintLogicalTop, m_repaintLog
icalBottom, afterEdge); |
| 312 else | 317 else |
| 313 layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom, layoutScope
, beforeEdge, afterEdge); | 318 layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom, layoutScope
, beforeEdge, afterEdge); |
| 314 | 319 |
| 320 if (textAutosizer) |
| 321 textAutosizer->endLayout(this); |
| 322 |
| 315 if (frameView()->partialLayout().isStopping()) { | 323 if (frameView()->partialLayout().isStopping()) { |
| 316 statePusher.pop(); | 324 statePusher.pop(); |
| 317 return; | 325 return; |
| 318 } | 326 } |
| 319 | 327 |
| 320 // Expand our intrinsic height to encompass floats. | 328 // Expand our intrinsic height to encompass floats. |
| 321 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && expandsToE
ncloseOverhangingFloats()) | 329 if (lowestFloatLogicalBottom() > (logicalHeight() - afterEdge) && expandsToE
ncloseOverhangingFloats()) |
| 322 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); | 330 setLogicalHeight(lowestFloatLogicalBottom() + afterEdge); |
| 323 | 331 |
| 324 if (relayoutForPagination(hasSpecifiedPageLogicalHeight, pageLogicalHeight,
statePusher) || relayoutToAvoidWidows(statePusher)) { | 332 if (relayoutForPagination(hasSpecifiedPageLogicalHeight, pageLogicalHeight,
statePusher) || relayoutToAvoidWidows(statePusher)) { |
| (...skipping 2465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2790 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() | 2798 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() |
| 2791 { | 2799 { |
| 2792 if (m_rareData) | 2800 if (m_rareData) |
| 2793 return *m_rareData; | 2801 return *m_rareData; |
| 2794 | 2802 |
| 2795 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); | 2803 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); |
| 2796 return *m_rareData; | 2804 return *m_rareData; |
| 2797 } | 2805 } |
| 2798 | 2806 |
| 2799 } // namespace WebCore | 2807 } // namespace WebCore |
| OLD | NEW |