| 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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 } | 287 } |
| 288 | 288 |
| 289 // ---------------------------------------------------------------------------- | 289 // ---------------------------------------------------------------------------- |
| 290 | 290 |
| 291 class FormKeyGenerator final : public NoBaseWillBeGarbageCollectedFinalized<Form
KeyGenerator> { | 291 class FormKeyGenerator final : public NoBaseWillBeGarbageCollectedFinalized<Form
KeyGenerator> { |
| 292 WTF_MAKE_NONCOPYABLE(FormKeyGenerator); | 292 WTF_MAKE_NONCOPYABLE(FormKeyGenerator); |
| 293 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 293 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 294 | 294 |
| 295 public: | 295 public: |
| 296 static PassOwnPtrWillBeRawPtr<FormKeyGenerator> create() { return adoptPtrWi
llBeNoop(new FormKeyGenerator); } | 296 static PassOwnPtrWillBeRawPtr<FormKeyGenerator> create() { return adoptPtrWi
llBeNoop(new FormKeyGenerator); } |
| 297 void trace(Visitor* visitor) | 297 DEFINE_INLINE_TRACE() |
| 298 { | 298 { |
| 299 #if ENABLE(OILPAN) | 299 #if ENABLE(OILPAN) |
| 300 visitor->trace(m_formToKeyMap); | 300 visitor->trace(m_formToKeyMap); |
| 301 #endif | 301 #endif |
| 302 } | 302 } |
| 303 const AtomicString& formKey(const HTMLFormControlElementWithState&); | 303 const AtomicString& formKey(const HTMLFormControlElementWithState&); |
| 304 void willDeleteForm(HTMLFormElement*); | 304 void willDeleteForm(HTMLFormElement*); |
| 305 | 305 |
| 306 private: | 306 private: |
| 307 FormKeyGenerator() { } | 307 FormKeyGenerator() { } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 | 382 |
| 383 // ---------------------------------------------------------------------------- | 383 // ---------------------------------------------------------------------------- |
| 384 | 384 |
| 385 PassRefPtrWillBeRawPtr<DocumentState> DocumentState::create() | 385 PassRefPtrWillBeRawPtr<DocumentState> DocumentState::create() |
| 386 { | 386 { |
| 387 return adoptRefWillBeNoop(new DocumentState); | 387 return adoptRefWillBeNoop(new DocumentState); |
| 388 } | 388 } |
| 389 | 389 |
| 390 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentState) | 390 DEFINE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(DocumentState) |
| 391 | 391 |
| 392 void DocumentState::trace(Visitor* visitor) | 392 DEFINE_TRACE(DocumentState) |
| 393 { | 393 { |
| 394 #if ENABLE(OILPAN) | 394 #if ENABLE(OILPAN) |
| 395 visitor->trace(m_formControls); | 395 visitor->trace(m_formControls); |
| 396 #endif | 396 #endif |
| 397 } | 397 } |
| 398 | 398 |
| 399 void DocumentState::addControl(HTMLFormControlElementWithState* control) | 399 void DocumentState::addControl(HTMLFormControlElementWithState* control) |
| 400 { | 400 { |
| 401 ASSERT(!m_formControls.contains(control)); | 401 ASSERT(!m_formControls.contains(control)); |
| 402 m_formControls.add(control); | 402 m_formControls.add(control); |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 | 449 |
| 450 FormController::FormController() | 450 FormController::FormController() |
| 451 : m_documentState(DocumentState::create()) | 451 : m_documentState(DocumentState::create()) |
| 452 { | 452 { |
| 453 } | 453 } |
| 454 | 454 |
| 455 FormController::~FormController() | 455 FormController::~FormController() |
| 456 { | 456 { |
| 457 } | 457 } |
| 458 | 458 |
| 459 void FormController::trace(Visitor* visitor) | 459 DEFINE_TRACE(FormController) |
| 460 { | 460 { |
| 461 visitor->trace(m_radioButtonGroupScope); | 461 visitor->trace(m_radioButtonGroupScope); |
| 462 visitor->trace(m_documentState); | 462 visitor->trace(m_documentState); |
| 463 visitor->trace(m_formKeyGenerator); | 463 visitor->trace(m_formKeyGenerator); |
| 464 } | 464 } |
| 465 | 465 |
| 466 DocumentState* FormController::formElementsState() const | 466 DocumentState* FormController::formElementsState() const |
| 467 { | 467 { |
| 468 return m_documentState.get(); | 468 return m_documentState.get(); |
| 469 } | 469 } |
| (...skipping 90 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 |