Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Side by Side Diff: Source/core/html/forms/FormController.cpp

Issue 932403002: InlinedVisitor: Migrate html to use inlined tracing (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/forms/FormController.h ('k') | Source/core/html/forms/InputTypeView.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
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
OLDNEW
« no previous file with comments | « Source/core/html/forms/FormController.h ('k') | Source/core/html/forms/InputTypeView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698