Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2564633002: Don't create layout objects for children of display-none iframes. (Closed)
Patch Set: Rebaseline. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4479 matching lines...) Expand 10 before | Expand all | Expand 10 after
4490 HTMLFrameOwnerElement* Document::localOwner() const { 4490 HTMLFrameOwnerElement* Document::localOwner() const {
4491 if (!frame()) 4491 if (!frame())
4492 return 0; 4492 return 0;
4493 // FIXME: This probably breaks the attempts to layout after a load is finished 4493 // FIXME: This probably breaks the attempts to layout after a load is finished
4494 // in implicitClose(), and probably tons of other things... 4494 // in implicitClose(), and probably tons of other things...
4495 return frame()->deprecatedLocalOwner(); 4495 return frame()->deprecatedLocalOwner();
4496 } 4496 }
4497 4497
4498 void Document::willChangeFrameOwnerProperties(int marginWidth, 4498 void Document::willChangeFrameOwnerProperties(int marginWidth,
4499 int marginHeight, 4499 int marginHeight,
4500 ScrollbarMode scrollingMode) { 4500 ScrollbarMode scrollingMode,
4501 bool isDisplayNone) {
4502 DCHECK(frame() && frame()->owner());
4503 FrameOwner* owner = frame()->owner();
4504
4505 if (documentElement()) {
4506 if (isDisplayNone != owner->isDisplayNone()) {
4507 documentElement()->lazyReattachIfAttached();
4508 }
4509 }
4510
4501 if (!body()) 4511 if (!body())
4502 return; 4512 return;
4503 4513
4504 DCHECK(frame() && frame()->owner());
4505 FrameOwner* owner = frame()->owner();
4506
4507 if (marginWidth != owner->marginWidth()) 4514 if (marginWidth != owner->marginWidth())
4508 body()->setIntegralAttribute(marginwidthAttr, marginWidth); 4515 body()->setIntegralAttribute(marginwidthAttr, marginWidth);
4509 if (marginHeight != owner->marginHeight()) 4516 if (marginHeight != owner->marginHeight())
4510 body()->setIntegralAttribute(marginheightAttr, marginHeight); 4517 body()->setIntegralAttribute(marginheightAttr, marginHeight);
4511 if (scrollingMode != owner->scrollingMode() && view()) 4518 if (scrollingMode != owner->scrollingMode() && view())
4512 view()->setNeedsLayout(); 4519 view()->setNeedsLayout();
4513 } 4520 }
4514 4521
4515 bool Document::isInInvisibleSubframe() const { 4522 bool Document::isInInvisibleSubframe() const {
4516 if (!localOwner()) 4523 if (!localOwner())
(...skipping 2063 matching lines...) Expand 10 before | Expand all | Expand 10 after
6580 } 6587 }
6581 6588
6582 void showLiveDocumentInstances() { 6589 void showLiveDocumentInstances() {
6583 WeakDocumentSet& set = liveDocumentSet(); 6590 WeakDocumentSet& set = liveDocumentSet();
6584 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); 6591 fprintf(stderr, "There are %u documents currently alive:\n", set.size());
6585 for (blink::Document* document : set) 6592 for (blink::Document* document : set)
6586 fprintf(stderr, "- Document %p URL: %s\n", document, 6593 fprintf(stderr, "- Document %p URL: %s\n", document,
6587 document->url().getString().utf8().data()); 6594 document->url().getString().utf8().data());
6588 } 6595 }
6589 #endif 6596 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameOwner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698