| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. | 3 * Copyright (C) 2010, 2011, 2012 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 { | 406 { |
| 407 RELEASE_ASSERT(m_formControls.contains(control)); | 407 RELEASE_ASSERT(m_formControls.contains(control)); |
| 408 m_formControls.remove(control); | 408 m_formControls.remove(control); |
| 409 } | 409 } |
| 410 | 410 |
| 411 static String formStateSignature() | 411 static String formStateSignature() |
| 412 { | 412 { |
| 413 // In the legacy version of serialized state, the first item was a name | 413 // In the legacy version of serialized state, the first item was a name |
| 414 // attribute value of a form control. The following string literal should | 414 // attribute value of a form control. The following string literal should |
| 415 // contain some characters which are rarely used for name attribute values. | 415 // contain some characters which are rarely used for name attribute values. |
| 416 DEFINE_STATIC_LOCAL(String, signature, ("\n\r?% WebKit serialized form state
version 8 \n\r=&")); | 416 DEFINE_STATIC_LOCAL(String, signature, ("\n\r?% Blink serialized form state
version 9 \n\r=&")); |
| 417 return signature; | 417 return signature; |
| 418 } | 418 } |
| 419 | 419 |
| 420 Vector<String> DocumentState::toStateVector() | 420 Vector<String> DocumentState::toStateVector() |
| 421 { | 421 { |
| 422 OwnPtrWillBeRawPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create
(); | 422 OwnPtrWillBeRawPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create
(); |
| 423 OwnPtr<SavedFormStateMap> stateMap = adoptPtr(new SavedFormStateMap); | 423 OwnPtr<SavedFormStateMap> stateMap = adoptPtr(new SavedFormStateMap); |
| 424 for (FormElementListHashSet::const_iterator it = m_formControls.begin(); it
!= m_formControls.end(); ++it) { | 424 for (FormElementListHashSet::const_iterator it = m_formControls.begin(); it
!= m_formControls.end(); ++it) { |
| 425 HTMLFormControlElementWithState* control = it->get(); | 425 HTMLFormControlElementWithState* control = it->get(); |
| 426 ASSERT(control->inDocument()); | 426 ASSERT(control->inDocument()); |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 { | 560 { |
| 561 m_documentState->addControl(&control); | 561 m_documentState->addControl(&control); |
| 562 } | 562 } |
| 563 | 563 |
| 564 void FormController::unregisterStatefulFormControl(HTMLFormControlElementWithSta
te& control) | 564 void FormController::unregisterStatefulFormControl(HTMLFormControlElementWithSta
te& control) |
| 565 { | 565 { |
| 566 m_documentState->removeControl(&control); | 566 m_documentState->removeControl(&control); |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace blink | 569 } // namespace blink |
| OLD | NEW |