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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 1924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1935 | 1935 |
1936 ScriptForbiddenScope forbidScript; | 1936 ScriptForbiddenScope forbidScript; |
1937 | 1937 |
1938 RefPtr<FrameView> frameView = view(); | 1938 RefPtr<FrameView> frameView = view(); |
1939 if (frameView && frameView->isInPerformLayout()) { | 1939 if (frameView && frameView->isInPerformLayout()) { |
1940 // View layout should not be re-entrant. | 1940 // View layout should not be re-entrant. |
1941 ASSERT_NOT_REACHED(); | 1941 ASSERT_NOT_REACHED(); |
1942 return; | 1942 return; |
1943 } | 1943 } |
1944 | 1944 |
1945 if (Element* oe = ownerElement()) | 1945 if (HTMLFrameOwnerElement* owner = ownerElement()) |
1946 oe->document().updateLayout(); | 1946 owner->document().updateLayout(); |
1947 | 1947 |
1948 updateRenderTreeIfNeeded(); | 1948 updateRenderTreeIfNeeded(); |
1949 | 1949 |
1950 if (!isActive()) | 1950 if (!isActive()) |
1951 return; | 1951 return; |
1952 | 1952 |
1953 if (frameView->needsLayout()) | 1953 if (frameView->needsLayout()) |
1954 frameView->layout(); | 1954 frameView->layout(); |
1955 | 1955 |
1956 if (lifecycle().state() < DocumentLifecycle::LayoutClean) | 1956 if (lifecycle().state() < DocumentLifecycle::LayoutClean) |
(...skipping 2537 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4494 if (!parent || !parent->isLocalFrame()) | 4494 if (!parent || !parent->isLocalFrame()) |
4495 return 0; | 4495 return 0; |
4496 return toLocalFrame(parent)->document(); | 4496 return toLocalFrame(parent)->document(); |
4497 } | 4497 } |
4498 | 4498 |
4499 Document& Document::topDocument() const | 4499 Document& Document::topDocument() const |
4500 { | 4500 { |
4501 // FIXME: Not clear what topDocument() should do in the OOPI case--should it
return the topmost | 4501 // FIXME: Not clear what topDocument() should do in the OOPI case--should it
return the topmost |
4502 // available Document, or something else? | 4502 // available Document, or something else? |
4503 Document* doc = const_cast<Document*>(this); | 4503 Document* doc = const_cast<Document*>(this); |
4504 for (Element* element = doc->ownerElement(); element; element = doc->ownerEl
ement()) | 4504 for (HTMLFrameOwnerElement* element = doc->ownerElement(); element; element
= doc->ownerElement()) |
4505 doc = &element->document(); | 4505 doc = &element->document(); |
4506 | 4506 |
4507 ASSERT(doc); | 4507 ASSERT(doc); |
4508 return *doc; | 4508 return *doc; |
4509 } | 4509 } |
4510 | 4510 |
4511 WeakPtrWillBeRawPtr<Document> Document::contextDocument() | 4511 WeakPtrWillBeRawPtr<Document> Document::contextDocument() |
4512 { | 4512 { |
4513 if (m_contextDocument) | 4513 if (m_contextDocument) |
4514 return m_contextDocument; | 4514 return m_contextDocument; |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5795 using namespace blink; | 5795 using namespace blink; |
5796 void showLiveDocumentInstances() | 5796 void showLiveDocumentInstances() |
5797 { | 5797 { |
5798 WeakDocumentSet& set = liveDocumentSet(); | 5798 WeakDocumentSet& set = liveDocumentSet(); |
5799 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5799 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5800 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { | 5800 for (WeakDocumentSet::const_iterator it = set.begin(); it != set.end(); ++it
) { |
5801 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); | 5801 fprintf(stderr, "- Document %p URL: %s\n", *it, (*it)->url().string().ut
f8().data()); |
5802 } | 5802 } |
5803 } | 5803 } |
5804 #endif | 5804 #endif |
OLD | NEW |