| Index: Source/core/dom/Document.cpp
|
| diff --git a/Source/core/dom/Document.cpp b/Source/core/dom/Document.cpp
|
| index b698359de2bfac80ad6a87880b71b9e082b83002..9cd3a9f7679d3c1801f958ac83661fa97b265316 100644
|
| --- a/Source/core/dom/Document.cpp
|
| +++ b/Source/core/dom/Document.cpp
|
| @@ -1660,32 +1660,28 @@
|
| documentElement()->setNeedsStyleRecalc(SubtreeStyleChange);
|
| }
|
|
|
| - EOverflow overflowX = OAUTO;
|
| - EOverflow overflowY = OAUTO;
|
| - float columnGap = 0;
|
| - if (overflowStyle) {
|
| - overflowX = overflowStyle->overflowX();
|
| - overflowY = overflowStyle->overflowY();
|
| - // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto':
|
| - if (overflowX == OVISIBLE)
|
| - overflowX = OAUTO;
|
| - if (overflowY == OVISIBLE)
|
| - overflowY = OAUTO;
|
| - // Column-gap is (ab)used by the current paged overflow implementation (in lack of other
|
| - // ways to specify gaps between pages), so we have to propagate it too.
|
| - columnGap = overflowStyle->columnGap();
|
| - }
|
| -
|
| RefPtr<RenderStyle> documentStyle = renderView()->style();
|
| if (documentStyle->writingMode() != rootWritingMode
|
| || documentStyle->direction() != rootDirection
|
| - || documentStyle->overflowX() != overflowX
|
| - || documentStyle->overflowY() != overflowY
|
| - || documentStyle->columnGap() != columnGap) {
|
| + || (overflowStyle && (documentStyle->overflowX() != overflowStyle->overflowX() || documentStyle->overflowY() != overflowStyle->overflowY()))) {
|
| RefPtr<RenderStyle> newStyle = RenderStyle::clone(documentStyle.get());
|
| newStyle->setWritingMode(rootWritingMode);
|
| newStyle->setDirection(rootDirection);
|
| - newStyle->setColumnGap(columnGap);
|
| + EOverflow overflowX = OAUTO;
|
| + EOverflow overflowY = OAUTO;
|
| + if (overflowStyle) {
|
| + overflowX = overflowStyle->overflowX();
|
| + overflowY = overflowStyle->overflowY();
|
| + // Visible overflow on the viewport is meaningless, and the spec says to treat it as 'auto':
|
| + if (overflowX == OVISIBLE)
|
| + overflowX = OAUTO;
|
| + if (overflowY == OVISIBLE)
|
| + overflowY = OAUTO;
|
| +
|
| + // Column-gap is (ab)used by the current paged overflow implementation (in lack of other
|
| + // ways to specify gaps between pages), so we have to propagate it too.
|
| + newStyle->setColumnGap(overflowStyle->columnGap());
|
| + }
|
| newStyle->setOverflowX(overflowX);
|
| newStyle->setOverflowY(overflowY);
|
| renderView()->setStyle(newStyle);
|
|
|