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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
380 | 380 |
381 FormController::~FormController() | 381 FormController::~FormController() |
382 { | 382 { |
383 } | 383 } |
384 | 384 |
385 static String formStateSignature() | 385 static String formStateSignature() |
386 { | 386 { |
387 // In the legacy version of serialized state, the first item was a name | 387 // In the legacy version of serialized state, the first item was a name |
388 // attribute value of a form control. The following string literal should | 388 // attribute value of a form control. The following string literal should |
389 // contain some characters which are rarely used for name attribute values. | 389 // contain some characters which are rarely used for name attribute values. |
390 DEFINE_STATIC_LOCAL(String, signature, (ASCIILiteral("\n\r?% WebKit serializ
ed form state version 8 \n\r=&"))); | 390 DEFINE_STATIC_LOCAL(String, signature, ("\n\r?% WebKit serialized form state
version 8 \n\r=&")); |
391 return signature; | 391 return signature; |
392 } | 392 } |
393 | 393 |
394 PassOwnPtr<FormController::SavedFormStateMap> FormController::createSavedFormSta
teMap(const FormElementListHashSet& controlList) | 394 PassOwnPtr<FormController::SavedFormStateMap> FormController::createSavedFormSta
teMap(const FormElementListHashSet& controlList) |
395 { | 395 { |
396 OwnPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create(); | 396 OwnPtr<FormKeyGenerator> keyGenerator = FormKeyGenerator::create(); |
397 OwnPtr<SavedFormStateMap> stateMap = adoptPtr(new SavedFormStateMap); | 397 OwnPtr<SavedFormStateMap> stateMap = adoptPtr(new SavedFormStateMap); |
398 for (FormElementListHashSet::const_iterator it = controlList.begin(); it !=
controlList.end(); ++it) { | 398 for (FormElementListHashSet::const_iterator it = controlList.begin(); it !=
controlList.end(); ++it) { |
399 HTMLFormControlElementWithState* control = (*it).get(); | 399 HTMLFormControlElementWithState* control = (*it).get(); |
400 ASSERT(control->inDocument()); | 400 ASSERT(control->inDocument()); |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 m_formElementsWithState.add(control); | 518 m_formElementsWithState.add(control); |
519 } | 519 } |
520 | 520 |
521 void FormController::unregisterFormElementWithState(HTMLFormControlElementWithSt
ate* control) | 521 void FormController::unregisterFormElementWithState(HTMLFormControlElementWithSt
ate* control) |
522 { | 522 { |
523 RELEASE_ASSERT(m_formElementsWithState.contains(control)); | 523 RELEASE_ASSERT(m_formElementsWithState.contains(control)); |
524 m_formElementsWithState.remove(control); | 524 m_formElementsWithState.remove(control); |
525 } | 525 } |
526 | 526 |
527 } // namespace WebCore | 527 } // namespace WebCore |
OLD | NEW |