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 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 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 420 , m_compatibilityModeLocked(false) | 420 , m_compatibilityModeLocked(false) |
| 421 , m_hasAutofocused(false) | 421 , m_hasAutofocused(false) |
| 422 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) | 422 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) |
| 423 , m_domTreeVersion(++s_globalTreeVersion) | 423 , m_domTreeVersion(++s_globalTreeVersion) |
| 424 , m_listenerTypes(0) | 424 , m_listenerTypes(0) |
| 425 , m_mutationObserverTypes(0) | 425 , m_mutationObserverTypes(0) |
| 426 , m_visitedLinkState(VisitedLinkState::create(*this)) | 426 , m_visitedLinkState(VisitedLinkState::create(*this)) |
| 427 , m_visuallyOrdered(false) | 427 , m_visuallyOrdered(false) |
| 428 , m_readyState(Complete) | 428 , m_readyState(Complete) |
| 429 , m_isParsing(false) | 429 , m_isParsing(false) |
| 430 , m_historyItemDocumentStateDirty(false) | |
| 431 , m_gotoAnchorNeededAfterStylesheetsLoad(false) | 430 , m_gotoAnchorNeededAfterStylesheetsLoad(false) |
| 432 , m_containsValidityStyleRules(false) | 431 , m_containsValidityStyleRules(false) |
| 433 , m_updateFocusAppearanceRestoresSelection(false) | 432 , m_updateFocusAppearanceRestoresSelection(false) |
| 434 , m_containsPlugins(false) | 433 , m_containsPlugins(false) |
| 435 , m_ignoreDestructiveWriteCount(0) | 434 , m_ignoreDestructiveWriteCount(0) |
| 436 , m_titleSetExplicitly(false) | 435 , m_titleSetExplicitly(false) |
| 437 , m_markers(adoptPtr(new DocumentMarkerController)) | 436 , m_markers(adoptPtr(new DocumentMarkerController)) |
| 438 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi red) | 437 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi red) |
| 439 , m_cssTarget(0) | 438 , m_cssTarget(0) |
| 440 , m_loadEventProgress(LoadEventNotRun) | 439 , m_loadEventProgress(LoadEventNotRun) |
| (...skipping 1017 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1458 return "#document"; | 1457 return "#document"; |
| 1459 } | 1458 } |
| 1460 | 1459 |
| 1461 Node::NodeType Document::nodeType() const | 1460 Node::NodeType Document::nodeType() const |
| 1462 { | 1461 { |
| 1463 return DOCUMENT_NODE; | 1462 return DOCUMENT_NODE; |
| 1464 } | 1463 } |
| 1465 | 1464 |
| 1466 FormController& Document::formController() | 1465 FormController& Document::formController() |
| 1467 { | 1466 { |
| 1468 if (!m_formController) | 1467 if (!m_formController) { |
| 1469 m_formController = FormController::create(); | 1468 m_formController = FormController::create(); |
| 1469 if (m_frame && m_frame->loader().currentItem() && m_frame->loader().curr entItem()->isCurrentDocument(this)) | |
| 1470 m_frame->loader().currentItem()->setDocumentState(m_formController-> formElementsState()); | |
|
abarth-chromium
2014/04/17 23:41:24
It seems slightly odd that getting the formControl
Nate Chapin
2014/04/17 23:48:19
Right. I didn't see a cleaner way to hook this up.
| |
| 1471 } | |
| 1470 return *m_formController; | 1472 return *m_formController; |
| 1471 } | 1473 } |
| 1472 | 1474 |
| 1473 Vector<String> Document::formElementsState() const | 1475 DocumentState* Document::formElementsState() const |
| 1474 { | 1476 { |
| 1475 if (!m_formController) | 1477 if (!m_formController) |
| 1476 return Vector<String>(); | 1478 return 0; |
| 1477 return m_formController->formElementsState(); | 1479 return m_formController->formElementsState(); |
| 1478 } | 1480 } |
| 1479 | 1481 |
| 1480 void Document::setStateForNewFormElements(const Vector<String>& stateVector) | 1482 void Document::setStateForNewFormElements(const Vector<String>& stateVector) |
| 1481 { | 1483 { |
| 1482 if (!stateVector.size() && !m_formController) | 1484 if (!stateVector.size() && !m_formController) |
| 1483 return; | 1485 return; |
| 1484 formController().setStateForNewFormElements(stateVector); | 1486 formController().setStateForNewFormElements(stateVector); |
| 1485 } | 1487 } |
| 1486 | 1488 |
| (...skipping 4070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5557 (*it)->invalidateCache(attrName); | 5559 (*it)->invalidateCache(attrName); |
| 5558 } | 5560 } |
| 5559 | 5561 |
| 5560 void Document::trace(Visitor* visitor) | 5562 void Document::trace(Visitor* visitor) |
| 5561 { | 5563 { |
| 5562 Supplementable<Document>::trace(visitor); | 5564 Supplementable<Document>::trace(visitor); |
| 5563 ContainerNode::trace(visitor); | 5565 ContainerNode::trace(visitor); |
| 5564 } | 5566 } |
| 5565 | 5567 |
| 5566 } // namespace WebCore | 5568 } // namespace WebCore |
| OLD | NEW |