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 480 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 // ignoring the defersLoading flag. | 491 // ignoring the defersLoading flag. |
492 DCHECK(!parentDocument() || !parentDocument()->activeDOMObjectsAreSuspended(
)); | 492 DCHECK(!parentDocument() || !parentDocument()->activeDOMObjectsAreSuspended(
)); |
493 | 493 |
494 #ifndef NDEBUG | 494 #ifndef NDEBUG |
495 liveDocumentSet().add(this); | 495 liveDocumentSet().add(this); |
496 #endif | 496 #endif |
497 } | 497 } |
498 | 498 |
499 Document::~Document() | 499 Document::~Document() |
500 { | 500 { |
501 DCHECK(!layoutView()); | 501 DCHECK(layoutViewItem().isNull()); |
502 DCHECK(!parentTreeScope()); | 502 DCHECK(!parentTreeScope()); |
503 // If a top document with a cache, verify that it was comprehensively | 503 // If a top document with a cache, verify that it was comprehensively |
504 // cleared during detach. | 504 // cleared during detach. |
505 DCHECK(!m_axObjectCache); | 505 DCHECK(!m_axObjectCache); |
506 InstanceCounters::decrementCounter(InstanceCounters::DocumentCounter); | 506 InstanceCounters::decrementCounter(InstanceCounters::DocumentCounter); |
507 } | 507 } |
508 | 508 |
509 SelectorQueryCache& Document::selectorQueryCache() | 509 SelectorQueryCache& Document::selectorQueryCache() |
510 { | 510 { |
511 if (!m_selectorQueryCache) | 511 if (!m_selectorQueryCache) |
(...skipping 2633 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3145 // because they need to be contained in iframes with the srcdoc. | 3145 // because they need to be contained in iframes with the srcdoc. |
3146 DCHECK(frame); | 3146 DCHECK(frame); |
3147 } | 3147 } |
3148 referrerDocument = frame->document(); | 3148 referrerDocument = frame->document(); |
3149 } | 3149 } |
3150 return referrerDocument->m_url.strippedForUseAsReferrer(); | 3150 return referrerDocument->m_url.strippedForUseAsReferrer(); |
3151 } | 3151 } |
3152 | 3152 |
3153 MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r
equest, const LayoutPoint& documentPoint, const PlatformMouseEvent& event) | 3153 MouseEventWithHitTestResults Document::prepareMouseEvent(const HitTestRequest& r
equest, const LayoutPoint& documentPoint, const PlatformMouseEvent& event) |
3154 { | 3154 { |
3155 DCHECK(!layoutView() || layoutView()->isLayoutView()); | 3155 DCHECK(layoutViewItem().isNull() || layoutViewItem().isLayoutView()); |
3156 | 3156 |
3157 // LayoutView::hitTest causes a layout, and we don't want to hit that until
the first | 3157 // LayoutView::hitTest causes a layout, and we don't want to hit that until
the first |
3158 // layout because until then, there is nothing shown on the screen - the use
r can't | 3158 // layout because until then, there is nothing shown on the screen - the use
r can't |
3159 // have intentionally clicked on something belonging to this page. Furthermo
re, | 3159 // have intentionally clicked on something belonging to this page. Furthermo
re, |
3160 // mousemove events before the first layout should not lead to a premature l
ayout() | 3160 // mousemove events before the first layout should not lead to a premature l
ayout() |
3161 // happening, which could show a flash of white. | 3161 // happening, which could show a flash of white. |
3162 // See also the similar code in EventHandler::hitTestResultAtPoint. | 3162 // See also the similar code in EventHandler::hitTestResultAtPoint. |
3163 if (layoutViewItem().isNull() || !view() || !view()->didFirstLayout()) | 3163 if (layoutViewItem().isNull() || !view() || !view()->didFirstLayout()) |
3164 return MouseEventWithHitTestResults(event, HitTestResult(request, Layout
Point())); | 3164 return MouseEventWithHitTestResults(event, HitTestResult(request, Layout
Point())); |
3165 | 3165 |
(...skipping 2853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6019 } | 6019 } |
6020 | 6020 |
6021 void showLiveDocumentInstances() | 6021 void showLiveDocumentInstances() |
6022 { | 6022 { |
6023 WeakDocumentSet& set = liveDocumentSet(); | 6023 WeakDocumentSet& set = liveDocumentSet(); |
6024 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6024 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6025 for (Document* document : set) | 6025 for (Document* document : set) |
6026 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6026 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
6027 } | 6027 } |
6028 #endif | 6028 #endif |
OLD | NEW |