| 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 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1625 return "#document"; | 1625 return "#document"; |
| 1626 } | 1626 } |
| 1627 | 1627 |
| 1628 Node::NodeType Document::getNodeType() const { | 1628 Node::NodeType Document::getNodeType() const { |
| 1629 return kDocumentNode; | 1629 return kDocumentNode; |
| 1630 } | 1630 } |
| 1631 | 1631 |
| 1632 FormController& Document::formController() { | 1632 FormController& Document::formController() { |
| 1633 if (!m_formController) { | 1633 if (!m_formController) { |
| 1634 m_formController = FormController::create(); | 1634 m_formController = FormController::create(); |
| 1635 if (m_frame && m_frame->loader().currentItem() && | 1635 HistoryItem* historyItem = loader() ? loader()->historyItem() : nullptr; |
| 1636 m_frame->loader().currentItem()->isCurrentDocument(this)) | 1636 if (historyItem) |
| 1637 m_frame->loader().currentItem()->setDocumentState( | 1637 historyItem->setDocumentState(m_formController->formElementsState()); |
| 1638 m_formController->formElementsState()); | |
| 1639 } | 1638 } |
| 1640 return *m_formController; | 1639 return *m_formController; |
| 1641 } | 1640 } |
| 1642 | 1641 |
| 1643 DocumentState* Document::formElementsState() const { | 1642 DocumentState* Document::formElementsState() const { |
| 1644 if (!m_formController) | 1643 if (!m_formController) |
| 1645 return 0; | 1644 return 0; |
| 1646 return m_formController->formElementsState(); | 1645 return m_formController->formElementsState(); |
| 1647 } | 1646 } |
| 1648 | 1647 |
| (...skipping 5025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6674 } | 6673 } |
| 6675 | 6674 |
| 6676 void showLiveDocumentInstances() { | 6675 void showLiveDocumentInstances() { |
| 6677 WeakDocumentSet& set = liveDocumentSet(); | 6676 WeakDocumentSet& set = liveDocumentSet(); |
| 6678 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6677 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6679 for (blink::Document* document : set) | 6678 for (blink::Document* document : set) |
| 6680 fprintf(stderr, "- Document %p URL: %s\n", document, | 6679 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6681 document->url().getString().utf8().data()); | 6680 document->url().getString().utf8().data()); |
| 6682 } | 6681 } |
| 6683 #endif | 6682 #endif |
| OLD | NEW |