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 4292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4303 } | 4303 } |
| 4304 | 4304 |
| 4305 HTMLFrameOwnerElement* Document::localOwner() const { | 4305 HTMLFrameOwnerElement* Document::localOwner() const { |
| 4306 if (!frame()) | 4306 if (!frame()) |
| 4307 return 0; | 4307 return 0; |
| 4308 // FIXME: This probably breaks the attempts to layout after a load is finished | 4308 // FIXME: This probably breaks the attempts to layout after a load is finished |
| 4309 // in implicitClose(), and probably tons of other things... | 4309 // in implicitClose(), and probably tons of other things... |
| 4310 return frame()->deprecatedLocalOwner(); | 4310 return frame()->deprecatedLocalOwner(); |
| 4311 } | 4311 } |
| 4312 | 4312 |
| 4313 void Document::didChangeFrameOwnerProperties(int marginWidth, | |
| 4314 int marginHeight, | |
| 4315 ScrollbarMode scrollingMode) { | |
| 4316 DCHECK(localOwner()); | |
|
bokan
2016/11/21 16:11:36
The owner can be remote. You need some way to get
alexmos
2016/11/21 17:56:56
Just using frame()->owner() instead should work he
| |
| 4317 | |
| 4318 if (marginWidth != localOwner()->marginWidth()) | |
| 4319 body()->setIntegralAttribute(marginwidthAttr, marginWidth); | |
| 4320 if (marginHeight != localOwner()->marginHeight()) | |
| 4321 body()->setIntegralAttribute(marginheightAttr, marginHeight); | |
| 4322 if (scrollingMode != localOwner()->scrollingMode()) | |
| 4323 view()->setNeedsLayout(); | |
| 4324 } | |
| 4325 | |
| 4313 bool Document::isInInvisibleSubframe() const { | 4326 bool Document::isInInvisibleSubframe() const { |
| 4314 if (!localOwner()) | 4327 if (!localOwner()) |
| 4315 return false; // this is a local root element | 4328 return false; // this is a local root element |
| 4316 | 4329 |
| 4317 // TODO(bokan): This looks like it doesn't work in OOPIF. | 4330 // TODO(bokan): This looks like it doesn't work in OOPIF. |
| 4318 DCHECK(frame()); | 4331 DCHECK(frame()); |
| 4319 return frame()->ownerLayoutItem().isNull(); | 4332 return frame()->ownerLayoutItem().isNull(); |
| 4320 } | 4333 } |
| 4321 | 4334 |
| 4322 String Document::cookie(ExceptionState& exceptionState) const { | 4335 String Document::cookie(ExceptionState& exceptionState) const { |
| (...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6440 } | 6453 } |
| 6441 | 6454 |
| 6442 void showLiveDocumentInstances() { | 6455 void showLiveDocumentInstances() { |
| 6443 WeakDocumentSet& set = liveDocumentSet(); | 6456 WeakDocumentSet& set = liveDocumentSet(); |
| 6444 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6457 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6445 for (Document* document : set) | 6458 for (Document* document : set) |
| 6446 fprintf(stderr, "- Document %p URL: %s\n", document, | 6459 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6447 document->url().getString().utf8().data()); | 6460 document->url().getString().utf8().data()); |
| 6448 } | 6461 } |
| 6449 #endif | 6462 #endif |
| OLD | NEW |