Chromium Code Reviews| Index: third_party/WebKit/Source/core/dom/Document.cpp |
| diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp |
| index 987f43e2c966951bc6e1f3cf4a3d0644d1e95c0b..f1890c6eb18f8c31a9c4399aed95a6a9e6a0a86d 100644 |
| --- a/third_party/WebKit/Source/core/dom/Document.cpp |
| +++ b/third_party/WebKit/Source/core/dom/Document.cpp |
| @@ -4494,13 +4494,20 @@ HTMLFrameOwnerElement* Document::localOwner() const { |
| void Document::willChangeFrameOwnerProperties(int marginWidth, |
| int marginHeight, |
| - ScrollbarMode scrollingMode) { |
| - if (!body()) |
| - return; |
| - |
| + ScrollbarMode scrollingMode, |
| + bool isDisplayNone) { |
| DCHECK(frame() && frame()->owner()); |
| FrameOwner* owner = frame()->owner(); |
| + if (documentElement()) { |
| + if (isDisplayNone != owner->isDisplayNone()) { |
|
dcheng
2017/02/05 09:56:08
Nit: combine with the previous if ()
|
| + documentElement()->lazyReattachIfAttached(); |
| + } |
| + } |
| + |
| + if (!body()) |
| + return; |
| + |
| if (marginWidth != owner->marginWidth()) |
| body()->setIntegralAttribute(marginwidthAttr, marginWidth); |
| if (marginHeight != owner->marginHeight()) |