Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 4476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4487 HTMLFrameOwnerElement* Document::localOwner() const { | 4487 HTMLFrameOwnerElement* Document::localOwner() const { |
| 4488 if (!frame()) | 4488 if (!frame()) |
| 4489 return 0; | 4489 return 0; |
| 4490 // FIXME: This probably breaks the attempts to layout after a load is finished | 4490 // FIXME: This probably breaks the attempts to layout after a load is finished |
| 4491 // in implicitClose(), and probably tons of other things... | 4491 // in implicitClose(), and probably tons of other things... |
| 4492 return frame()->deprecatedLocalOwner(); | 4492 return frame()->deprecatedLocalOwner(); |
| 4493 } | 4493 } |
| 4494 | 4494 |
| 4495 void Document::willChangeFrameOwnerProperties(int marginWidth, | 4495 void Document::willChangeFrameOwnerProperties(int marginWidth, |
| 4496 int marginHeight, | 4496 int marginHeight, |
| 4497 ScrollbarMode scrollingMode) { | 4497 ScrollbarMode scrollingMode, |
| 4498 bool isDisplayNone) { | |
| 4499 DCHECK(frame() && frame()->owner()); | |
| 4500 FrameOwner* owner = frame()->owner(); | |
| 4501 | |
| 4502 if (documentElement()) { | |
| 4503 if (isDisplayNone != owner->isDisplayNone()) { | |
|
dcheng
2017/02/05 09:56:08
Nit: combine with the previous if ()
| |
| 4504 documentElement()->lazyReattachIfAttached(); | |
| 4505 } | |
| 4506 } | |
| 4507 | |
| 4498 if (!body()) | 4508 if (!body()) |
| 4499 return; | 4509 return; |
| 4500 | 4510 |
| 4501 DCHECK(frame() && frame()->owner()); | |
| 4502 FrameOwner* owner = frame()->owner(); | |
| 4503 | |
| 4504 if (marginWidth != owner->marginWidth()) | 4511 if (marginWidth != owner->marginWidth()) |
| 4505 body()->setIntegralAttribute(marginwidthAttr, marginWidth); | 4512 body()->setIntegralAttribute(marginwidthAttr, marginWidth); |
| 4506 if (marginHeight != owner->marginHeight()) | 4513 if (marginHeight != owner->marginHeight()) |
| 4507 body()->setIntegralAttribute(marginheightAttr, marginHeight); | 4514 body()->setIntegralAttribute(marginheightAttr, marginHeight); |
| 4508 if (scrollingMode != owner->scrollingMode() && view()) | 4515 if (scrollingMode != owner->scrollingMode() && view()) |
| 4509 view()->setNeedsLayout(); | 4516 view()->setNeedsLayout(); |
| 4510 } | 4517 } |
| 4511 | 4518 |
| 4512 bool Document::isInInvisibleSubframe() const { | 4519 bool Document::isInInvisibleSubframe() const { |
| 4513 if (!localOwner()) | 4520 if (!localOwner()) |
| (...skipping 2055 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6569 } | 6576 } |
| 6570 | 6577 |
| 6571 void showLiveDocumentInstances() { | 6578 void showLiveDocumentInstances() { |
| 6572 WeakDocumentSet& set = liveDocumentSet(); | 6579 WeakDocumentSet& set = liveDocumentSet(); |
| 6573 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6580 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6574 for (blink::Document* document : set) | 6581 for (blink::Document* document : set) |
| 6575 fprintf(stderr, "- Document %p URL: %s\n", document, | 6582 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6576 document->url().getString().utf8().data()); | 6583 document->url().getString().utf8().data()); |
| 6577 } | 6584 } |
| 6578 #endif | 6585 #endif |
| OLD | NEW |