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

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

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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
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 r ights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved.
6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 6 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org) 7 * Copyright (C) 2007 Samuel Weinig (sam@webkit.org)
8 * Copyright (C) 2010 Google Inc. All rights reserved. 8 * Copyright (C) 2010 Google Inc. All rights reserved.
9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 9 * Copyright (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
10 * Copyright (C) 2012 Samsung Electronics. All rights reserved. 10 * Copyright (C) 2012 Samsung Electronics. All rights reserved.
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 #include "platform/PlatformMouseEvent.h" 75 #include "platform/PlatformMouseEvent.h"
76 #include "platform/text/PlatformLocale.h" 76 #include "platform/text/PlatformLocale.h"
77 #include "wtf/MathExtras.h" 77 #include "wtf/MathExtras.h"
78 78
79 using namespace std; 79 using namespace std;
80 80
81 namespace WebCore { 81 namespace WebCore {
82 82
83 using namespace HTMLNames; 83 using namespace HTMLNames;
84 84
85 class ListAttributeTargetObserver : IdTargetObserver { 85 class ListAttributeTargetObserver : public IdTargetObserver {
86 WTF_MAKE_FAST_ALLOCATED; 86 WTF_MAKE_FAST_ALLOCATED;
87 public: 87 public:
88 static PassOwnPtr<ListAttributeTargetObserver> create(const AtomicString& id , HTMLInputElement*); 88 static PassOwnPtr<ListAttributeTargetObserver> create(const AtomicString& id , HTMLInputElement*);
89 virtual void idTargetChanged() OVERRIDE; 89 virtual void idTargetChanged() OVERRIDE;
90 90
91 private: 91 private:
92 ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement*); 92 ListAttributeTargetObserver(const AtomicString& id, HTMLInputElement*);
93 93
94 HTMLInputElement* m_element; 94 HTMLInputElement* m_element;
95 }; 95 };
(...skipping 1413 matching lines...) Expand 10 before | Expand all | Expand 10 after
1509 if (!dataList) 1509 if (!dataList)
1510 return false; 1510 return false;
1511 RefPtr<HTMLCollection> options = dataList->options(); 1511 RefPtr<HTMLCollection> options = dataList->options();
1512 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options ->item(i)); ++i) { 1512 for (unsigned i = 0; HTMLOptionElement* option = toHTMLOptionElement(options ->item(i)); ++i) {
1513 if (isValidValue(option->value())) 1513 if (isValidValue(option->value()))
1514 return true; 1514 return true;
1515 } 1515 }
1516 return false; 1516 return false;
1517 } 1517 }
1518 1518
1519 void HTMLInputElement::setListAttributeTargetObserver(PassOwnPtr<ListAttributeTa rgetObserver> newObserver)
1520 {
1521 if (m_listAttributeTargetObserver)
1522 m_listAttributeTargetObserver->unregister();
1523 m_listAttributeTargetObserver = newObserver;
1524 }
1525
1519 void HTMLInputElement::resetListAttributeTargetObserver() 1526 void HTMLInputElement::resetListAttributeTargetObserver()
1520 { 1527 {
1521 if (inDocument()) 1528 if (inDocument())
1522 m_listAttributeTargetObserver = ListAttributeTargetObserver::create(fast GetAttribute(listAttr), this); 1529 setListAttributeTargetObserver(ListAttributeTargetObserver::create(fastG etAttribute(listAttr), this));
1523 else 1530 else
1524 m_listAttributeTargetObserver = nullptr; 1531 setListAttributeTargetObserver(nullptr);
1525 } 1532 }
1526 1533
1527 void HTMLInputElement::listAttributeTargetChanged() 1534 void HTMLInputElement::listAttributeTargetChanged()
1528 { 1535 {
1529 m_inputTypeView->listAttributeTargetChanged(); 1536 m_inputTypeView->listAttributeTargetChanged();
1530 } 1537 }
1531 1538
1532 bool HTMLInputElement::isSteppable() const 1539 bool HTMLInputElement::isSteppable() const
1533 { 1540 {
1534 return m_inputType->isSteppable(); 1541 return m_inputType->isSteppable();
(...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after
1880 } 1887 }
1881 1888
1882 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) 1889 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI)
1883 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer() 1890 PassRefPtr<RenderStyle> HTMLInputElement::customStyleForRenderer()
1884 { 1891 {
1885 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer()); 1892 return m_inputTypeView->customStyleForRenderer(originalStyleForRenderer());
1886 } 1893 }
1887 #endif 1894 #endif
1888 1895
1889 } // namespace 1896 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698