| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 Document* document = toDocument(context); | 396 Document* document = toDocument(context); |
| 397 if (Element* element = document->autofocusElement()) { | 397 if (Element* element = document->autofocusElement()) { |
| 398 document->setAutofocusElement(0); | 398 document->setAutofocusElement(0); |
| 399 element->focus(); | 399 element->focus(); |
| 400 } | 400 } |
| 401 } | 401 } |
| 402 | 402 |
| 403 static void recordLoadReasonToHistogram(WouldLoadReason reason) { | 403 static void recordLoadReasonToHistogram(WouldLoadReason reason) { |
| 404 DEFINE_STATIC_LOCAL( | 404 DEFINE_STATIC_LOCAL( |
| 405 EnumerationHistogram, unseenFrameHistogram, | 405 EnumerationHistogram, unseenFrameHistogram, |
| 406 ("Navigation.DeferredDocumentLoading.StatesV2", WouldLoadReasonEnd)); | 406 ("Navigation.DeferredDocumentLoading.StatesV3", WouldLoadReasonEnd)); |
| 407 unseenFrameHistogram.count(reason); | 407 unseenFrameHistogram.count(reason); |
| 408 } | 408 } |
| 409 | 409 |
| 410 Document::Document(const DocumentInit& initializer, | 410 Document::Document(const DocumentInit& initializer, |
| 411 DocumentClassFlags documentClasses) | 411 DocumentClassFlags documentClasses) |
| 412 : ContainerNode(0, CreateDocument), | 412 : ContainerNode(0, CreateDocument), |
| 413 TreeScope(*this), | 413 TreeScope(*this), |
| 414 m_hasNodesWithPlaceholderStyle(false), | 414 m_hasNodesWithPlaceholderStyle(false), |
| 415 m_evaluateMediaQueriesOnStyleRecalc(false), | 415 m_evaluateMediaQueriesOnStyleRecalc(false), |
| 416 m_pendingSheetLayout(NoLayoutWithPendingSheets), | 416 m_pendingSheetLayout(NoLayoutWithPendingSheets), |
| (...skipping 5993 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6410 } | 6410 } |
| 6411 | 6411 |
| 6412 void showLiveDocumentInstances() { | 6412 void showLiveDocumentInstances() { |
| 6413 WeakDocumentSet& set = liveDocumentSet(); | 6413 WeakDocumentSet& set = liveDocumentSet(); |
| 6414 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6414 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6415 for (Document* document : set) | 6415 for (Document* document : set) |
| 6416 fprintf(stderr, "- Document %p URL: %s\n", document, | 6416 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6417 document->url().getString().utf8().data()); | 6417 document->url().getString().utf8().data()); |
| 6418 } | 6418 } |
| 6419 #endif | 6419 #endif |
| OLD | NEW |