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(WTF::Optional<int> marginWidth, | |
| 4314 WTF::Optional<int> marginHeight, | |
|
bokan
2016/11/21 13:21:52
Rather than using Optionals here, always pass in t
| |
| 4315 bool scrollingModeChanged) { | |
| 4316 if (marginWidth) | |
| 4317 body()->setIntegralAttribute(marginwidthAttr, marginWidth.value()); | |
| 4318 if (marginHeight) | |
| 4319 body()->setIntegralAttribute(marginheightAttr, marginHeight.value()); | |
| 4320 if (scrollingModeChanged) | |
| 4321 view()->setNeedsLayout(); | |
| 4322 } | |
| 4323 | |
| 4313 bool Document::isInInvisibleSubframe() const { | 4324 bool Document::isInInvisibleSubframe() const { |
| 4314 if (!localOwner()) | 4325 if (!localOwner()) |
| 4315 return false; // this is a local root element | 4326 return false; // this is a local root element |
| 4316 | 4327 |
| 4317 // TODO(bokan): This looks like it doesn't work in OOPIF. | 4328 // TODO(bokan): This looks like it doesn't work in OOPIF. |
| 4318 DCHECK(frame()); | 4329 DCHECK(frame()); |
| 4319 return frame()->ownerLayoutItem().isNull(); | 4330 return frame()->ownerLayoutItem().isNull(); |
| 4320 } | 4331 } |
| 4321 | 4332 |
| 4322 String Document::cookie(ExceptionState& exceptionState) const { | 4333 String Document::cookie(ExceptionState& exceptionState) const { |
| (...skipping 2117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6440 } | 6451 } |
| 6441 | 6452 |
| 6442 void showLiveDocumentInstances() { | 6453 void showLiveDocumentInstances() { |
| 6443 WeakDocumentSet& set = liveDocumentSet(); | 6454 WeakDocumentSet& set = liveDocumentSet(); |
| 6444 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6455 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6445 for (Document* document : set) | 6456 for (Document* document : set) |
| 6446 fprintf(stderr, "- Document %p URL: %s\n", document, | 6457 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6447 document->url().getString().utf8().data()); | 6458 document->url().getString().utf8().data()); |
| 6448 } | 6459 } |
| 6449 #endif | 6460 #endif |
| OLD | NEW |