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

Side by Side Diff: Source/core/html/HTMLFormControlElementWithState.cpp

Issue 181653002: Have Document::formController() return a reference (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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.cpp ('k') | Source/core/html/HTMLFormElement.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 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 28 matching lines...) Expand all
39 { 39 {
40 } 40 }
41 41
42 HTMLFormControlElementWithState::~HTMLFormControlElementWithState() 42 HTMLFormControlElementWithState::~HTMLFormControlElementWithState()
43 { 43 {
44 } 44 }
45 45
46 Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto (ContainerNode* insertionPoint) 46 Node::InsertionNotificationRequest HTMLFormControlElementWithState::insertedInto (ContainerNode* insertionPoint)
47 { 47 {
48 if (insertionPoint->inDocument() && !containingShadowRoot()) 48 if (insertionPoint->inDocument() && !containingShadowRoot())
49 document().formController()->registerStatefulFormControl(*this); 49 document().formController().registerStatefulFormControl(*this);
50 return HTMLFormControlElement::insertedInto(insertionPoint); 50 return HTMLFormControlElement::insertedInto(insertionPoint);
51 } 51 }
52 52
53 void HTMLFormControlElementWithState::removedFrom(ContainerNode* insertionPoint) 53 void HTMLFormControlElementWithState::removedFrom(ContainerNode* insertionPoint)
54 { 54 {
55 if (insertionPoint->inDocument() && !containingShadowRoot() && !insertionPoi nt->containingShadowRoot()) 55 if (insertionPoint->inDocument() && !containingShadowRoot() && !insertionPoi nt->containingShadowRoot())
56 document().formController()->unregisterStatefulFormControl(*this); 56 document().formController().unregisterStatefulFormControl(*this);
57 HTMLFormControlElement::removedFrom(insertionPoint); 57 HTMLFormControlElement::removedFrom(insertionPoint);
58 } 58 }
59 59
60 bool HTMLFormControlElementWithState::shouldAutocomplete() const 60 bool HTMLFormControlElementWithState::shouldAutocomplete() const
61 { 61 {
62 if (!form()) 62 if (!form())
63 return true; 63 return true;
64 return form()->shouldAutocomplete(); 64 return form()->shouldAutocomplete();
65 } 65 }
66 66
(...skipping 13 matching lines...) Expand all
80 } 80 }
81 81
82 FormControlState HTMLFormControlElementWithState::saveFormControlState() const 82 FormControlState HTMLFormControlElementWithState::saveFormControlState() const
83 { 83 {
84 return FormControlState(); 84 return FormControlState();
85 } 85 }
86 86
87 void HTMLFormControlElementWithState::finishParsingChildren() 87 void HTMLFormControlElementWithState::finishParsingChildren()
88 { 88 {
89 HTMLFormControlElement::finishParsingChildren(); 89 HTMLFormControlElement::finishParsingChildren();
90 document().formController()->restoreControlStateFor(*this); 90 document().formController().restoreControlStateFor(*this);
91 } 91 }
92 92
93 bool HTMLFormControlElementWithState::isFormControlElementWithState() const 93 bool HTMLFormControlElementWithState::isFormControlElementWithState() const
94 { 94 {
95 return true; 95 return true;
96 } 96 }
97 97
98 } // namespace Webcore 98 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/dom/Document.cpp ('k') | Source/core/html/HTMLFormElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698