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

Side by Side Diff: third_party/WebKit/Source/core/html/HTMLInputElement.cpp

Issue 2557583003: Move Form Association Code to FormAssociated::associateWith (Closed)
Patch Set: Check for m_inputType before accessing it Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 7 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 8 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
9 * Copyright (C) 2010 Google Inc. All rights reserved. 9 * Copyright (C) 2010 Google Inc. All rights reserved.
10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. 10 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved.
(...skipping 1458 matching lines...) Expand 10 before | Expand all | Expand 10 after
1469 1469
1470 void HTMLInputElement::onSearch() { 1470 void HTMLInputElement::onSearch() {
1471 m_inputType->dispatchSearchEvent(); 1471 m_inputType->dispatchSearchEvent();
1472 } 1472 }
1473 1473
1474 void HTMLInputElement::updateClearButtonVisibility() { 1474 void HTMLInputElement::updateClearButtonVisibility() {
1475 m_inputTypeView->updateClearButtonVisibility(); 1475 m_inputTypeView->updateClearButtonVisibility();
1476 } 1476 }
1477 1477
1478 void HTMLInputElement::willChangeForm() { 1478 void HTMLInputElement::willChangeForm() {
1479 removeFromRadioButtonGroup(); 1479 if (m_inputType)
1480 removeFromRadioButtonGroup();
1480 TextControlElement::willChangeForm(); 1481 TextControlElement::willChangeForm();
1481 } 1482 }
1482 1483
1483 void HTMLInputElement::didChangeForm() { 1484 void HTMLInputElement::didChangeForm() {
1484 TextControlElement::didChangeForm(); 1485 TextControlElement::didChangeForm();
1485 addToRadioButtonGroup(); 1486 if (m_inputType)
1487 addToRadioButtonGroup();
1486 } 1488 }
1487 1489
1488 Node::InsertionNotificationRequest HTMLInputElement::insertedInto( 1490 Node::InsertionNotificationRequest HTMLInputElement::insertedInto(
1489 ContainerNode* insertionPoint) { 1491 ContainerNode* insertionPoint) {
1490 TextControlElement::insertedInto(insertionPoint); 1492 TextControlElement::insertedInto(insertionPoint);
1491 if (insertionPoint->isConnected() && !form()) 1493 if (insertionPoint->isConnected() && !form())
1492 addToRadioButtonGroup(); 1494 addToRadioButtonGroup();
1493 resetListAttributeTargetObserver(); 1495 resetListAttributeTargetObserver();
1494 logAddElementIfIsolatedWorldAndInDocument("input", typeAttr, formactionAttr); 1496 logAddElementIfIsolatedWorldAndInDocument("input", typeAttr, formactionAttr);
1495 return InsertionShouldCallDidNotifySubtreeInsertions; 1497 return InsertionShouldCallDidNotifySubtreeInsertions;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
1891 1893
1892 bool HTMLInputElement::hasFallbackContent() const { 1894 bool HTMLInputElement::hasFallbackContent() const {
1893 return m_inputTypeView->hasFallbackContent(); 1895 return m_inputTypeView->hasFallbackContent();
1894 } 1896 }
1895 1897
1896 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) { 1898 void HTMLInputElement::setFilesFromPaths(const Vector<String>& paths) {
1897 return m_inputType->setFilesFromPaths(paths); 1899 return m_inputType->setFilesFromPaths(paths);
1898 } 1900 }
1899 1901
1900 } // namespace blink 1902 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLImageElement.cpp ('k') | third_party/WebKit/Source/core/html/HTMLObjectElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698