| 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 14 matching lines...) Expand all Loading... |
| 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/RenderBlockFlow.h" | 32 #include "core/rendering/RenderBlockFlow.h" |
| 33 | 33 |
| 34 #include "core/frame/FrameView.h" | 34 #include "core/frame/FrameView.h" |
| 35 #include "core/rendering/FastTextAutosizer.h" |
| 35 #include "core/rendering/HitTestLocation.h" | 36 #include "core/rendering/HitTestLocation.h" |
| 36 #include "core/rendering/LayoutRectRecorder.h" | 37 #include "core/rendering/LayoutRectRecorder.h" |
| 37 #include "core/rendering/LayoutRepainter.h" | 38 #include "core/rendering/LayoutRepainter.h" |
| 38 #include "core/rendering/RenderLayer.h" | 39 #include "core/rendering/RenderLayer.h" |
| 39 #include "core/rendering/RenderNamedFlowFragment.h" | 40 #include "core/rendering/RenderNamedFlowFragment.h" |
| 40 #include "core/rendering/RenderNamedFlowThread.h" | 41 #include "core/rendering/RenderNamedFlowThread.h" |
| 41 #include "core/rendering/RenderText.h" | 42 #include "core/rendering/RenderText.h" |
| 42 #include "core/rendering/RenderView.h" | 43 #include "core/rendering/RenderView.h" |
| 43 #include "core/rendering/line/LineWidth.h" | 44 #include "core/rendering/line/LineWidth.h" |
| 44 #include "core/rendering/svg/SVGTextRunRenderingContext.h" | 45 #include "core/rendering/svg/SVGTextRunRenderingContext.h" |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 if (!isCell) { | 290 if (!isCell) { |
| 290 initMaxMarginValues(); | 291 initMaxMarginValues(); |
| 291 | 292 |
| 292 setHasMarginBeforeQuirk(style()->hasMarginBeforeQuirk()); | 293 setHasMarginBeforeQuirk(style()->hasMarginBeforeQuirk()); |
| 293 setHasMarginAfterQuirk(style()->hasMarginAfterQuirk()); | 294 setHasMarginAfterQuirk(style()->hasMarginAfterQuirk()); |
| 294 setPaginationStrut(0); | 295 setPaginationStrut(0); |
| 295 } | 296 } |
| 296 | 297 |
| 297 SubtreeLayoutScope layoutScope(this); | 298 SubtreeLayoutScope layoutScope(this); |
| 298 | 299 |
| 300 FastTextAutosizer* textAutosizer = document().fastTextAutosizer(); |
| 301 if (textAutosizer) |
| 302 textAutosizer->beginLayout(this); |
| 303 |
| 299 m_repaintLogicalTop = 0; | 304 m_repaintLogicalTop = 0; |
| 300 m_repaintLogicalBottom = 0; | 305 m_repaintLogicalBottom = 0; |
| 301 LayoutUnit maxFloatLogicalBottom = 0; | 306 LayoutUnit maxFloatLogicalBottom = 0; |
| 302 if (!firstChild() && !isAnonymousBlock()) | 307 if (!firstChild() && !isAnonymousBlock()) |
| 303 setChildrenInline(true); | 308 setChildrenInline(true); |
| 304 if (childrenInline()) | 309 if (childrenInline()) |
| 305 layoutInlineChildren(relayoutChildren, m_repaintLogicalTop, m_repaintLog
icalBottom); | 310 layoutInlineChildren(relayoutChildren, m_repaintLogicalTop, m_repaintLog
icalBottom); |
| 306 else | 311 else |
| 307 layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom, layoutScope
); | 312 layoutBlockChildren(relayoutChildren, maxFloatLogicalBottom, layoutScope
); |
| 308 | 313 |
| 314 if (textAutosizer) |
| 315 textAutosizer->endLayout(this); |
| 316 |
| 309 if (frameView()->partialLayout().isStopping()) { | 317 if (frameView()->partialLayout().isStopping()) { |
| 310 statePusher.pop(); | 318 statePusher.pop(); |
| 311 return; | 319 return; |
| 312 } | 320 } |
| 313 | 321 |
| 314 // Expand our intrinsic height to encompass floats. | 322 // Expand our intrinsic height to encompass floats. |
| 315 LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight()
; | 323 LayoutUnit toAdd = borderAfter() + paddingAfter() + scrollbarLogicalHeight()
; |
| 316 if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEnclo
seOverhangingFloats()) | 324 if (lowestFloatLogicalBottom() > (logicalHeight() - toAdd) && expandsToEnclo
seOverhangingFloats()) |
| 317 setLogicalHeight(lowestFloatLogicalBottom() + toAdd); | 325 setLogicalHeight(lowestFloatLogicalBottom() + toAdd); |
| 318 | 326 |
| (...skipping 2304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2623 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() | 2631 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() |
| 2624 { | 2632 { |
| 2625 if (m_rareData) | 2633 if (m_rareData) |
| 2626 return *m_rareData; | 2634 return *m_rareData; |
| 2627 | 2635 |
| 2628 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); | 2636 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); |
| 2629 return *m_rareData; | 2637 return *m_rareData; |
| 2630 } | 2638 } |
| 2631 | 2639 |
| 2632 } // namespace WebCore | 2640 } // namespace WebCore |
| OLD | NEW |