Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(174)

Side by Side Diff: Source/core/dom/Document.cpp

Issue 239993011: Lazily generate HistoryItem's serialized form state (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merged to trunk Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/html/HTMLFormControlElementWithState.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 , m_compatibilityModeLocked(false) 421 , m_compatibilityModeLocked(false)
422 , m_hasAutofocused(false) 422 , m_hasAutofocused(false)
423 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) 423 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired)
424 , m_domTreeVersion(++s_globalTreeVersion) 424 , m_domTreeVersion(++s_globalTreeVersion)
425 , m_listenerTypes(0) 425 , m_listenerTypes(0)
426 , m_mutationObserverTypes(0) 426 , m_mutationObserverTypes(0)
427 , m_visitedLinkState(VisitedLinkState::create(*this)) 427 , m_visitedLinkState(VisitedLinkState::create(*this))
428 , m_visuallyOrdered(false) 428 , m_visuallyOrdered(false)
429 , m_readyState(Complete) 429 , m_readyState(Complete)
430 , m_isParsing(false) 430 , m_isParsing(false)
431 , m_historyItemDocumentStateDirty(false)
432 , m_gotoAnchorNeededAfterStylesheetsLoad(false) 431 , m_gotoAnchorNeededAfterStylesheetsLoad(false)
433 , m_containsValidityStyleRules(false) 432 , m_containsValidityStyleRules(false)
434 , m_updateFocusAppearanceRestoresSelection(false) 433 , m_updateFocusAppearanceRestoresSelection(false)
435 , m_containsPlugins(false) 434 , m_containsPlugins(false)
436 , m_ignoreDestructiveWriteCount(0) 435 , m_ignoreDestructiveWriteCount(0)
437 , m_titleSetExplicitly(false) 436 , m_titleSetExplicitly(false)
438 , m_markers(adoptPtr(new DocumentMarkerController)) 437 , m_markers(adoptPtr(new DocumentMarkerController))
439 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi red) 438 , m_updateFocusAppearanceTimer(this, &Document::updateFocusAppearanceTimerFi red)
440 , m_cssTarget(0) 439 , m_cssTarget(0)
441 , m_loadEventProgress(LoadEventNotRun) 440 , m_loadEventProgress(LoadEventNotRun)
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after
1457 return "#document"; 1456 return "#document";
1458 } 1457 }
1459 1458
1460 Node::NodeType Document::nodeType() const 1459 Node::NodeType Document::nodeType() const
1461 { 1460 {
1462 return DOCUMENT_NODE; 1461 return DOCUMENT_NODE;
1463 } 1462 }
1464 1463
1465 FormController& Document::formController() 1464 FormController& Document::formController()
1466 { 1465 {
1467 if (!m_formController) 1466 if (!m_formController) {
1468 m_formController = FormController::create(); 1467 m_formController = FormController::create();
1468 if (m_frame && m_frame->loader().currentItem() && m_frame->loader().curr entItem()->isCurrentDocument(this))
1469 m_frame->loader().currentItem()->setDocumentState(m_formController-> formElementsState());
1470 }
1469 return *m_formController; 1471 return *m_formController;
1470 } 1472 }
1471 1473
1472 Vector<String> Document::formElementsState() const 1474 DocumentState* Document::formElementsState() const
1473 { 1475 {
1474 if (!m_formController) 1476 if (!m_formController)
1475 return Vector<String>(); 1477 return 0;
1476 return m_formController->formElementsState(); 1478 return m_formController->formElementsState();
1477 } 1479 }
1478 1480
1479 void Document::setStateForNewFormElements(const Vector<String>& stateVector) 1481 void Document::setStateForNewFormElements(const Vector<String>& stateVector)
1480 { 1482 {
1481 if (!stateVector.size() && !m_formController) 1483 if (!stateVector.size() && !m_formController)
1482 return; 1484 return;
1483 formController().setStateForNewFormElements(stateVector); 1485 formController().setStateForNewFormElements(stateVector);
1484 } 1486 }
1485 1487
(...skipping 4090 matching lines...) Expand 10 before | Expand all | Expand 10 after
5576 (*it)->invalidateCache(attrName); 5578 (*it)->invalidateCache(attrName);
5577 } 5579 }
5578 5580
5579 void Document::trace(Visitor* visitor) 5581 void Document::trace(Visitor* visitor)
5580 { 5582 {
5581 Supplementable<Document>::trace(visitor); 5583 Supplementable<Document>::trace(visitor);
5582 ContainerNode::trace(visitor); 5584 ContainerNode::trace(visitor);
5583 } 5585 }
5584 5586
5585 } // namespace WebCore 5587 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.h ('k') | Source/core/html/HTMLFormControlElementWithState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698