Chromium Code Reviews| 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 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 641 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) | 641 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) |
| 642 child->repaint(); | 642 child->repaint(); |
| 643 child->repaintOverhangingFloats(true); | 643 child->repaintOverhangingFloats(true); |
| 644 } | 644 } |
| 645 | 645 |
| 646 if (paginated) { | 646 if (paginated) { |
| 647 // Check for an after page/column break. | 647 // Check for an after page/column break. |
| 648 LayoutUnit newHeight = applyAfterBreak(child, logicalHeight(), marginInf o); | 648 LayoutUnit newHeight = applyAfterBreak(child, logicalHeight(), marginInf o); |
| 649 if (newHeight != height()) | 649 if (newHeight != height()) |
| 650 setLogicalHeight(newHeight); | 650 setLogicalHeight(newHeight); |
| 651 if (RenderFlowThread* flowThread = flowThreadContainingBlock()) | |
| 652 flowThread->flowThreadDescendantBoxLaidOut(child, offsetFromLogicalT opOfFirstPage() + newHeight); | |
|
Julien - ping for review
2014/06/18 00:51:59
I don't like this pattern because it makes little
mstensho (USE GERRIT)
2014/08/26 09:43:57
Done.
mstensho (USE GERRIT)
2014/08/26 09:43:57
Got rid of this by setting 'always' on column-brea
| |
| 651 } | 653 } |
| 652 | 654 |
| 653 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { | 655 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled()) { |
| 654 ASSERT(view()->layoutDeltaMatches(oldLayoutDelta)); | 656 ASSERT(view()->layoutDeltaMatches(oldLayoutDelta)); |
| 655 } | 657 } |
| 656 } | 658 } |
| 657 | 659 |
| 658 LayoutUnit RenderBlockFlow::adjustBlockChildForPagination(LayoutUnit logicalTopA fterClear, LayoutUnit estimateWithoutPagination, RenderBox* child, bool atBefore SideOfBlock) | 660 LayoutUnit RenderBlockFlow::adjustBlockChildForPagination(LayoutUnit logicalTopA fterClear, LayoutUnit estimateWithoutPagination, RenderBox* child, bool atBefore SideOfBlock) |
| 659 { | 661 { |
| 660 RenderBlock* childRenderBlock = child->isRenderBlock() ? toRenderBlock(child ) : 0; | 662 RenderBlock* childRenderBlock = child->isRenderBlock() ? toRenderBlock(child ) : 0; |
| (...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1877 { | 1879 { |
| 1878 child->layer()->setStaticInlinePosition(inlinePosition); | 1880 child->layer()->setStaticInlinePosition(inlinePosition); |
| 1879 } | 1881 } |
| 1880 | 1882 |
| 1881 void RenderBlockFlow::addChild(RenderObject* newChild, RenderObject* beforeChild ) | 1883 void RenderBlockFlow::addChild(RenderObject* newChild, RenderObject* beforeChild ) |
| 1882 { | 1884 { |
| 1883 if (RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { | 1885 if (RenderMultiColumnFlowThread* flowThread = multiColumnFlowThread()) { |
| 1884 flowThread->addChild(newChild, beforeChild); | 1886 flowThread->addChild(newChild, beforeChild); |
| 1885 return; | 1887 return; |
| 1886 } | 1888 } |
| 1889 if (beforeChild) { | |
| 1890 if (RenderFlowThread* containingFlowThread = flowThreadContainingBlock() ) | |
| 1891 beforeChild = containingFlowThread->resolveMovedChild(beforeChild); | |
| 1892 } | |
| 1887 RenderBlock::addChild(newChild, beforeChild); | 1893 RenderBlock::addChild(newChild, beforeChild); |
| 1888 } | 1894 } |
| 1889 | 1895 |
| 1896 void RenderBlockFlow::removeChild(RenderObject* oldChild) | |
| 1897 { | |
| 1898 if (!documentBeingDestroyed()) { | |
| 1899 RenderFlowThread* flowThread = multiColumnFlowThread(); | |
| 1900 if (flowThread && flowThread != oldChild) | |
| 1901 flowThread->flowThreadRelativeWillBeRemoved(oldChild); | |
| 1902 } | |
| 1903 RenderBlock::removeChild(oldChild); | |
| 1904 } | |
| 1905 | |
| 1890 void RenderBlockFlow::moveAllChildrenIncludingFloatsTo(RenderBlock* toBlock, boo l fullRemoveInsert) | 1906 void RenderBlockFlow::moveAllChildrenIncludingFloatsTo(RenderBlock* toBlock, boo l fullRemoveInsert) |
| 1891 { | 1907 { |
| 1892 RenderBlockFlow* toBlockFlow = toRenderBlockFlow(toBlock); | 1908 RenderBlockFlow* toBlockFlow = toRenderBlockFlow(toBlock); |
| 1893 moveAllChildrenTo(toBlockFlow, fullRemoveInsert); | 1909 moveAllChildrenTo(toBlockFlow, fullRemoveInsert); |
| 1894 | 1910 |
| 1895 // When a portion of the render tree is being detached, anonymous blocks | 1911 // When a portion of the render tree is being detached, anonymous blocks |
| 1896 // will be combined as their children are deleted. In this process, the | 1912 // will be combined as their children are deleted. In this process, the |
| 1897 // anonymous block later in the tree is merged into the one preceeding it. | 1913 // anonymous block later in the tree is merged into the one preceeding it. |
| 1898 // It can happen that the later block (this) contains floats that the | 1914 // It can happen that the later block (this) contains floats that the |
| 1899 // previous block (toBlockFlow) did not contain, and thus are not in the | 1915 // previous block (toBlockFlow) did not contain, and thus are not in the |
| (...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2828 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() | 2844 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() |
| 2829 { | 2845 { |
| 2830 if (m_rareData) | 2846 if (m_rareData) |
| 2831 return *m_rareData; | 2847 return *m_rareData; |
| 2832 | 2848 |
| 2833 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); | 2849 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); |
| 2834 return *m_rareData; | 2850 return *m_rareData; |
| 2835 } | 2851 } |
| 2836 | 2852 |
| 2837 } // namespace WebCore | 2853 } // namespace WebCore |
| OLD | NEW |