| Index: third_party/WebKit/Source/core/frame/FrameView.cpp
|
| diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| index a6304a708559976dd77b0674c4d684c51db6b62f..8772982ec7b1416c92cb553481f0fc305691425e 100644
|
| --- a/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| +++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
|
| @@ -224,6 +224,7 @@ void FrameView::reset()
|
| clearScrollAnchor();
|
| m_viewportConstrainedObjects.clear();
|
| m_layoutSubtreeRootList.clear();
|
| + m_orthogonalWritingModeRootList.clear();
|
| }
|
|
|
| // Call function for each non-throttled frame view in pre tree order.
|
| @@ -844,10 +845,14 @@ void FrameView::performLayout(bool inSubtreeLayout)
|
|
|
| forceLayoutParentViewIfNeeded();
|
|
|
| + if (hasOrthogonalWritingModeRoots())
|
| + layoutOrthogonalWritingModeRoots();
|
| +
|
| if (inSubtreeLayout) {
|
| if (m_analyzer)
|
| m_analyzer->increment(LayoutAnalyzer::PerformLayoutRootLayoutObjects, m_layoutSubtreeRootList.size());
|
| - while (LayoutObject* root = m_layoutSubtreeRootList.takeDeepestRoot()) {
|
| + m_layoutSubtreeRootList.assertOnModify(true);
|
| + for (auto& root : m_layoutSubtreeRootList.ordered()) {
|
| if (!root->needsLayout())
|
| continue;
|
| layoutFromRootObject(*root);
|
| @@ -858,6 +863,8 @@ void FrameView::performLayout(bool inSubtreeLayout)
|
| if (LayoutObject* container = root->container())
|
| container->setMayNeedPaintInvalidation();
|
| }
|
| + m_layoutSubtreeRootList.assertOnModify(false);
|
| + m_layoutSubtreeRootList.clear();
|
| } else {
|
| layoutFromRootObject(*layoutView());
|
| }
|
| @@ -1728,7 +1735,7 @@ void FrameView::handleLoadCompleted()
|
|
|
| void FrameView::clearLayoutSubtreeRoot(const LayoutObject& root)
|
| {
|
| - m_layoutSubtreeRootList.removeRoot(const_cast<LayoutObject&>(root));
|
| + m_layoutSubtreeRootList.remove(const_cast<LayoutObject&>(root));
|
| }
|
|
|
| void FrameView::clearLayoutSubtreeRootsAndMarkContainingBlocks()
|
| @@ -1736,6 +1743,38 @@ void FrameView::clearLayoutSubtreeRootsAndMarkContainingBlocks()
|
| m_layoutSubtreeRootList.clearAndMarkContainingBlocksForLayout();
|
| }
|
|
|
| +void FrameView::addOrthogonalWritingModeRoot(LayoutBox& root)
|
| +{
|
| + m_orthogonalWritingModeRootList.add(root);
|
| +}
|
| +
|
| +void FrameView::removeOrthogonalWritingModeRoot(LayoutBox& root)
|
| +{
|
| + m_orthogonalWritingModeRootList.remove(root);
|
| +}
|
| +
|
| +bool FrameView::hasOrthogonalWritingModeRoots() const
|
| +{
|
| + return !m_orthogonalWritingModeRootList.isEmpty();
|
| +}
|
| +
|
| +void FrameView::layoutOrthogonalWritingModeRoots()
|
| +{
|
| + m_orthogonalWritingModeRootList.assertOnModify(true);
|
| + for (auto& root : m_orthogonalWritingModeRootList.ordered()) {
|
| + ASSERT(root->isBox() && toLayoutBox(*root).isOrthogonalWritingModeRoot());
|
| + if (!root->needsLayout()
|
| + || root->isOutOfFlowPositioned()
|
| + || root->isColumnSpanAll()
|
| + || !root->styleRef().logicalHeight().isIntrinsicOrAuto()) {
|
| + continue;
|
| + }
|
| + LayoutState layoutState(*root);
|
| + root->layout();
|
| + }
|
| + m_orthogonalWritingModeRootList.assertOnModify(false);
|
| +}
|
| +
|
| void FrameView::scheduleRelayout()
|
| {
|
| ASSERT(m_frame->view() == this);
|
| @@ -1777,7 +1816,7 @@ void FrameView::scheduleRelayoutOfSubtree(LayoutObject* relayoutRoot)
|
| if (relayoutRoot == layoutView)
|
| m_layoutSubtreeRootList.clearAndMarkContainingBlocksForLayout();
|
| else
|
| - m_layoutSubtreeRootList.addRoot(*relayoutRoot);
|
| + m_layoutSubtreeRootList.add(*relayoutRoot);
|
|
|
| if (m_layoutSchedulingEnabled) {
|
| m_hasPendingLayout = true;
|
|
|