| Index: third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBox.cpp b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| index b92a53a9225c12c13f1826426a96cc250128cba6..44e3e238ed5ae050c6c9be24f69d8175fd976202 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -133,12 +133,30 @@ void LayoutBox::willBeDestroyed()
|
| if (isOutOfFlowPositioned())
|
| LayoutBlock::removePositionedObject(this);
|
| removeFromPercentHeightContainer();
|
| + if (isOrthogonalWritingModeRoot() && !documentBeingDestroyed())
|
| + unmarkOrthogonalWritingModeRoot();
|
|
|
| ShapeOutsideInfo::removeInfo(*this);
|
|
|
| LayoutBoxModelObject::willBeDestroyed();
|
| }
|
|
|
| +void LayoutBox::insertedIntoTree()
|
| +{
|
| + LayoutBoxModelObject::insertedIntoTree();
|
| +
|
| + if (isOrthogonalWritingModeRoot())
|
| + markOrthogonalWritingModeRoot();
|
| +}
|
| +
|
| +void LayoutBox::willBeRemovedFromTree()
|
| +{
|
| + if (!documentBeingDestroyed() && isOrthogonalWritingModeRoot())
|
| + unmarkOrthogonalWritingModeRoot();
|
| +
|
| + LayoutBoxModelObject::willBeRemovedFromTree();
|
| +}
|
| +
|
| void LayoutBox::removeFloatingOrPositionedChildFromBlockLists()
|
| {
|
| ASSERT(isFloatingOrOutOfFlowPositioned());
|
| @@ -223,8 +241,16 @@ void LayoutBox::styleDidChange(StyleDifference diff, const ComputedStyle* oldSty
|
| if (needsLayout() && oldStyle)
|
| removeFromPercentHeightContainer();
|
|
|
| - if (oldHorizontalWritingMode != isHorizontalWritingMode())
|
| + if (oldHorizontalWritingMode != isHorizontalWritingMode()) {
|
| + if (parent()) {
|
| + if (isOrthogonalWritingModeRoot())
|
| + markOrthogonalWritingModeRoot();
|
| + else
|
| + unmarkOrthogonalWritingModeRoot();
|
| + }
|
| +
|
| clearPercentHeightDescendants();
|
| + }
|
|
|
| // If our zoom factor changes and we have a defined scrollLeft/Top, we need to adjust that value into the
|
| // new zoomed coordinate space.
|
| @@ -3937,6 +3963,18 @@ void LayoutBox::markForPaginationRelayoutIfNeeded(SubtreeLayoutScope& layoutScop
|
| layoutScope.setChildNeedsLayout(this);
|
| }
|
|
|
| +void LayoutBox::markOrthogonalWritingModeRoot()
|
| +{
|
| + ASSERT(frameView());
|
| + frameView()->addOrthogonalWritingModeRoot(*this);
|
| +}
|
| +
|
| +void LayoutBox::unmarkOrthogonalWritingModeRoot()
|
| +{
|
| + ASSERT(frameView());
|
| + frameView()->removeOrthogonalWritingModeRoot(*this);
|
| +}
|
| +
|
| void LayoutBox::addVisualEffectOverflow()
|
| {
|
| if (!style()->hasVisualOverflowingEffect())
|
|
|