| 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 85e242f342eff412113a0fca91f4dfa3ec93e381..7550435827d1589bb85142ff9c8c667e5acfb46c 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBox.cpp
|
| @@ -84,12 +84,13 @@ static const int autoscrollBeltSize = 20;
|
| static const unsigned backgroundObscurationTestMaxDepth = 4;
|
|
|
| struct SameSizeAsLayoutBox : public LayoutBoxModelObject {
|
| - LayoutRect frameRect;
|
| +// LayoutRect frameRect;
|
| LayoutSize previousSize;
|
| LayoutUnit intrinsicContentLogicalHeight;
|
| LayoutRectOutsets marginBoxOutsets;
|
| LayoutUnit preferredLogicalWidth[2];
|
| void* pointers[3];
|
| + RefPtr<NGPhysicalBoxFragment> transitionToLayoutNG;
|
| };
|
|
|
| static_assert(sizeof(LayoutBox) == sizeof(SameSizeAsLayoutBox),
|
| @@ -97,6 +98,7 @@ static_assert(sizeof(LayoutBox) == sizeof(SameSizeAsLayoutBox),
|
|
|
| LayoutBox::LayoutBox(ContainerNode* node)
|
| : LayoutBoxModelObject(node),
|
| + m_ngPhysicalBoxFragment(adoptRef(new NGPhysicalBoxFragment())),
|
| m_intrinsicContentLogicalHeight(-1),
|
| m_minPreferredLogicalWidth(-1),
|
| m_maxPreferredLogicalWidth(-1),
|
| @@ -511,7 +513,7 @@ LayoutUnit LayoutBox::clientWidth() const {
|
| // padding box. Another reason: While border side values are currently limited
|
| // to 2^20px (a recent change in the code), if this limit is raised again in
|
| // the future, we'd have ill effects of saturated arithmetic otherwise.
|
| - return (m_frameRect.width() - borderLeft() - borderRight() -
|
| + return (m_ngPhysicalBoxFragment->Width() - borderLeft() - borderRight() -
|
| verticalScrollbarWidth())
|
| .clampNegativeToZero();
|
| }
|
| @@ -522,7 +524,7 @@ LayoutUnit LayoutBox::clientHeight() const {
|
| // padding box. Another reason: While border side values are currently limited
|
| // to 2^20px (a recent change in the code), if this limit is raised again in
|
| // the future, we'd have ill effects of saturated arithmetic otherwise.
|
| - return (m_frameRect.height() - borderTop() - borderBottom() -
|
| + return (m_ngPhysicalBoxFragment->Height() - borderTop() - borderBottom() -
|
| horizontalScrollbarHeight())
|
| .clampNegativeToZero();
|
| }
|
| @@ -732,15 +734,15 @@ void LayoutBox::absoluteQuads(Vector<FloatQuad>& quads,
|
| flowThread->absoluteQuadsForDescendant(*this, quads, mode);
|
| return;
|
| }
|
| - quads.push_back(
|
| - localToAbsoluteQuad(FloatRect(0, 0, m_frameRect.width().toFloat(),
|
| - m_frameRect.height().toFloat()),
|
| - mode));
|
| + quads.push_back(localToAbsoluteQuad(
|
| + FloatRect(0, 0, m_ngPhysicalBoxFragment->Width().toFloat(),
|
| + m_ngPhysicalBoxFragment->Height().toFloat()),
|
| + mode));
|
| }
|
|
|
| FloatRect LayoutBox::localBoundingBoxRectForAccessibility() const {
|
| - return FloatRect(0, 0, m_frameRect.width().toFloat(),
|
| - m_frameRect.height().toFloat());
|
| + return FloatRect(0, 0, m_ngPhysicalBoxFragment->Width().toFloat(),
|
| + m_ngPhysicalBoxFragment->Height().toFloat());
|
| }
|
|
|
| void LayoutBox::updateLayerTransformAfterLayout() {
|
|
|