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

Side by Side Diff: Source/core/html/HTMLTextFormControlElement.h

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 6 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 bool lastChangeWasUserEdit() const; 83 bool lastChangeWasUserEdit() const;
84 void setInnerTextValue(const String&); 84 void setInnerTextValue(const String&);
85 String innerTextValue() const; 85 String innerTextValue() const;
86 86
87 String directionForFormData() const; 87 String directionForFormData() const;
88 88
89 void setTextAsOfLastFormControlChangeEvent(const String& text) { m_textAsOfL astFormControlChangeEvent = text; } 89 void setTextAsOfLastFormControlChangeEvent(const String& text) { m_textAsOfL astFormControlChangeEvent = text; }
90 90
91 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE; 91 virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE;
92 92
93 virtual void acceptHeapVisitor(Visitor*) const OVERRIDE;
94
93 protected: 95 protected:
94 HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement* ); 96 HTMLTextFormControlElement(const QualifiedName&, Document*, HTMLFormElement* );
95 bool isPlaceholderEmpty() const; 97 bool isPlaceholderEmpty() const;
96 virtual void updatePlaceholderText() = 0; 98 virtual void updatePlaceholderText() = 0;
97 99
98 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 100 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
99 101
100 void cacheSelection(int start, int end, TextFieldSelectionDirection directio n) 102 void cacheSelection(int start, int end, TextFieldSelectionDirection directio n)
101 { 103 {
102 m_cachedSelectionStart = start; 104 m_cachedSelectionStart = start;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 int m_cachedSelectionStart; 142 int m_cachedSelectionStart;
141 int m_cachedSelectionEnd; 143 int m_cachedSelectionEnd;
142 TextFieldSelectionDirection m_cachedSelectionDirection; 144 TextFieldSelectionDirection m_cachedSelectionDirection;
143 }; 145 };
144 146
145 inline bool isHTMLTextFormControlElement(const Node* node) 147 inline bool isHTMLTextFormControlElement(const Node* node)
146 { 148 {
147 return node->isElementNode() && toElement(node)->isTextFormControl(); 149 return node->isElementNode() && toElement(node)->isTextFormControl();
148 } 150 }
149 151
150 inline HTMLTextFormControlElement* toHTMLTextFormControlElement(Node* node) 152 inline Result<HTMLTextFormControlElement> toHTMLTextFormControlElement(Node* nod e)
151 { 153 {
152 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextFormControlElement(node) ); 154 ASSERT_WITH_SECURITY_IMPLICATION(!node || isHTMLTextFormControlElement(node) );
153 return static_cast<HTMLTextFormControlElement*>(node); 155 return Handle<HTMLTextFormControlElement>(static_cast<HTMLTextFormControlEle ment*>(node));
154 } 156 }
155 157
156 HTMLTextFormControlElement* enclosingTextFormControl(const Position&); 158 Result<HTMLTextFormControlElement> enclosingTextFormControl(const Position&);
157 159
158 } // namespace 160 } // namespace
159 161
160 #endif 162 #endif
OLDNEW
« no previous file with comments | « Source/core/html/HTMLTextAreaElement.cpp ('k') | Source/core/html/HTMLTextFormControlElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698