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 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 if (stateVector.size() < 1 || stateVector[i++] != formStateSignature()) | 453 if (stateVector.size() < 1 || stateVector[i++] != formStateSignature()) |
454 return; | 454 return; |
455 | 455 |
456 while (i + 1 < stateVector.size()) { | 456 while (i + 1 < stateVector.size()) { |
457 AtomicString formKey = stateVector[i++]; | 457 AtomicString formKey = stateVector[i++]; |
458 OwnPtr<SavedFormState> state = SavedFormState::deserialize(stateVector,
i); | 458 OwnPtr<SavedFormState> state = SavedFormState::deserialize(stateVector,
i); |
459 if (!state) { | 459 if (!state) { |
460 i = 0; | 460 i = 0; |
461 break; | 461 break; |
462 } | 462 } |
463 map.add(formKey.impl(), state.release()); | 463 map.add(formKey, state.release()); |
464 } | 464 } |
465 if (i != stateVector.size()) | 465 if (i != stateVector.size()) |
466 map.clear(); | 466 map.clear(); |
467 } | 467 } |
468 | 468 |
469 void FormController::willDeleteForm(HTMLFormElement* form) | 469 void FormController::willDeleteForm(HTMLFormElement* form) |
470 { | 470 { |
471 if (m_formKeyGenerator) | 471 if (m_formKeyGenerator) |
472 m_formKeyGenerator->willDeleteForm(form); | 472 m_formKeyGenerator->willDeleteForm(form); |
473 } | 473 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 m_formElementsWithState.add(control); | 519 m_formElementsWithState.add(control); |
520 } | 520 } |
521 | 521 |
522 void FormController::unregisterFormElementWithState(HTMLFormControlElementWithSt
ate* control) | 522 void FormController::unregisterFormElementWithState(HTMLFormControlElementWithSt
ate* control) |
523 { | 523 { |
524 RELEASE_ASSERT(m_formElementsWithState.contains(control)); | 524 RELEASE_ASSERT(m_formElementsWithState.contains(control)); |
525 m_formElementsWithState.remove(control); | 525 m_formElementsWithState.remove(control); |
526 } | 526 } |
527 | 527 |
528 } // namespace WebCore | 528 } // namespace WebCore |
OLD | NEW |