| 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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 builder.append(actionURL.getString()); | 346 builder.append(actionURL.getString()); |
| 347 | 347 |
| 348 recordFormStructure(form, builder); | 348 recordFormStructure(form, builder); |
| 349 return builder.toString(); | 349 return builder.toString(); |
| 350 } | 350 } |
| 351 | 351 |
| 352 const AtomicString& FormKeyGenerator::formKey(const HTMLFormControlElementWithSt
ate& control) | 352 const AtomicString& FormKeyGenerator::formKey(const HTMLFormControlElementWithSt
ate& control) |
| 353 { | 353 { |
| 354 HTMLFormElement* form = ownerFormForState(control); | 354 HTMLFormElement* form = ownerFormForState(control); |
| 355 if (!form) { | 355 if (!form) { |
| 356 DEFINE_STATIC_LOCAL(const AtomicString, formKeyForNoOwner, ("No owner",
AtomicString::ConstructFromLiteral)); | 356 DEFINE_STATIC_LOCAL(const AtomicString, formKeyForNoOwner, ("No owner"))
; |
| 357 return formKeyForNoOwner; | 357 return formKeyForNoOwner; |
| 358 } | 358 } |
| 359 FormToKeyMap::const_iterator it = m_formToKeyMap.find(form); | 359 FormToKeyMap::const_iterator it = m_formToKeyMap.find(form); |
| 360 if (it != m_formToKeyMap.end()) | 360 if (it != m_formToKeyMap.end()) |
| 361 return it->value; | 361 return it->value; |
| 362 | 362 |
| 363 String signature = formSignature(*form); | 363 String signature = formSignature(*form); |
| 364 ASSERT(!signature.isNull()); | 364 ASSERT(!signature.isNull()); |
| 365 FormSignatureToNextIndexMap::AddResult result = m_formSignatureToNextIndexMa
p.add(signature, 0); | 365 FormSignatureToNextIndexMap::AddResult result = m_formSignatureToNextIndexMa
p.add(signature, 0); |
| 366 unsigned nextIndex = result.storedValue->value++; | 366 unsigned nextIndex = result.storedValue->value++; |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 558 { | 558 { |
| 559 m_documentState->addControl(&control); | 559 m_documentState->addControl(&control); |
| 560 } | 560 } |
| 561 | 561 |
| 562 void FormController::unregisterStatefulFormControl(HTMLFormControlElementWithSta
te& control) | 562 void FormController::unregisterStatefulFormControl(HTMLFormControlElementWithSta
te& control) |
| 563 { | 563 { |
| 564 m_documentState->removeControl(&control); | 564 m_documentState->removeControl(&control); |
| 565 } | 565 } |
| 566 | 566 |
| 567 } // namespace blink | 567 } // namespace blink |
| OLD | NEW |