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

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

Issue 15820002: Page::chrome() should return a reference. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 7 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/html/HTMLAnchorElement.cpp ('k') | Source/core/html/InputType.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 return form()->shouldAutocomplete(); 64 return form()->shouldAutocomplete();
65 } 65 }
66 66
67 void HTMLFormControlElementWithState::notifyFormStateChanged() 67 void HTMLFormControlElementWithState::notifyFormStateChanged()
68 { 68 {
69 Frame* frame = document()->frame(); 69 Frame* frame = document()->frame();
70 if (!frame) 70 if (!frame)
71 return; 71 return;
72 72
73 if (Page* page = frame->page()) 73 if (Page* page = frame->page())
74 page->chrome()->client()->formStateDidChange(this); 74 page->chrome().client()->formStateDidChange(this);
75 } 75 }
76 76
77 bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() con st 77 bool HTMLFormControlElementWithState::shouldSaveAndRestoreFormControlState() con st
78 { 78 {
79 // We don't save/restore control state in a form with autocomplete=off. 79 // We don't save/restore control state in a form with autocomplete=off.
80 return attached() && shouldAutocomplete(); 80 return attached() && shouldAutocomplete();
81 } 81 }
82 82
83 FormControlState HTMLFormControlElementWithState::saveFormControlState() const 83 FormControlState HTMLFormControlElementWithState::saveFormControlState() const
84 { 84 {
85 return FormControlState(); 85 return FormControlState();
86 } 86 }
87 87
88 void HTMLFormControlElementWithState::finishParsingChildren() 88 void HTMLFormControlElementWithState::finishParsingChildren()
89 { 89 {
90 HTMLFormControlElement::finishParsingChildren(); 90 HTMLFormControlElement::finishParsingChildren();
91 document()->formController()->restoreControlStateFor(*this); 91 document()->formController()->restoreControlStateFor(*this);
92 } 92 }
93 93
94 bool HTMLFormControlElementWithState::isFormControlElementWithState() const 94 bool HTMLFormControlElementWithState::isFormControlElementWithState() const
95 { 95 {
96 return true; 96 return true;
97 } 97 }
98 98
99 } // namespace Webcore 99 } // namespace Webcore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLAnchorElement.cpp ('k') | Source/core/html/InputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698